Suppose I have the following system of differential equations: $$ \begin{cases} y'_{1} (t) = y_{2}(t) - y_{1}(t) \\ y'_{2}(t) = -y_{1}(t)y_{2}(t) \end{cases} $$ with the initial conditions: $$ y_{1}(0) = 1,\ y_{2}(0) = 2 $$
I would like to compute $y_{1}(1)$ and $y_2(1)$ using a single step of the Runge-Kutta method with the following Butcher tableau:
$$ \begin{array}{c|cc} 0 & 0 & \\ 1 & 1 & 0 \\ \hline & \frac{1}{2} & \frac{1}{2} \\ \end{array} $$
I've started by writing out my system of equations in vector form:
$\overrightarrow {y}(t) = \begin{bmatrix} y_{1}(t) \\ y_{2}(t) \end{bmatrix} $, $\overrightarrow {f}(t, \overrightarrow {y}(t)) = \begin{bmatrix} y_{2}(t) - y_{1}(t) \\ -y_{1}(t)y_{2}(t) \end{bmatrix} $, and $\overrightarrow {y}(0) = \begin{bmatrix} 1 \\ 2 \end{bmatrix} $
Now I am solving the following system:
$$ \overrightarrow {y}'(t) = \overrightarrow {f}(t, \overrightarrow y(t)) $$
IIUC, this is how you build the solution:
$$ \overrightarrow {y}_{1} = \overrightarrow {y}_{0} + \frac{1}{2} \overrightarrow {k_{1}} + \frac{1}{2} \overrightarrow {k_{2}} $$
where $k_{1}$:
$$ \overrightarrow {k_{1}} = h \cdot \overrightarrow {f}(0 + 0 \cdot h, \overrightarrow {y}(0)) = \overrightarrow {f}(0, \overrightarrow {y}(0)) = \begin{bmatrix} 2 - 1 \\ -1 \cdot 2 \end{bmatrix} = \begin{bmatrix} 1 \\ -2 \end{bmatrix} $$
and $k_{2}$:
$$ \overrightarrow{k_{2}} = h \cdot \overrightarrow{f}(0 + 1 \cdot h, \overrightarrow{y}(0) + 1 \cdot \overrightarrow{k_{1}}) = \overrightarrow{f}(1, \overrightarrow{y}(0) + \overrightarrow{k_{1}}) = \overrightarrow{f}(1, \begin{bmatrix} 2 \\ 0 \end{bmatrix}) $$
I think I've got it right so far (I'd appreciate the notation edits as I'm not really sure I got everything down correctly).
Now, I don't know how to compute this:
$$ \overrightarrow{f}(1, \begin{bmatrix} 2 \\ 0 \end{bmatrix}) $$
According to my understanding, this would lead to evaluating $y_{1}(1)$ and $y_{2}(1)$ as part of my computation. But these are the values I'm trying to compute with my method! Therefore, I must have done something wrong.