Solving dy/dx = f(x, y) step by step

Watch three methods
chase one curve

Type a first-order differential equation, a starting point and a step size. Euler, Heun and Runge-Kutta 4 each march across the interval, and the page shows where each lands, how far off it is and how the curves compare.

Enter your figures and read the result

Type dy/dx using x and y. The worked example is dy/dx = x + y with y(0) = 1, whose exact solution is known. Saved on this device only.

Loading Differential Equation Numerical Solver. If nothing appears, turn on JavaScript.

What you get

Enrichment · STEM ExplorationsOpen to everyone · no sign-in

What you finish with
A worked-out result for your own entry (a headline figure, tiles, tables and a drawing where one helps), as a printout, a spreadsheet (.csv) or a saved file.
Who it is for
Students in calculus, differential equations and numerical methods, and teachers who want to show how step size and method order change accuracy.
Format
Browser tool for a phone, tablet or computer: type or paste, the result updates as you type. Print, spreadsheet (.csv), save to a file and open it again.
Access
Open to everyone with the link: no account, no sign-in, nothing to buy and nothing to install. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The STEM Explorations space in Caveat Enrichment.
Support
Questions about access, an order or a correction: team@caveatacademic.com.

How to use it

  1. Load the worked example to see how it reads, or start with your own entry.
  2. Type or paste into the fields; the result updates as you type.
  3. Read the headline, the tiles and the tables.
  4. Try a second case from the buttons above the fields.
  5. Print the result, download a spreadsheet or save the entry to a file.

Solve the equation

How it works

The worked example from the equation to the comparison with its exact solution.

Order of a method

A method of order p has an error that shrinks like the step to the power p. Euler is order 1, Heun order 2 and the classical Runge-Kutta method order 4. That is why a coarse step wrecks Euler long before it troubles Runge-Kutta.

When a numerical solution misleads

A step that is too large can make a stable equation look unstable, and some equations are stiff and need special methods. If the three curves disagree sharply, shorten the step and watch which ones settle together.

Sources

  1. Burden, R. L., & Faires, J. D. Numerical Analysis (any recent edition), chapter 5, Initial-value problems for ordinary differential equations: Euler, Heun (modified Euler) and Runge-Kutta methods.
  2. Boyce, W. E., DiPrima, R. C., & Meade, D. B. Elementary Differential Equations and Boundary Value Problems, chapter 8, Numerical methods. Exact value for the worked example: y(1) = 2e - 2, checked independently.

The worked examples are invented for illustration. What you type is saved only in this browser and is never sent to Caveat. Support: team@caveatacademic.com.

Written with AI, then checked before it is published. How we checkFound a mistake? Report it and we fix it, or refund you.Cancel anytime.