Draw the slope (direction) field of a first-order differential equation and compare Euler’s method and fourth-order Runge–Kutta with the accurate solution from any starting point.
Loading the simulation…
How to use
- Choose an equation dy/dx = f(x, y).
- Click to set the starting point.
- Change the step size h.
Formula
$y_{n+1} = y_n + h f(x_n, y_n) \;\text{(Euler)}$
Level: UG (BSc / BE / BCA), PG (MSc / KSET / NET) · Topic: Differential equations
Frequently asked questions
Why is RK4 more accurate than Euler?
It averages four slope estimates per step; its error falls like h⁴ instead of h.
What is a slope field?
Short line segments showing the slope dy/dx at each point.