next up previous index
Next: D202 First-order Differential Up: CERNLIB Previous: D200 First-order Differential

D201 First-order Differential Equations (Gragg--Bulirsch--Stoer)

Routine ID: D201
Author(s): Library: MATHLIB
Submitter: Submitted: 15.02.1989
Language: FortranRevised: 01.12.1994

Subroutine subprograms RDEQBS and DDEQBS advance the solution of the system of n ≥1 simultaneous first-order differential equations

{dyidx} = fi(x,y1,...,yn), (i = 1,2,...,n),

from a specified value x1 to a specified value x2 of the independent variable x.

On computers other than CDC and Cray, only the double-precision version DDEQBS is available. On CDC and Cray computers, only the single-precision version RDEQBS is available.

Structure:

SUBROUTINE subprograms
User Entry Names : RDEQBS, DDEQBS
Obsolete User Entry Names: DEQBS RDEQBS
Files Referenced : Unit 6
External References: MTLMTR (N002), ABEND (Z035), user-supplied SUBROUTINE subprogram

Usage:

For t=R (type REAL), t=D (type DOUBLE PRECISION),

    CALL tDEQBS(N,X1,X2,Y,H0,EPS,SUB,W)
N
( INTEGER) Number n of equations.
X1
(type according to t) Initial value x1 of the independent variable x.
X2
(type according to t) Final value x2 of the independent variable x.
Y
(type according to t) One-dimensional array of length N. On entry, Y(i),(i=1,...,N) , must contain yi(x1) . On exit, Y(i),(i=1,...,N) , contains approximate values yi(x2) .
H0
(type according to t) On entry, H0 must contain the proposed initial step-length h0 . On exit, H0 contains the last computed step-length (See also Method and Notes).
EPS
(type according to t) The requested absolute accuracy ε . ( EPS should not be smaller than approximately 103 times the machine precision).
SUB
Name of a user-supplied SUBROUTINE subprogram, declared EXTERNAL in the calling program.
W
(type according to t) Array containing at least 36*N elements required as working-space.
The user-supplied subroutine SUB should be of the form
    SUBROUTINE SUB(X,Y,F)
where the variable X and the one-dimensional arrays Y(*) and F(*) are of type t. This subroutine must set

F(I)= fI(X,Y(1),...,Y(N))(I = 1,2,...,N).

Method:

For the first integration step, starting at x=x1 , the step-length h is chosen to be the smallest of the numbers h0, h0/2, h0/4,... for which not more than 9 stages of internal extrapolation yield an estimated error less than ε . This procedure is repeated until x=x2 is reached. (For details, see Ref. 1).

Error handling:

Error D201.1: If the requestec accuracy cannot obtained, a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.
For N<1 , or X1=X2 or H0=0 , control is returned to the calling program without any change in Y.

Notes:

For well-conditioned systems of equations any reasonable value of the initial step length h0 may be chosen. For ill-conditioned systems, the initial value of h0 may be important, and tests with different values are advised. An inappropriate choice may lead to wrong results in such cases.

This subroutines is based on an Algol60 procedure given in Ref. 1. The adaption for integration over a given interval (not only over one step) is due to G. Janin.

References:

  1. R. Bulirsch and J. Stoer, Numerical treatment of ordinary differential equations by extrapolation methods, Numer. Math. 8 (1966) 1--13.

D202

K.S. Kölbig



next up previous index
Next: D202 First-order Differential Up: CERNLIB Previous: D200 First-order Differential


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995