Use defaults to solve a celestial mechanics equation with sensitive dependence on initial conditions:

Higher accuracy and precision goals give a different result:

Increasing the goals extends the correct solution further:

Set up a very large system of equations:

Solve for all the dependent variables, but save only the solution for

:

Total number of evaluations:

The distance between successive evaluations; negative distance means a rejected step:

Use

InterpolationOrder->All to get interpolation the same order as the method:

This is more time consuming than the default interpolation order used:

It is much better in between steps:

Features with small relative size in the integration interval can be missed:

Use

MaxStepFraction to ensure features are not missed, independent of interval size:

Integration stops short of the requested interval:

More steps are needed to resolve the solution:

Plot the solution in the phase plane:

The default step control may miss a suddenly varying feature:

A smaller

MaxStepSize setting ensures that

NDSolve catches the feature:

Attempting to compute the number of positive integers less than

misses several events:

Setting a small enough

MaxStepSize ensures that none of the events are missed:

Differences between values of x at successive steps with the default solution method:

With an explicit Runge-Kutta method the step size is changed more often:

Difference order of 8:

With a difference order of 3, the steps are much smaller:

Extrapolation tends to take very large steps:

Plot the actual solution error when using different error estimation norms:

A plot of the best solution:

The solution cannot be completed because the square root function is not sufficiently smooth:

When the solving is delayed the equation is treated as a DAE instead:

For a very large interval, a short-lived feature near the start may be missed:

Setting a sufficiently small step size to start with ensures that the input is not missed:

Plot the solution at each point where a step is taken in the solution process:

Total number of steps involved in finding the solution:

Differences between values of x at successive steps:

Error in the solution to a harmonic oscillator over 100 periods:

When the working precision is increased, the local tolerances are correspondingly increased:

With a large working precision, sometimes the

method is quite effective: