D02PXF computes the solution of a system of ordinary differential equations using interpolation anywhere on an integration step taken by
D02PDF.
D02PXF and its associated routines (
D02PDF,
D02PVF,
D02PWF,
D02PYF and
D02PZF) solve the initial value problem for a first-order system of ordinary differential equations. The routines, based on Runge–Kutta methods and derived from RKSUITE (see
Brankin et al. (1991)), integrate
where
$y$ is the vector of
$\mathit{n}$ solution components and
$t$ is the independent variable.
D02PDF computes the solution at the end of an integration step. Using the information computed on that step D02PXF computes the solution by interpolation at any point on that step. It cannot be used if
${\mathbf{METHOD}}=3$ was specified in the call to setup routine
D02PVF.
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
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
The computed values will be of a similar accuracy to that computed by
D02PDF.
None.
This example solves the equation
reposed as
over the range
$\left[0,2\pi \right]$ with initial conditions
${y}_{1}=0.0$ and
${y}_{2}=1.0$. Relative error control is used with threshold values of
$\text{1.0E\u22128}$ for each solution component.
D02PDF is used to integrate the problem one step at a time and D02PXF is used to compute the first component of the solution and its derivative at intervals of length
$\pi /8$ across the range whenever these points lie in one of those integration steps. A moderate order Runge–Kutta method (
${\mathbf{METHOD}}=2$) is also used with tolerances
${\mathbf{TOL}}=\text{1.0E\u22123}$ and
${\mathbf{TOL}}=\text{1.0E\u22124}$ in turn so that solutions may be compared. The value of
$\pi $ is obtained by using
X01AAF.
Note that the length of
WORK is large enough for any valid combination of input arguments to
D02PVF and the length of
WRKINT is large enough for any valid value of the parameter
NWANT.