The fourth order Runge-Kutta ($RK4$) method to solve an ordinary differential equation $\frac{dy}{dx}=f\left ( x,y \right )$ is given as
$$y\left ( x+h \right )=y\left ( x \right )+\frac{1}{6}\left ( k_{1}+2k_{2}+2k_{3}+k_{4} \right )$$
$$k_{1}=hf\left ( x,y \right )$$
$$k_{2}=hf\left ( x+\frac{h}{2},y+\frac{k_{1}}{2}\right )$$
$$k_{3}=hf\left ( x+\frac{h}{2},y+\frac{k_{2}}{2}\right )$$
$$k_{4}=hf\left ( x+h,y+{k_{3}}\right )$$
For a special case when the function $f$ depends solely on $x$, the above $RK4$ method reduces to
- Euler’s explicit method
- Trapezoidal rule
- Euler’s implicit method
- Simpson’s $1/3$ rule