Legacy Documentation

Mathematica CalcCenter 2 (2002)

This is documentation for an obsolete product.
Current products and services

Documentation / CalculationCenter / Functions / Solvers /

SolveODE

FilledSmallSquare SolveODE[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 SolveODE[eqns, y, {x, xmin, xmax}, {t, tmin, tmax}] finds a numerical solution to the partial differential equations eqns.

FilledSmallSquare SolveODE[eqns, {, , ... }, {x, xmin, xmax}] finds numerical solutions for the functions .

FilledSmallSquare SolveODE gives results in terms of InterpolatingFunction objects.

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

FilledSmallSquare SolveODE solves a wide range of ordinary differential equations, and some 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 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 SolveODE can involve complex numbers.

FilledSmallSquare See also: D, Integrate, ND, NIntegrate, SolveEquation.

Examples

Using InstantCalculators

Here are the InstantCalculators for the SolveODE function. Enter the parameters for your calculation and click Calculate to see the result.

In[1]:=

Out[1]=

In[2]:=

In[3]:=

Out[3]=

In[4]:=

Out[4]=

Entering Commands Directly

You can paste a template for this command via the Text Input button on the SolveODE Function Controller.

This command finds a numerical approximation to a function that is equal to its first derivative at each point x between and , and that has the value when x is . SolveODE returns an InterpolatingFunction object.

In[5]:=

Out[5]=

This can be plotted by making a function from the InterpolatingFunction object.

In[6]:=

Here is another example. This finds a numerical approximation to a function whose square is equal to its first derivative.

In[7]:=

Out[7]=

The warning is appropriate, since this function goes to Infinity as it approaches 1 along the horizontal axis.

In[8]:=

Here is how to see a graph of an approximation to the function which is the reciprocal of its derivative.

Not too surprisingly, this plot looks very much like the square root function.

In[9]:=

Out[9]=

In[10]:=

Solving systems of equations works similarly. For systems of two equations a so-called phase plot is often a good way to visualize the solution. Here is a phase plot that describes the motion of a weakly damped pendulum.

In[11]:=

Out[11]=

In[12]:=

Clear the function definition.

In[13]:=



ja