# "DoubleStep" Method for NDSolve

## Introduction

The method 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.

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

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

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

## Examples

In[5]:= |

In[7]:= |

In[8]:= |

### Extending Built-in Methods

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

In[9]:= |

Out[9]= |

In[10]:= |

Out[10]= |

In[11]:= |

Out[11]= |

In[12]:= |

Out[12]= |

### 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.

In[13]:= |

Method properties used by are now described.

#### Order and Symmetry

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

In[15]:= |

In[16]:= |

Out[16]= |

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 method assumes by default that the base integrator is not symmetric.

In[17]:= |

#### Stiffness Detection

Details of the scheme used for stiffness detection can be found within "StiffnessTest Method Option for NDSolve".

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

Computing the exact linear stability boundary of a method under extrapolation can be quite complicated. Therefore a default value is selected which works for all methods. This corresponds to considering the order power series approximation to the exponential at 0 and ignoring higher order terms.

- If is True then a generic value is selected corresponding to a method of order (symmetric) or .

- If is False then the property of the base method is checked. If no value has been specified then a default for a method of order is selected.

In[18]:= |

Out[18]= |

In[20]:= |

In[21]:= |

#### Higher Order

The following example extrapolates the classical Runge-Kutta method of order four using two applications of (3).

The inner specification of constructs a method of order five.

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

In[22]:= |

Out[22]= |

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

## Option Summary

option name | default value | |

"LocalExtrapolation" | True | specify whether to advance the solution using local extrapolation according to (4) |

Method | None | specify the method to use as the base integration scheme |

"StepSizeRatioBounds" | {,4} | specify the bounds on a relative change in the new step size from the current step size as low ≤ ≤ high |

"StepSizeSafetyFactors" | Automatic | specify the safety factors to incorporate into the error estimate (5) used for adaptive step sizes |

"StiffnessTest" | Automatic | specify whether to use the stiffness detection capability |

The default setting of Automatic for the option indicates that the stiffness test is activated if a nonstiff base method is used.

The default setting of Automatic for the option uses the values for a stiff base method and for a nonstiff base method.