EQA example 1 (x'=-x+5y , y'=-y)

EQA example 2 (x' = y , y'=-2x^3)

EQA example 3 (repeated prisonner's dilemma).

Pictures obtained by Maxima function plotdf. A sample code is here and here.


For the problem x'=x², x(0)=1, the exact solution x=1/(1-t) is compared with approximate solution,
obtained by a simple difference methods with the step size h=0.1, and h=0.01.

Computation by Octave code here.

Same code can be run in MATLAB; for the UK licence see here.


Note that the above schemes are not very accurate; you can use much more powerful algorithms implemented in e.g. the lsode function (in Octave).
Here is an example of Octave code for Lotka-Volterra system.

In Matlab, one can use e.g. ode23 function. See some demos here [pdf].


Updated April 2024.