**Remark 5.**


**Example 5.** *The fifth example is the "almost periodic" problem studied by Stiefel and Bettis [30]*

$$z'' + z = 0.001e^{it}, \qquad 0 \le t \le 12\pi \tag{68}$$

*subject to the initial conditions*

$$\begin{cases} z(0) = 1, \\ z'(0) = 0.9995i. \end{cases} \tag{69}$$

*The exact solution is*

$$z\_{\text{exact}}(t) = \cos t + 0.0005t \sin t + i(\sin t - 0.0005t \cos t). \tag{70}$$

*The solution represents motion on a perturbation of a circular orbit in the complex plane; the point z*(*t*) *spirals slowly outwards.*

The first order system equivalent was solved numerically using the above six methods. The results for *h* = *π*/60 and the exact value of *ω* = 1 are given in Table 7.

**Table 7.** The *L*2 norm of the error for the fifth example using the six methods of the previous example for the exact frequency.


It is clear that the methods of trigonometric order 3 are better than the lower order ones. Also the GMS is better than Adams implicit due to Gautschi [1]. Again, the method (51) is superior.

The next two examples demonstrate the quality of method for long-term integration.

**Example 6.** *The sixth example is the cubic oscillator as given in [52]*

$$y''(\mathbf{x}) + y(\mathbf{x}) = \epsilon y(\mathbf{x})^3, \qquad \epsilon = 10^{-3}, \tag{71}$$

*with the initial conditions*

$$\begin{array}{l} y(0) = 1, \\ y'(0) = 0, \end{array} \tag{72}$$

.

*and the frequency ω* = √1 − 0.75*. The exact solution to cubic order in is given in [52]*

$$y(\mathbf{x}) = \cos(\omega \mathbf{x}) + \frac{\epsilon}{128} \left( \cos(3\omega \mathbf{x}) + \cos(\omega \mathbf{x}) \right) + O\left(\epsilon^3\right)$$

The results are given in Table 8. It is clear that the methods that converged gave similar results. The methods (32) and (66) did not converge. The error is computed at *x* = 2000*π*.

**Table 8.** The *L*2 norm of the error for the sixth example using the six methods of the previous example for the exact frequency.


**Example 7.** *The last example is a system of two second order ODEs describing two coupled oscillators with different frequencies, see [52].*

$$\begin{aligned} \mathbf{x}^{\prime\prime}(t) + \mathbf{x}(t) &= 2\epsilon \mathbf{x}(t)\mathbf{y}(t), \\ \mathbf{y}^{\prime\prime}(t) + 2\mathbf{y}(t) &= \epsilon \mathbf{x}(t)^2 + 4\epsilon \mathbf{y}(t)^3, \end{aligned} \tag{73}$$

*with initial conditions*

$$\begin{array}{l} x(0) = 1, \\ x'(0) = 0, \\ y(0) = 1, \\ y'(0) = 0, \end{array} \tag{74}$$

*where* = 10−3*. The frequencies ωx* = 1 *and <sup>ω</sup>y* = √2 − 3 2√2 *can be found in [52]. We have compared the solution using the same methods to RKF45 of Maple. The L*2 *norm of the difference between the solution of RKF45 and the six methods is given in Table 9. Now Adams implicit based method of trigonometric order 3 and our method (51) performed better than the others. Again, the methods due to Neta and Ford diverged.*

**Table 9.** The *L*2 norm of the error for the seventh example using the six methods of the previous example for the exact frequency.

