Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation  / Mathematica  / Built-in Functions  / Numerical Computation  / Equation Solving  / NDSolve Advanced Documentation  /

DoubleStep

Introduction

The method DoubleStep performs a single application of Richardson's extrapolation for any one step integration method.

Although it is not always optimal, it is a general scheme for equipping a method with an error estimate (hence adaptivity in the step size) and extrapolating to increase the order of local accuracy.

DoubleStep is a special case of extrapolation but has been implemented as a separate method for efficiency.

Given a method of order :

Take a step of size to get a solution .

Take two steps of size to get a solution .

Find an error estimate of order p as:

The correction term can be used for error estimation enabling an adaptive step size scheme for any base method.

Either use for the new solution, or form an improved approximation using local extrapolation as:

If the base numerical integration method is symmetric then the improved approximation has order , otherwise it has order .

Examples

Load some package with example problems and utility functions.

Select a non-stiff problem from the package.

Select a stiff problem from the package.

Extending built-in methods

The method ExplicitEuler carries out one integration step using Euler's method. It has no local error control and hence uses fixed step sizes.

This integrates a differential system using one application of Richardson's extrapolation with the base method ExplicitEuler. The local error estimate (-1) is used to dynamically adjust the step size throughout the integration.

This illustrates how the step size varies during the numerical integration.

The stiffness detection device (described within ) ascertains that the ExplicitEuler method is restricted by stability rather than local accuracy.

NDSolve::ndstf: "At \!\(T\) == \!\(0.006547599736760706`\), system appears to be stiff. Methods Automatic, BDF or StiffnessSwitching may be more appropriate."

An alternative base method is more appropriate for this problem.

User defined methods and method properties

Integration methods can be added to the NDSolve framework.

In order for these to work like built-in methods it can be necessary to specify various method properties. These properties can then be used by other methods to build up compound integrators.

Here is how to define a top level plug-in for the classical Runge-Kutta method (see for more details).

Method properties used by DoubleStep are now described.

Order and symmetry

This attempts to integrate a system using one application of Richardson's extrapolation based on the classical Runge-Kutta method.

NDSolve::mtdp: "\!\(ClassicalRungeKutta\) does not have a correctly defined property \!\(\"DifferenceOrder\"\) in \!\(\"DoubleStep\"\)."

NDSolve::initf: "The initialization of the method \!\(NDSolve`DoubleStep\) failed."

Without knowing the order of the base method, DoubleStep is unable to carry out Richardson's extrapolation.

This defines a method property to communicate to the framework that the classical Runge-Kutta method has order four.

The method DoubleStep is now able to ascertain that ClassicalRungeKutta is of order four and can use this information when refining the solution and estimating the local error

The order of the result of Richardson's extrapolation depends on whether the extrapolated method has a local error expansion in powers of or (the latter occurs if the base method is symmetric).

If no method property for symmetry is defined the DoubleStep method assumes by default that the base integrator is not symmetric.

This explicitly specifies that the classical Runge-Kutta method is not symmetric using the SymmetricMethodQ property.

Stiffness detection

Stiffness detection relies on knowledge of the linear stability boundary of the method, which has not been defined.

NDSolve::mtdp: "\!\(ClassicalRungeKutta\) does not have a correctly defined property \!\(\"LinearStabilityBoundary\"\) in \!\(\"DoubleStep\"\)."

NDSolve::initf: "The initialization of the method \!\(NDSolve`DoubleStep\) failed."

This tells the framework what the linear stability boundary for the method is.

The scheme is now equipped with stiffness detection.

NDSolve::ndstf: "At \!\(t\) == \!\(0.006697138076936011`\), system appears to be stiff. Methods Automatic, BDF or StiffnessSwitching may be more appropriate."

DoubleStep assumes by default that a method is not appropriate for stiff problems (and hence uses stiffness detection) when no StiffMethodQ property is specified. This shows how to define the property.

Higher order

The following example extrapolates the classical Runge-Kutta method of order four to get a method of order five (inner specification of DoubleStep).

A second application of DoubleStep is used to obtain a method of order six which uses adaptive step sizes.

In general the method Extrapolation is more appropriate for constructing high order integration schemes from low order methods.

Option summary

Options of the method DoubleStep.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: