where is the vector of solution components and is the independent variable.
nag_ode_ivp_rkts_onestep (d02pfc) computes the solution at the end of an integration step. Using the information computed on that step nag_ode_ivp_rkts_interp (d02psc) computes the solution by interpolation at any point on that step. It cannot be used if was specified in the call to setup function nag_ode_ivp_rkts_setup (d02pqc).
Brankin R W, Gladwell I and Shampine L F (1991) RKSUITE: A suite of Runge–Kutta codes for the initial value problems for ODEs SoftReport 91-S1 Southern Methodist University
n – IntegerInput
On entry: , the number of ordinary differential equations in the system to be solved by the integration function.
twant – doubleInput
On entry: , the value of the independent variable where a solution is desired.
reqest – Nag_SolDerivInput
On entry: determines whether the solution and/or its first derivative are to be computed
compute approximate solution.
compute approximate first derivative.
compute approximate solution and first derivative.
, or .
nwant – IntegerInput
On entry: the number of components of the solution to be computed. The first nwant components are evaluated.
Pointer to structure of type Nag_Comm; the following members are relevant to f.
user – double *
iuser – Integer *
p – Pointer
The type Pointer will be void *. Before calling nag_ode_ivp_rkts_interp (d02psc) you may allocate memory and initialize these pointers with various quantities for use by f when called from nag_ode_ivp_rkts_interp (d02psc) (see Section 18.104.22.168 in the Essential Introduction).
On exit: information about the integration for use on subsequent calls to nag_ode_ivp_rkts_onestep (d02pfc), nag_ode_ivp_rkts_interp (d02psc) or other associated functions.
fail – NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
On entry, argument had an illegal value.
On entry, .
Constraint: for , .
On entry, and . Constraint: .
On entry, , and .
Constraint: for , .
On entry, , but the value passed to the setup function was .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
You cannot call this function before you have called the step integrator.
On entry, a previous call to the setup function has not been made or the communication arrays have become corrupted, or a catastrophic error has already been detected elsewhere. You cannot continue integrating the problem.
You cannot call this function after the integrator has returned an error.
You cannot call this function when you have specified, in the setup function, that the range integrator will be used.
in setup, but interpolation is not available for this method. Either use in setup or use reset function to force the integrator to step to particular points.
nag_ode_ivp_rkts_interp (d02psc) is not threaded by NAG in any implementation.
nag_ode_ivp_rkts_interp (d02psc) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the Users' Note for your implementation for any additional implementation-specific information.
9 Further Comments
This example solves the equation
over the range with initial conditions and . Relative error control is used with threshold values of for each solution component. nag_ode_ivp_rkts_onestep (d02pfc) is used to integrate the problem one step at a time and nag_ode_ivp_rkts_interp (d02psc) is used to compute the first component of the solution and its derivative at intervals of length across the range whenever these points lie in one of those integration steps. A low order Runge–Kutta method () is also used with tolerances and in turn so that solutions may be compared.