Midpoint Method Calculator
Advance y′ = f(x,y) with the second-order explicit midpoint method. The solver estimates the slope halfway through each interval and uses that midpoint slope for the full update.
Expression syntax: use explicit multiplication such as 2*y. Supported functions include sin, cos, tan, exp, ln, sqrt and abs.
How this tool works
k₁ = f(xₙ,yₙ), k₂ = f(xₙ+h/2, yₙ+h k₁/2), then yₙ₊₁ = yₙ + h k₂.
Example
For a curved solution such as logistic growth, the midpoint slope gives a much better one-step direction than forward Euler while remaining explicit.
Common questions
Is midpoint method a Runge–Kutta method?
Yes. The explicit midpoint method is a two-stage, second-order Runge–Kutta scheme.
How is midpoint different from Heun?
Both are second-order RK methods. Midpoint samples a slope at the interval midpoint, while Heun averages the start and Euler-predicted endpoint slopes.