solveODE

solveODE(func, tspan, y0)

solveODE(func, tspan, y0, options)

Try it yourself:

See also:

solveODE(): Solving Ordinary Differential Equations

solveODE() solves an ordinary differential equation numerically from a model and initial conditions. It is useful for motion, population models, circuits, and dynamic systems.

Model inputs matter

Specify the derivative rule, independent-variable interval, and initial state clearly. Numerical solutions depend on step size and tolerance; compare results at refined settings before trusting sensitive conclusions. Use derivative() for symbolic differentiation, not as a replacement for an ODE solve.

Inspect output shape with size(), summarize trajectories with mean() where appropriate, and use abs() for error magnitude checks.

Try Solve ODE in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions