This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

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

NDSolve

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

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

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

FilledSmallSquare NDSolve gives results in terms of InterpolatingFunction objects.

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

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

FilledSmallSquare NDSolve solves a wide range of ordinary differential equations as well as many partial differential equations.

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

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

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

FilledSmallSquare The , , etc. can be lists, specifying that y[x] is a function with vector or general list values.

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

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

FilledSmallSquare The differential equations in NDSolve can involve complex numbers.

FilledSmallSquare NDSolve can solve many differential-algebraic equations, in which some of the eqns are purely algebraic, or some of the variables are implicitly algebraic.

FilledSmallSquare The can be functions of the dependent variables, and need not include all such variables.

FilledSmallSquare The following options can be given:

FilledSmallSquare NDSolve adapts its step size so that the estimated error in the solution is just within the tolerances specified by PrecisionGoal and AccuracyGoal.

FilledSmallSquare The option NormFunction -> f specifies that the estimated errors for each of the should be combined using f[, , ... ].

FilledSmallSquare AccuracyGoal effectively specifies the absolute local error allowed at each step in finding a solution, while PrecisionGoal specifies the relative local error.

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

FilledSmallSquare The default setting of Automatic for AccuracyGoal and PrecisionGoal is equivalent to WorkingPrecision/2.

FilledSmallSquare The setting for MaxStepFraction specifies the maximum step to be taken by NDSolve as a fraction of the range of values for each independent variable.

FilledSmallSquare With DependentVariables->Automatic, NDSolve attempts to determine the dependent variables by analyzing the equations given.

FilledSmallSquare Possible explicit settings for the Method option include:

FilledSmallSquare With Method->"controller", Method->"submethod" or Method->"controller", Method->, , ... possible controller methods include:

FilledSmallSquare Methods used mainly as submethods include:

FilledSmallSquare See Section 3.9.1 and Section 3.9.7.

FilledSmallSquare Implementation Notes: see Section A.9.4.

FilledSmallSquare See also: DSolve, NIntegrate.

FilledSmallSquare New in Version 2; modified in 5.0.

Advanced Documentation

Further Examples