d02bbf

d02bbf © Numerical Algorithms Group, 2002.

Purpose

D02BBF ODEs, IVP, Runge-Kutta-Merson method, over a range, intermediate output (simple driver)

Synopsis

[x,y,tol,ifail] = d02bbf(x,xend,y,tol,fcn,output<,irelab,ifail>)

Description

 
 The routine integrates a system of ordinary differential 
 equations
 
                y' =f (x,y ,y ,...,y )  i=1,2,...,n
                  i  i    1  2      n
 
 from x = X to x = XEND using a Merson form of the Runge-Kutta 
 method. The system is defined by a subroutine FCN supplied by the
 user, which evaluates f  in terms of x and y ,y ,...,y , and the 
                        i                    1  2      n         
 values of y ,y ,...,y  must be given at x = X.
            1  2      n                      
 
 The solution is returned via the user-supplied routine OUTPUT at 
 a set of points specified by the user. This solution is obtained 
 by quintic Hermite interpolation on solution values produced by 
 the Runge-Kutta method.
 
 The accuracy of the integration and, indirectly, the 
 interpolation is controlled by the parameters TOL and IRELAB.
 

Parameters

d02bbf

Required Input Arguments:

x                                     real
xend                                  real
y (:)                                 real
tol                                   real
fcn                                   function (User-Supplied)
output                                function (User-Supplied)

Optional Input Arguments:                       <Default>

irelab                                integer  0
ifail                                 integer  -1

Output Arguments:

x                                     real
y (:)                                 real
tol                                   real
ifail                                 integer