NDSolve

NDSolve[eqns, y, x, xmin, xmax] finds a numerical solution to the ordinary differential equations eqns for the function y with the independent variable x in the range xmin to xmax.

NDSolve[eqns, y, x, xmin, xmax, t, tmin, tmax] finds a numerical solution to the partial differential equations eqns.

NDSolve[eqns, , , ... , x, xmin, xmax] finds numerical solutions for the functions .

NDSolve gives results in terms of InterpolatingFunction objects.

NDSolve[eqns, y[x], x, xmin, xmax] gives solutions for y[x] rather than for the function y itself.

Differential equations must be stated in terms of derivatives such as y'[x], obtained with D, not total derivatives obtained with Dt.

NDSolve solves a wide range of ordinary differential equations, and some partial differential equations.

In ordinary differential equations the functions must depend only on the single variable x. In partial differential equations they may depend on more than one variable.

The differential equations must contain enough initial or boundary conditions to determine the solutions for the completely.

Initial and boundary conditions are typically stated in form y[] == , y'[] == , etc., but may consist of more complicated equations.

Periodic boundary conditions can be specified using y[] == y[].

The point that appears in the initial or boundary conditions need not lie in the range xmin to xmax over which the solution is sought.

The differential equations in NDSolve can involve complex numbers.

The following options can be given:

The default setting for MaxSteps is 1000 for ordinary differential equations, and 200 for partial differential equations.

NDSolve stops when either the AccuracyGoal or the PrecisionGoal specified is met.

The default setting of Automatic for AccuracyGoal and PrecisionGoal yields goals equal to the setting for WorkingPrecision minus 10 digits.

AccuracyGoal effectively specifies the absolute error allowed in solutions, while PrecisionGoal specifies the relative error.

If solutions must be followed accurately when their values are close to zero, AccuracyGoal should be set larger, or to Infinity.

The setting for InterpolationPrecision specifies the number of digits of precision to use inside the InterpolatingFunction object generated by NDSolve.

The default setting of Automatic for InterpolationPrecision uses the current setting for WorkingPrecision.

See The Mathematica Book: Section 3.9.1 and Section 3.9.7.

Implementation Notes: see section A.9.4.

See also: DSolve, NIntegrate.

Further Examples