# Methods of integration

Choosing the method of integration

1. For many problems an Adams type of method may prove to be quite adequate, and this will not require a Jacobian.
2. However, if the problem is stiff, i.e. there are components with widely differing time constants, such methods may fail giving misleading results.
   Such stiffness is common and it can be estimated by the condition number (ratio of largest eigenvalue to smallest eigenvalue) of the related Jacobian.
3. To get round this problem, a BDF method can be used, but this also requires a Jacobian matrix to be supplied.
   Such Jacobians can either be be supplied explicitly, or approximated internally by numerical differentiation.
4. For n equations dy(i)/dx = f(i)(x,y) the n^2 (df(i)/dy(j)) Jacobian can be coded explicitly or approximated.
   Problems occur when a faulty Jacobian is supplied, so results using coded Jacobians should always be compared with results from numerically approximated Jacobians.
   To create a model file with no Jacobian, just consult deqmod3.tf1 and deqmod3.tf2.
   A file ending with two consecutive percentage signs (like deqmod3.tf2) will cause model parsing to stop without checking the code for a Jacobian.
5. Only by experimenting with a particular problem will it be clear which method to use but the general rule is that, if you can supply an accurate Jacobian, use a BDF method.
6. If you do not supply a Jacobian on the model file, but just use percentages as escape sequences in the model file, then the numerical approximation will be used.
   If you do want to create a model with a Jacobian you should always make two versions, one without, and one with a Jacobian, to compare the behaviour.
   After using a model file with no Jacobian, you have to alter the configuration to restore use of a Jacobian.
7. Program DEQSOL will not allow you to integrate a user supplied model file with no Jacobian using a method such as BDF with an explicit Jacobian.

Back to Help Menu or End Help