Runge–Kutta method

This online calculator implements the Runge-Kutta method, a fourth-order numerical method to solve the first-degree differential equation with a given initial value.

This page exists due to the efforts of the following people:




You can use this calculator to solve first-degree differential equation with a given initial value using the Runge-Kutta method AKA classic Runge-Kutta method (because there is a family of Runge-Kutta methods) or RK4 (because it is a fourth-order method).

To use this method, you should have differential equation in the form
y \prime = f(x,y)
and enter the right side of the equation f(x,y) in the y' field below.

You also need initial value as
and the point x for which you want to approximate the y value.

The last parameter of a method - a step size, is a step to compute the next approximation of a function curve.

Method details can be found below the calculator.

PLANETCALC, Runge–Kutta method

Runge–Kutta method

Digits after the decimal point: 2
Differential equation
Approximate value of y
The file is very large. Browser slowdown may occur during loading and creation.

The Runge-Kutta method

Just like Euler method and Midpoint method, the Runge-Kutta method is a numerical method that starts from an initial point and then takes a short step forward to find the next solution point.

The formula to compute the next point is
y_{n+1}=y_n+\frac{1}{6}(k_1+2k_2+2k_3+k_4) \\ x_{n+1}=x_n+h

where h is step size and

k_1=hf(x_n,y_n) \\ k_2=hf(x_n+\frac{h}{2}, y_n+\frac{k_1}{2}) \\ k_3=hf(x_n+\frac{h}{2}, y_n+\frac{k_2}{2}) \\ k_4=hf(x_n+h, y_n+k_3)

The local truncation error of RK4 is of order O\left(h^5\right), giving a global truncation error of order O\left(h^4\right).

URL copied to clipboard
Creative Commons Attribution/Share-Alike License 3.0 (Unported) PLANETCALC, Runge–Kutta method