Ganitha Lokaಗಣಿತ ಲೋಕ ಅಕಾಡೆಮಿ

Differential equations: slope fields, Euler & RK4

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

  1. Choose an equation dy/dx = f(x, y).
  2. Click to set the starting point.
  3. 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.

Related tools

← All maths tools