The Runge-Kutta algorithm can be found on the Wiki.
We are given the DEQ:
$$\frac{dy}{dt}=-\frac{y-t}{2} , y(0) = 1$$
We want to use Runge-Kutta-4 on the interval $[0,3]$ by taking $\Delta t=0.125,\;0.25,\;0.5,$ and $1$ and compare the solutions. You can fill in the details of the calculations.
For $\Delta t= 1$, we get $(t, y)$ values of:
$$\left(
\begin{array}{cc}
0. & 1. \\
1. & 0.5 \\
2. & 0.75 \\
3. & 1.375 \\
\end{array}
\right)$$
For $\Delta t= 0.5$, we get $(t, y)$ values of:
$$\left(
\begin{array}{cc}
0. & 1. \\
0.5 & 0.75 \\
1. & 0.6875 \\
1.5 & 0.765625 \\
2. & 0.949219 \\
2.5 & 1.21191 \\
3. & 1.53394 \\
\end{array}
\right)$$
For $\Delta t= 0.25$, we get $(t, y)$ values of:
$$\left(
\begin{array}{cc}
0. & 1. \\
0.25 & 0.875 \\
0.5 & 0.796875 \\
0.75 & 0.759766 \\
1. & 0.758545 \\
1.25 & 0.788727 \\
1.5 & 0.846386 \\
1.75 & 0.928088 \\
2. & 1.03083 \\
2.25 & 1.15197 \\
2.5 & 1.28923 \\
2.75 & 1.44057 \\
3. & 1.60425 \\
\end{array}
\right)$$
For $\Delta t= 0.125$, we get $(t, y)$ values of:
$$\left(
\begin{array}{cc}
0. & 1. \\
0.125 & 0.9375 \\
0.25 & 0.886719 \\
0.375 & 0.846924 \\
0.5 & 0.817429 \\
0.625 & 0.797589 \\
0.75 & 0.786802 \\
0.875 & 0.784502 \\
1. & 0.790158 \\
1.125 & 0.803274 \\
1.25 & 0.823381 \\
1.375 & 0.850045 \\
1.5 & 0.882855 \\
1.625 & 0.921426 \\
1.75 & 0.9654 \\
1.875 & 1.01444 \\
2. & 1.06822 \\
2.125 & 1.12646 \\
2.25 & 1.18887 \\
2.375 & 1.25519 \\
2.5 & 1.32518 \\
2.625 & 1.3986 \\
2.75 & 1.47525 \\
2.875 & 1.55492 \\
3. & 1.63743 \\
\end{array}
\right)$$
For this DEQ, we can use an Integrating Factor (or several other approaches), to find the closed-form solution:
$$y(t) = 3 e^{-t/2} + t - 2$$
If we compare the value at $t=3$, for each $\Delta t$, we have an error:
$$ 0.29439, 0.13545, 0.0651405, 0.0346605$$
You can do more comparisons as desired, but you see that the error is decreasing as $\Delta t$ is decreasing.
RK4
? Juts Google it if you are lost. $\endgroup$