### Appendix 2.2: Integrating Ordinary Differential Equations

The Euler integration method often requires very small integration step sizes to obtain a desired level of accuracy. Note that x is a vector of n state variables at each time step. For example, if there are two states (two differential equations)

we have left the inputs and parameters out of the function variable list for convenience. An example is shown next.

#### Example 2.2: An Isothermal Chemical Reactor, continued

Consider the ethylene glycol reactor problem in Example 2.2. We use k_{1} to represent the reaction rate constant, so that it is not confused with the time-step index. The Euler ...