next up previous

2.3.4 VODE Example

The following IVP due to Robertson (1966) arises in the study of chemical kinetics:

The problem is stiff and the code below uses VODE to solve it on the interval, . For an explanation of the various input parameters, see the prologue to VODE. Since the solution of a linear system is required in the BDF method, the Jacobian of must be available. VODE allows the Jacobian to be supplied by the user (MF = 21 or 24) or to be generated internally by the code (MF = 22 or 25). It is always preferable to supply the Jacobian if possible. Since

the Jacobian is

F is implemented in the subroutine FEX and J in the subroutine JEX. We note that although the Jacobian was not difficult to calculate here, it can be tedious in many applications; modern symbolic packages, such as MAPLE, MATHEMATICA, etc. make it easier to supply J.