TEST_ODE
Test Problems for
Initial Value Solvers
TEST_ODE
is a MATLAB library which
defines test initial value problems for ordinary
differential equations.
These problems have the common form:
determine (some values of) the function Y(T)
given
Y'(T) = F(T,Y)
with initial value
Y(T0) = Y0
A uniform interface makes it easy to solve all the problems
automatically, or to concentrate on a single one.
The problems include:
-
Enright and Pryce #A1,
neqn = 1,
y' = -y;
-
Enright and Pryce #A2,
neqn = 1,
y' = -y^3/2;
-
Enright and Pryce #A3,
neqn = 1,
y' = cos(t)*y;
-
Enright and Pryce #A4,
neqn = 1,
y' = y*(20-y)/80;
-
Enright and Pryce #A5,
neqn = 1,
y' = (y-t)/(y+t);
-
Enright and Pryce #B1,
neqn = 2,
y1' = 2*y1*(1-y2)
y2' = - y2*(1-y1);
-
Enright and Pryce #B2,
neqn = 3,
y1' = -y1+y2
y2' = y1-2*y2+y3
y3' = y2-y3;
-
Enright and Pryce #B3,
neqn = 3,
y1' = -y1
y2' = y1-y2^2
y3' = y2^2;
-
Enright and Pryce #B4,
neqn = 3,
y1' = (-y2-y1*y3) / sqrt(y1^2+y2^2)
y2' = (y1-y2*y3) / sqrt(y1^2+y2^2)
y3' = y1 / sqrt(y1^2+y2^2);
-
Enright and Pryce #B5,
neqn = 3,
y1' = y2*y3
y2' = -y1*y3
y3' = -0.51*y1*y2;
-
Enright and Pryce #C1,
neqn = 10;
-
Enright and Pryce #C2,
neqn = 10;
-
Enright and Pryce #C3,
neqn = 10;
-
Enright and Pryce #C4,
neqn = 51;
-
Enright and Pryce #C5,
neqn = 30;
-
Enright and Pryce #D1,
neqn = 4;
-
Enright and Pryce #D2,
neqn = 4;
-
Enright and Pryce #D3,
neqn = 4;
-
Enright and Pryce #D4,
neqn = 4;
-
Enright and Pryce #D5,
neqn = 4;
-
Enright and Pryce #E1,
neqn = 2;
-
Enright and Pryce #E2,
neqn = 2;
-
Enright and Pryce #E3,
neqn = 2;
-
Enright and Pryce #E4,
neqn = 2;
-
Enright and Pryce #E5,
neqn = 2;
-
Enright and Pryce #F1,
neqn = 2;
-
Enright and Pryce #F2,
neqn = 1;
-
Enright and Pryce #F3,
neqn = 2;
-
Enright and Pryce #F4,
neqn = 1;
-
Enright and Pryce #F5,
neqn = 1;
-
Lotka-Volterra Predator-Prey Equations,
neqn = 2;
-
The Lorenz System,
neqn = 3;
-
The Van der Pol equation,
neqn = 2;
-
The Linearized Damped Pendulum,
neqn = 2;
-
The Nonlinear Damped Pendulum,
neqn = 2;
-
Duffing's Equation,
neqn = 2,
-
Duffing's Equation with Damping and Forcing,
neqn = 2;
-
Shampine's Ball of Flame,
neqn = 1,
y' = y^2-y^3;
-
Polking's First Order System,
neqn = 1,
y' = y^2-a*t+b;
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
TEST_ODE is available in
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
DFIELD8,
a MATLAB program which
interactively displays the direction field of a differential equation,
by John Polking.
NMS,
a FORTRAN90 library which
includes the DDRIV package of ODE solvers.
ODE,
a FORTRAN90 library which
implements the Shampine and Allen ODE solver.
PPLANE8,
a MATLAB program which
interactively displays the phase plane of a differential equation,
by John Polking.
RKF45,
a MATLAB library which
implements the Runge-Kutta-Fehlberg ODE solver.
TOMS648_NSD,
a FORTRAN77 library which
defines the non-stiff Enright and Pryce test ODE problems,
using double precision arithmetic.
TOMS648_NSS,
a FORTRAN77 library which
defines the non-stiff Enright and Pryce test ODE problems,
using single precision arithmetic.
References:
The following references include some reliable, sturdy,
comprehensive test sets. (Sometimes I'm just doing this for
fun or for classroom exercises. These people, on the other
hand, are serious.)
-
David Arnold, John Polking,
Ordinary Differential Equations using Matlab,
Prentice Hall, 1999.
-
Wayne Enright, John Pryce,
Algorithm 648,
NSDTST and STDTST,
ACM Transactions on Mathematical Software,
Volume 13, Number 1, 1987, pages 28-34.
-
T Hull, Wayne Enright, B Fellen, A Sedgwick,
Comparing numerical methods for ordinary differential equations,
SIAM Journal on Numerical Analysis,
Volume 9, 1972, pages 603-637.
-
Cleve Moler,
Cleve's Corner: Stiff Differential Equations,
MATLAB News and Notes,
May 2003, pages 12-13.
-
http://pitagora.dm.uniba.it/~testset/,
Test Set for IVP Solvers.
-
http://www.unige.ch/math/~hairer/testset/testset.html
Stiff ODE test set of Hairer and Wanner.
Source Code:
-
ch_cap.m,
capitalizes a character.
-
euler_test.m,
uses Euler's method on a test problem.
-
p00_autonomous.m,
returns TRUE if a given problem is autonomous.
-
p00_equil.m,
returns the equilibrium solutions for any problem.
-
p00_euler_step.m,
takes a single Euler step from (T0,Y0) to (T1,Y1).
-
p00_fun.m,
returns the right hand side of any problem.
-
p00_neqn.m,
returns the number of equations for any problem.
-
p00_param_default.m,
defaults the parameters for any problem.
-
p00_rk_step.m,
takes a single Runge-Kutta step from (T0,Y0) to (T1,Y1).
-
p00_scale.m,
returns the scale vector for any test problem.
-
p00_start.m,
returns the initial data for any test problem.
-
p00_stop.m,
returns the end data for any test problem.
-
p00_test_num.m,
returns the number of problems available.
-
p00_title.m,
returns the title of any problem.
-
p15_param.m,
manages parameters for problem 15.
-
p16_param.m,
manages parameters for problem 16.
-
p17_param.m,
manages parameters for problem 17.
-
p18_param.m,
manages parameters for problem 18.
-
p19_param.m,
manages parameters for problem 19.
-
p20_param.m,
manages parameters for problem 20.
-
p26_param.m,
manages parameters for problem 26.
-
p31_param.m,
manages parameters for problem 31.
-
p32_param.m,
manages parameters for problem 32.
-
p33_param.m,
manages parameters for problem 33.
-
p34_param.m,
manages parameters for problem 34.
-
p35_param.m,
manages parameters for problem 35.
-
p37_param.m,
manages parameters for problem 37.
-
p38_param.m,
manages parameters for problem 38.
-
p39_param.m,
manages parameters for problem 39.
-
r8_sign.m,
returns the sign of an R8.
-
s_eqi.m,
is TRUE if two strings are equal, ignoring case.
-
timestamp.m,
prints the current YMDHMS date as a timestamp.
Examples and Tests:
TEST_ODE_TEST04() is a function which solves and plots each of
the test problems.
You can go up one level to
the MATLAB source codes.
Last revised on 06 June 2011.