I have this equation $y_{n+1} = y_n + hf(y_n + \frac{h}{2} f(y_n))$, I am thinking of letting $Y_i = y_n + \frac{h}{2}f(y_n)$ and then having it written as $Y_1 = y_n + \frac{h}{2}f(Y_1)$, does anyone know if this is the right idea?
Thanks
I have this equation $y_{n+1} = y_n + hf(y_n + \frac{h}{2} f(y_n))$, I am thinking of letting $Y_i = y_n + \frac{h}{2}f(y_n)$ and then having it written as $Y_1 = y_n + \frac{h}{2}f(Y_1)$, does anyone know if this is the right idea?
Thanks
The first equation you write fully describes the method (this is the explicit midpoint rule). We also see that this is an explicit Runge Kutta method. In all such methods the first stage derivative $k_1$ must be equal to $f(y_n)$, so $c_1 = a_{1,1} = 0$.
We see that this equation uses only one stage derivative $k_i$, and that this $k_2 = f(y_n + \frac{1}{2} hf(y_n)) = f(y_n + \frac{1}{2} h k_1)$. Therefore, $b_1 =0, b_2 = 1$, and $a_{2,1} = 1/2 = c_2$.
Therefore, the Butcher table consists of $c^T = (0, 1/2), b^T = (0, 1), A = \begin{bmatrix} 0 & 0 \\ 1/2 & 0\end{bmatrix} $.