D203: Second-order Differential Equations (Runge-Kutta-Nyström)

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 07.06.1992
Language: Fortran Revised: 01.12.1994

Subroutine subprograms RRKNYS and DRKNYS advance the solution of the system of tex2html_wrap_inline166 simultaneous second-order differential equations

displaymath168

where tex2html_wrap_inline170 , by a single step of length h in the independent variable x.

On computers other than CDC or Cray, only the double-precision version DRKNYS is available. On CDC and Cray computers, only the single-precision version RRKNYS is available.

Structure:

SUBROUTINE subprograms
User Entry Names : RRKNYS, DRKNYS
Obsolete User Entry Names: RKNYS tex2html_wrap_inline176 RRKNYS
External References: User-supplied SUBROUTINE subprogram

Usage:

For tex2html_wrap_inline178 (type REAL), tex2html_wrap_inline180 (type DOUBLE PRECISION),

    CALL tRKNYS(N,H,X,Y,YP,SUB,W)
N
(INTEGER) Number n of equations.
H
(type according to t) The step-length h.
X
On entry, X must be equal to the initial value of the independent variable x. On exit, X is equal to x+h.
Y
(type according to t) One-dimensional array of length tex2html_wrap_inline190 . On entry, tex2html_wrap_inline192 , must contain tex2html_wrap_inline194 . On exit, tex2html_wrap_inline196 , contains approximate values tex2html_wrap_inline198 .
YP
(type according to t) One-dimensional array of length tex2html_wrap_inline200 . On entry, tex2html_wrap_inline202 , must contain tex2html_wrap_inline204 . On exit, tex2html_wrap_inline206 , contains approximate values tex2html_wrap_inline208 .
SUB
Name of a user-supplied SUBROUTINE subprogram, declared EXTERNAL in the calling program.
W
(type according to t) Array containing at least 6*N elements required as working-space.
The user-supplied subroutine SUB should be of the form
    SUBROUTINE SUB(X,Y,YP,F)
where the variable X and the one-dimensional arrays Y(*), YP(*) and F(*) are of type t. This subroutine must set

displaymath210

Method:

Using boldface quantities to denote vectors of length n, the computational sequence is as follows:

eqnarray86

The error per step is proportional to tex2html_wrap_inline214 .

Error handling:

For tex2html_wrap_inline216 or tex2html_wrap_inline218 , control is returned to the calling program without any change in Y or YP.

References:

  1. L. Collatz, The numerical treatment of differential equations, (Springer-Verlag Berlin 1960) 537
tex2html_wrap_inline220

Michel Goossens Wed Jun 5 00:28:57 METDST 1996