homechevron_rightStudychevron_rightMath

# Runge–Kutta method

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

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 in fact there is a family of Runge-Kutta methods) or RK4 (because it is 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
$y(x_0)=y_0$
and the point $x$ for which you want to approximate the $y$ value.

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

Method details can be found below the calculator.

#### Runge–Kutta method

Digits after the decimal point: 2
Differential equation

Approximate value of y

### The Runge-Kutta method

Just like Euler method and Midpoint method, the Runge-Kutta method is a numerical method which 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
PLANETCALC, Runge–Kutta method