Question 23.3: Use the non-self-starting Heun method to perform the same co...
Use the non-self-starting Heun method to perform the same computations as were performed previously in Example 22.2 using Heun’s method. That is, integrate y′ = 4e^{0.8t} − 0.5y from t = 0 to 4 with a step size of 1. As with Example 22.2, the initial condition at t = 0 is y = 2. However, because we are now dealing with a multistep method, we require the additional information that y is equal to –0.3929953 at t = –1.
Learn more on how we answer questions.
The predictor [Eq. (23.7)] is used to extrapolate linearly from t = –1 to 1:
Predictor (Fig. 23.7a): y_{i+1}^{0}=y_{i-1}^m+f\left(t_i, y_i^m\right) 2 h (23.7)
y_1^0=-0.3929953+\left[4e^{0.8(0)}-0.5(2)\right] 2=5.607005
The corrector [Eq. (23.8)] is then used to compute the value:
Corrector (Fig. 23.7b): \begin{array}{r} y_{i+1}^j=y_i^m+\frac{f\left(t_i, y_i^m\right)+f\left(t_{i+1}, y_{i+1}^{j-1}\right)}{2} h \quad \quad (23.8) \\ \quad \quad \quad \quad (\text { for } j=1,2, \ldots, m) \end{array}
y_1^1=2+\frac{4 e^{0.8(0)}-0.5(2)+4 e^{0.8(1)}-0.5(5.607005)}{2} 1=6.549331which represents a true percent relative error of –5.73% (true value = 6.194631). This error is somewhat smaller than the value of –8.18% incurred in the self-starting Heun.
Now, Eq. (23.8) can be applied iteratively to improve the solution:
y_1^2=2+\frac{3+4 e^{0.8(1)}-0.5(6.549331)}{2}1=6.313749
which represents an error of –1.92%. An approximate estimate of the error can be determined using Eq. (23.9):
\left|\varepsilon_a\right|=\left|\frac{y_{i+1}^j-y_{i+1}^{j-1}} {y_{i+1}^j}\right| \times 100 \% (23.9)
\left|\varepsilon_a\right|=\left|\frac{6.313749-6.549331}{6.313749}\right| \times 100 \%=3.7 \%Equation (23.8) can be applied iteratively until εa falls below a prespecified value of ε_s. As was the case with the Heun method (recall Example 22.2), the iterations converge on a value of 6.36087 (ε_t = –2.68%). However, because the initial predictor value is more accurate, the multistep method converges at a somewhat faster rate.
For the second step, the predictor is
which is superior to the prediction of 12.0826 (ε_t = 18%) that was computed with the original Heun method. The first corrector yields 15.76693 (ε_t = 6.8%), and subsequent iterations converge on the same result as was obtained with the self-starting Heun method: 15.30224 (ε_t = –3.09%). As with the previous step, the rate of convergence of the corrector is somewhat improved because of the better initial prediction.
