NDSolve
Usage
• NDSolve[eqns, y, {x, , }] finds a numerical solution to the ordinary differential equations eqns for the function y with the independent variable x in the range to . • NDSolve[eqns, y, {x, , }, {t, , }] finds a numerical solution to the partial differential equations eqns. • NDSolve[eqns, {, , ... }, {x, , }] finds numerical solutions for the functions .
Notes
• NDSolve[eqns, y[x], {x, , }] 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 as well as many 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. • The , , etc. can be lists, specifying that y[x] is a function with vector or general list values. • 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 to over which the solution is sought. • The differential equations in NDSolve can involve complex numbers. • NDSolve can solve many differential-algebraic equations, in which some of the eqns are purely algebraic, or some of the variables are implicitly algebraic. • The can be functions of the dependent variables, and need not include all such variables. • The following options can be given: • NDSolve adapts its step size so that the estimated error in the solution is just within the tolerances specified by PrecisionGoal and AccuracyGoal. • The option NormFunction -> f specifies that the estimated errors for each of the should be combined using f[{, , ... }]. • AccuracyGoal effectively specifies the absolute local error allowed at each step in finding a solution, while PrecisionGoal specifies the relative local 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 MaxStepFraction specifies the maximum step to be taken by NDSolve as a fraction of the range of values for each independent variable. • With DependentVariables->Automatic, NDSolve attempts to determine the dependent variables by analyzing the equations given. • Possible explicit settings for the Method option include:
"Adams" | predictor-corrector Adams method with orders 1 through 12 | "BDF" | implicit backward differentiation formulas with orders 1 through 5 | "ExplicitRungeKutta" | adaptive embedded pairs of 2(1) through 9(8) Runge-Kutta methods | "ImplicitRungeKutta" | families of arbitrary-order implicit Runge-Kutta methods | "SymplecticPartitionedRungeKutta" | interleaved Runge-Kutta methods for separable Hamiltonian systems |
• With Method->{"controller", Method->"submethod"} or Method->{"controller", Method->{, , ... }} possible controller methods include:
"Composition" | compose a list of submethods | "DoubleStep" | adapt step size by the double-step method | "Extrapolation" | adapt order and step size using polynomial extrapolation | "FixedStep" | use a constant step size | "OrthogonalProjection" | project solutions to fulfill orthogonal constraints | "Projection" | project solutions to fulfill general constraints | "Splitting" | split equations and use different submethods | "StiffnessSwitching" | switch from explicit to implicit methods if stiffness is detected |
• Methods used mainly as submethods include:
"ExplicitEuler" | forward Euler method | "ExplicitMidpoint" | midpoint rule method | "ExplicitModifiedMidpoint" | midpoint rule method with Gragg smoothing | "LinearlyImplicitEuler" | linearly implicit Euler method | "LinearlyImplicitMidpoint" | linearly implicit midpoint rule method | "LinearlyImplicitModifiedMidpoint" | linearly implicit Bader-smoothed midpoint rule method | "LocallyExact" | numerical approximation to locally exact symbolic solution |
• Advanced Documentation. • New in Version 2; modified in 5.
|