I understand how to apply 4th order Runge-Kutta and understand Taylor series (Maclaurin series, to be precise). However, I cannot fully understand how the formula of Taylor series results in the algorithm/applied formulas of Runge Kutta.
What is the actual relation? I think Runge-Kutta is based on Taylor series, right?
Some easy computations to verify the order of the method, it is by far not a proof but shows why the two steps at time increment $h/2$ are needed: Consider a linear system $y'=f(x,y)=Ay$ with an $n\times n$ matrix $A$. Then \begin{align} k_1&=f(x,y)&&=Ay\\ k_2&=f(x+h/2, y+h/2·k_1)&&=Ay+\frac h2 A^2y\\ k_3&=f(x+h/2, y+h/2·k_2)&&=Ay+\frac h2 A^2y+\frac{h^2}4 A^3y\\ k_4&=f(x+h, y+h·k_3) &&=Ay+hA^2y+\frac{h^2}2A^3y+\frac{h^3}4A^4y\\ \\ y_+&=y+\frac h6·(k_1+2k_2+2k_3+k_4)&&=y+hAy+\frac{h^2}2A^2y+\frac{h^3}6A^3y+\frac{h^4}{24}A^4y \end{align} which gives the exact partial sum of degree $4$ for the matrix exponential $e^{hA}$ of the exact solution. Which means that the local error is $O(h^5)$, as necessary for a method of order $4$.