I will outline the process and you can fill in the calculations.
We have our system as:
$$
\left\{\begin{array}{l}
\frac{dy}{dx} = z \\
\frac{dz}{dx} = 6y - z
\end{array}\right.
$$
With $y(0)=3$ and $z(0)=1$.
We must do the calculations in a certain order as there are dependencies between the numerical calculations. This order is:
- $k_0 = hf(x_i,y_i,z_i)$
$l_0 = hg(x_i,y_i,z_i)$
$k_1 = hf(x_i+\frac{1}{2}h,y_i+\frac{1}{2}k_0,z_i+\frac{1}{2}l_0)$
$l_1 = hg(x_i+\frac{1}{2}h,y_i+\frac{1}{2}k_0,z_i+\frac{1}{2}l_0)$
$k_2 = hf(x_i+\frac{1}{2}h,y_i+\frac{1}{2}k_1,z_i+\frac{1}{2}l_1)$
$l_2 = hg(x_i+\frac{1}{2}h,y_i+\frac{1}{2}k_1,z_i+\frac{1}{2}l_1)$
$k_3 = hf(x_i+h,y_i+k_2,z_i+l_2)$
$l_3 = hg(x_i+h,y_i+k_2,z_i+l_2)$
$y_{i+1}=y_i + \frac{1}{6}(k_0+2k_1+2k_2+k_3)$
- $z_{i+1}=z_i + \frac{1}{6}(l_0+2l_1+2l_2+l_3)$
We typically need some inputs for the algorithm:
- A range that we want to do the calculations over: $a \le t \le b$, lets use $a = 0, b = 1$.
- The number of steps $N$, say $N = 10$.
- The steps size $h = \dfrac{b-a}{N} = \dfrac{1}{10}$
The system we are solving is:
$$ \frac{dy}{dx} = f(x,y,z) = z \\ \frac{dz}{dx}=g(x,y,z) = 6y - z$$
Doing the calculations using the above order for the first time step $i= 0, t_0 = 0 = x_0$, yields:
- $k_0 = hf(x_0,y_0,z_0) = \dfrac{1}{10}(z_0) = \dfrac{1}{10}(1) = \dfrac{1}{10}$
$l_0 = hg(x_0,y_0,z_0) = \dfrac{1}{10}(6y_0 - z_0) = \dfrac{1}{10}(6 \times 3 - 1) = \dfrac{1}{10}(17)$
$k_1 = hf(x_0+\frac{1}{2}h,y_0+\frac{1}{2}k_0,z_0+\frac{1}{2}l_0) = \dfrac{1}{10}(1 + \dfrac{1}{2}\dfrac{1}{10}(17)) ~~$(You please continue the calcs.)
$l_1 = hg(x_0+\frac{1}{2}h,y_i+\frac{1}{2}k_0,z_0+\frac{1}{2}l_0)$
$k_2 = hf(x_0+\frac{1}{2}h,y_0+\frac{1}{2}k_1,z_0+\frac{1}{2}l_1)$
$l_2 = hg(x_0+\frac{1}{2}h,y_0+\frac{1}{2}k_1,z_0+\frac{1}{2}l_1)$
$k_3 = hf(x_0+h,y_0+k_2,z_0+l_2)$
$l_3 = hg(x_0+h,y_0+k_2,z_0+l_2)$
$y_{1}=y_0 + \frac{1}{6}(k_0+2k_1+2k_2+k_3)$
- $z_{1}=z_0 + \frac{1}{6}(l_0+2l_1+2l_2+l_3)$
You now have $x_1$ and $z_1$ which you need for the next time step after all of the intermediate (in order again). Now, we move on to the next time step $i = 1, t_1 = t_0 + h = \dfrac{1}{10} = x_1$, so we have:
- $k_0 = hf(x_1,y_1,z_1) = \dfrac{1}{10}(z_1)$
$l_0 = hg(x_1,y_1,z_1) = \dfrac{1}{10}(6y_1 - z_1)$
$k_1 = hf(x_1+\frac{1}{2}h,y_1+\frac{1}{2}k_0,z_1+\frac{1}{2}l_0)$
$l_1 = hg(x_1+\frac{1}{2}h,y_1+\frac{1}{2}k_0,z_1+\frac{1}{2}l_0)$
$k_2 = hf(x_1+\frac{1}{2}h,y_1+\frac{1}{2}k_1,z_1+\frac{1}{2}l_1)$
$l_2 = hg(x_1+\frac{1}{2}h,y_1+\frac{1}{2}k_1,z_1+\frac{1}{2}l_1)$
$k_3 = hf(x_1+h,y_1+k_2,z_1+l_2)$
$l_3 = hg(x_1+h,y_1+k_2,z_1+l_2)$
$y_{2}=y_1 + \frac{1}{6}(k_0+2k_1+2k_2+k_3)$
- $z_{2}=z_1 + \frac{1}{6}(l_0+2l_1+2l_2+l_3)$
Continue this for $10$ time steps. Your final result should match closely (assuming the numerical algorithm is stable for this problem) to the exact solution. You will compare $z_{10}$ to the exact result. The exact solution is:
$$y(x) = e^{-3 x}+2 e^{2 x}$$
If we find $y(1) = \dfrac{1}{e^3} + 2 e^2 = 14.8278992662291643974401973...$.
You have an ODE
$$
\frac{dx}{dt} = f(t,x) = (x+1)t
$$
which separates to
$$
\frac{dx}{x+1} = tdt\\
\log |x+1| + C = \frac{t^2}{2}\\
x = C_1 e^{t^2/2} - 1.
$$
With $x(0) = 0$ that gives $C_1 = 1$ and
$$
x(t) = e^{t^2/2} - 1.
$$
Computing the first step we get
$$\begin{aligned}
k_1 &= hf(0, 0) = 0\\
k_2 &= hf\left(\frac{h}{2}, \frac{k_1}{2}\right) = h\frac{h}{2}\\
k_3 &= hf\left(\frac{h}{2}, \frac{k_2}{2}\right) = h\frac{h(h^2 + 4)}{8}\\
k_4 &= hf\left(h, k_3\right) =
h\frac{h(8+4h^2+h^4)}{8}\\
x_{1} &= \frac{1}{6}(k_1 + 2k_2 + 2k_3 + k_4) =
\frac{1}{48} h^2 \left(h^4+6
h^2+24\right) = \\
&= \frac{h^2}{2} + \frac{h^4}{8} + O(h^6).
\end{aligned}
$$
And the exact solution is
$$
x(h) = e^{h^2/2} - 1 = \frac{h^2}{2} + \frac{h^4}{8} + O(h^6).
$$
This agrees with the fact that method is of fourth order, thus the local truncation error is $O(h^5)$.
Best Answer
According to the man the Butcher tables are named after (see these slides), the conditions for order 3 are \begin{align} b_1+b_2+b_3&=1\\ b_2c_2+b_3c_3&=\frac12\\ b_2c_2^2+b_3c_3^2&=\frac13\\ \text{and}\quad b_3a_{32}c_2=\frac16 \end{align} which gives $$b_2c_2(c_3-c_2)=\frac12c_3-\frac13$$ which for $c_2=\frac13$ and $c_3=\frac23$ results in $b_2=0$ and $b_3=\frac34$ which finally has $b_1=\frac14$, $a_{32}=\frac23$, $a_{31}=0$.
This is a (the) third order Heun method, as the type of method Karl Heun (1900) considered were based on combining slope iterations of the form $Δ^m_\nu y = f(x+ε^m_\nuΔx,y+ε^m_\nuΔ^{m+1}_\nu y)Δx$, $m=0,...,s_\nu$ with $ε^{s_\nu}_\nu=0$ into a final update $Δy=\sum \alpha_\nuΔ^0_\nu y$. This third order method Heun, p. 30 gave as