Function Repository Resource:

# ODEViewer

Dynamically visualize an ordinary differential equation (ODE) or system of ODEs

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["ODEViewer"][eqns, init, deps, {t}] creates a dynamic visualization and computes properties of the ordinary differential equation system eqns, with initial conditions init, written in terms of dependent variables deps and independent variable t. ResourceFunction["ODEViewer"][eqns, init, dep, {t, t1, t2}] creates a dynamic visualization of eqns with t varying from t1 to t2.

## Details

Only first order differential equations are allowed.
Nonlinear differential equations are supported.
Stiff systems are supported.
The plot range is computed using SuggestPlotRange.
Sometimes SuggestPlotRange can not give an optimal range.
Locator for the initial values may be outside the graphic.
Eigensystem is computed only for linear equations.
Node types are recognized only for linear equations.
Locators can be dragged, showing changing initial values at the header.
Select Time Series/Slope field to switch between different views of the solutions.
Display options can turn on/off grid lines and the popup menu selects the number of them.
Interval sliders use the Method "Push".
In the case of multiple solutions, only one slope field is plotted.
If integration fails, empty graphics are shown.
When the locator is outside the suggested plot range, it is possible that the corresponding value of time can not be found.
ODEViewer takes the same options as NDSolve.

## Examples

### Basic Examples (3)

Visualize the slope field of a simple equation and it's solution for a given initial condition:

 In[1]:=
 Out[1]=

Visualize a system in three dimensions:

 In[2]:=
 Out[2]=

Visualize the slope field for a non-linear system:

 In[3]:=
 Out[3]=

### Scope (2)

A stiff system:

 In[4]:=
 Out[4]=

A multiple solution case:

 In[5]:=
 Out[5]=

### Possible Issues (2)

A linear system, the plot range is calculated automatically, but the plot range is not optimal:

 In[6]:=
 Out[6]=

The same system, with a explicit plot range:

 In[7]:=
 Out[7]=

If something fails shows nothing:

 In[8]:=
 Out[8]=

## Publisher

Wolfram|Alpha Math Team

## Version History

• 2.0.0 – 23 March 2023
• 1.0.1 – 18 October 2022
• 1.0.0 – 14 October 2022

## Author Notes

To view the full source code for ODEViewer, evaluate the following: