Improved Euler gives
\(y_3 \approx -1.963623\) against Eulerβs
\(-2.078125\text{,}\) with the exact value
\(-1.939789\text{.}\) The errors are
\(0.023834\) and
\(0.138336\text{.}\)
Step 1 (from \(t_0 = 0\text{,}\) \(y_0 = -0.875\)). The starting slope is
\begin{equation*}
f(0, -0.875) = 0 + (-0.875) = -0.875 .
\end{equation*}
Predict with an ordinary Euler step:
\begin{equation*}
\tilde{y}_1 = -0.875 + 0.5(-0.875) = -1.3125 .
\end{equation*}
Read the slope at that guessed landing point:
\begin{equation*}
f(0.5, -1.3125) = 0.5 + (-1.3125) = -0.8125 .
\end{equation*}
Average the two slopes and take the real step:
\begin{equation*}
y_1 = -0.875 + \frac{0.5}{2}\Big[(-0.875) + (-0.8125)\Big] = -0.875 - 0.421875 = -1.296875 .
\end{equation*}
Plain Euler gave \(-1.3125\) here; the exact value is \(-1.293910\text{.}\)
Step 2 (from \(t_1 = 0.5\text{,}\) \(y_1 = -1.296875\)).
\begin{align*}
f(0.5, -1.296875) \amp = -0.796875\\
\tilde{y}_2 \amp = -1.296875 + 0.5(-0.796875) = -1.6953125\\
f(1.0, -1.6953125) \amp = -0.6953125\\
y_2 \amp = -1.296875 + 0.25\Big[(-0.796875) + (-0.6953125)\Big] = -1.669921875
\end{align*}
Step 3 (from \(t_2 = 1.0\text{,}\) \(y_2 = -1.669921875\)).
\begin{align*}
f(1.0, -1.669921875) \amp = -0.669921875\\
\tilde{y}_3 \amp = -1.669921875 + 0.5(-0.669921875) = -2.0048828125\\
f(1.5, -2.0048828125) \amp = -0.5048828125\\
y_3 \amp = -1.669921875 + 0.25\Big[(-0.669921875) + (-0.5048828125)\Big] = -1.963623
\end{align*}
Laying the three runs side by side:
| \(0.0\) |
\(-0.875000\) |
\(-0.875000\) |
\(-0.875000\) |
| \(0.5\) |
\(-1.312500\) |
\(-1.296875\) |
\(-1.293910\) |
| \(1.0\) |
\(-1.718750\) |
\(-1.669922\) |
\(-1.660215\) |
| \(1.5\) |
\(-2.078125\) |
\(-1.963623\) |
\(-1.939789\) |
| error at \(t=1.5\)
|
\(0.138336\) |
\(0.023834\) |
\(0\) |
Same equation, same step size, same three steps β and about
\(6\) times less error.