Here is a simple but somewhat amusing system of two ode's. The equations are
and the initial conditions are
The graphs on the left show the first and second components as a function of time (x is the blue one, y is red), the graph on the right is the phase plane plot. You can edit the fields below to try your own variations.
There is also available a short description of the syntax that you can use. All fields accept mathematical expressions, not just numbers.
Here is an example of a system of differential equations whose numerical solution demonstrates a phenomenon called "stiffness". The equations are
and the general exact solution (unless you've changed the equations) is
The term with the exponent -10000*t contributes very little to the solution. Its presence, however, causes convergence problems for explicit solution methods such as Runge-Kutta and Explicit Euler.
Try to compute the solution using different algorithms and different number of steps. How many steps does Runge-Kutta need to converge to the correct solution?
Implicit methods are needed to compute the solution with a reasonable amount of work. Try also implicit Euler's method, which is the simplest of this class of methods.
For a more thorough discussion of stiff systems see e.g. "Introduction to Numerical Analysis" by J. Stoer and R. Bulirsch (Springer-Verlag).
Back to my home page
Last updated July 1, 1996. Copyright © 1996 by Harri Ojanen.