Scientific Research

An Academic Publisher

Consistency and Stability Issues in the Numerical Integration of the First and Second Order Initial Value Problem ()

^{}

Keywords

Share and Cite:

*Applied Mathematics*,

**10**, 676-690. doi: 10.4236/am.2019.108048.

1. Introduction

Numerically following the solution of an evolution equation in time is one of the central tasks of numerical analysis and has received over the years vast and repeated attention, see [1] [2] . In this note we consider some essential and interesting, but possibly not widely known, aspects of the numerical solution of initial value problems. The rationale behind the procedures advocated here for the accurate and stable solution of the initial value problem, is often to greatly facilitate their introduction in the classroom. For the first order problem, we consider the usefulness of implicit methods, see [3] , for capturing multiple solutions emanating from a point of bifurcations, and also simple procedures for determining the accuracy and stability of multistep methods. For the second order problem, see [4] , we consider the means of slowing and advancing the computed speed of the numerical solution of the equation of motion.

2. The Generalized Mean Value Theorem—Taylor’s Theorem

The decisive significance of Taylor’s theorem (as can be looked up in any elementary calculus textbook) to applied mathematics in general, and to numerical analysis in particular, is that it ascertains that every differential function looks locally like a polynomial. Polynomials having the advantage of being easily computed, differentiated and integrated, relieving us by their use of the burden of possibly high complications in the symbolic manipulation of functions, often only implicitly given as the solution of an initial value problem (IVP) or a boundary value problem (BVP). We look at this theorem here from an unusual angle.

The mean value theorem (MVT) states that if function f(x), $f\left(0\right)=0$ , ${f}^{\prime}\left(0\right)\ne 0$ , is continuous in the closed interval [0, x] and differentiable on the open interval (0, x), then point ξ exists, strictly inside the interval, $0<\xi <x$ , at which the slope of the chord equals to the slope of the tangent line to f(x) at point ξ, or

$\frac{f\left(x\right)-f\left(0\right)}{x}={f}^{\prime}\left(\xi \right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{or}\text{\hspace{0.17em}}\text{\hspace{0.17em}}f\left(x\right)=x{f}^{\prime}\left(\xi \right),\text{\hspace{0.17em}}0<\xi <x$ (1)

implying that f(x) is nearly linear near x = 0.

The MVT theorem is a direct result, of the geometrically intuitively plausible, Rolle’s theorem. The generalized mean value theorem (GMVT) is a result of the application of the MVT (or Rolle’s theorem) to the higher order derivative functions of f(x). Here it is in its most concise form: Let function f(x) be continuous at x = 0, and such that

$f\left(0\right)=0,{f}^{\prime}\left(0\right)=0,{f}^{\u2033}\left(0\right)=0,\cdots ,{f}^{\left(n-1\right)}\left(0\right)=0,{f}^{\left(n\right)}\left(0\right)\ne 0.$ (2)

Then, function f(x) may be expressed in the form

$f\left(x\right)=\frac{1}{n!}{x}^{n}{f}^{\left(n\right)}\left(\xi \right),\text{\hspace{0.17em}}0<\xi <x$ (3)

implying that if f^{(n)}(x) is bounded near x = 0, then f(x), like x^{n}, is small if
$\left|x\right|\ll \text{1}$ .

3. Where Is ξ

We consider first the simplest case of n = 1, for which Equation (3) is

$f\left(x\right)=x{f}^{\prime}\left(\xi \right),\text{\hspace{0.17em}}f\left(0\right)=0,\text{\hspace{0.17em}}{f}^{\prime}\left(0\right)\ne 0,\text{\hspace{0.17em}}0<\xi <x$ (4)

and take

$f\left(x\right)=Ax+B{x}^{2}+C{x}^{3},\text{\hspace{0.17em}}{f}^{\prime}\left(x\right)=A+2Bx+3C{x}^{2}.$ (5)

such that $A={f}^{\prime}\left(0\right),B={f}^{\u2033}\left(0\right)/2!,C={f}^{\u2034}\left(0\right)/3!$ .

We further assume that, approximately

$\xi =kx+m{x}^{2}$ (6)

and have from this that

$f\left(x\right)-x{f}^{\prime}\left(\xi \right)=B\left(1-2k\right){x}^{2}+\left(G-3G{k}^{2}-2Bm\right){x}^{3}+O\left({x}^{4}\right).$ (7)

Annulling the first two terms of the above equation results in

$k=\frac{1}{2},\text{\hspace{0.17em}}\text{\hspace{0.17em}}m=\frac{1}{8}\frac{G}{B},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{or}\text{\hspace{0.17em}}\text{\hspace{0.17em}}m=\frac{1}{24}\frac{{f}^{\u2034}\left(0\right)}{{f}^{\u2033}\left(0\right)}$ (8)

or generally, for any n in Equation (2)

$\xi =\frac{1}{n+1}x,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}\left|x\right|\ll 1.$ (9)

4. Polynomial Approximations

Some examples will convince us of the decisive usefulness of the GMVT theorem to numerical analysis. As a first example, we use the theorem to get a good polynomial approximation to e^{x} near x = 0. We start by writing

$r\left(x\right)={\text{e}}^{x}-\left(a+bx\right)$ (10)

and propose to fix free parameters a and b such that $r\left(0\right)=0$ , ${r}^{\prime}\left(0\right)=0$ , namely, such that

$r\left(x\right)={\text{e}}^{x}-\left(1+x\right),\text{\hspace{0.17em}}{r}^{\u2033}\left(x\right)={\text{e}}^{x},\text{\hspace{0.17em}}{r}^{\u2033}\left(0\right)=1\ne 0.$ (11)

Now, by fundamental Equation (3), we may write r(x) of $r\left(0\right)=0$ , ${r}^{\prime}\left(0\right)=0$ , as

$r\left(x\right)=\frac{1}{2}{x}^{2}{r}^{\u2033}\left(\xi \right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{or}\text{\hspace{0.17em}}\text{\hspace{0.17em}}{\text{e}}^{x}=1+x+\frac{1}{2}{x}^{2}{\text{e}}^{\xi},0<\xi <x$ (12)

providing us with a good linear polynomial approximation to e^{x} in the vicinity of x = 0.

Moreover, since e^{x} is an increasing function, we readily obtain from Equation (12) the strict inequalities

$1+x+\frac{1}{2}{x}^{2}<{\text{e}}^{x}<1+x+\frac{1}{2}{x}^{2}{\text{e}}^{x}$ (13)

or

$1+x+\frac{1}{2}{x}^{2}<{\text{e}}^{x}<\frac{1+x}{1-\frac{1}{2}{x}^{2}}.$ (14)

5. Improving the Polynomial Approximation with ξ

The reason the lower bound on e^{x} in the above inequality (14) is better then the upper bound is due to the fact that as the order of the approximation increases, ξ moves rather ever closer to the osculation point x = 0. Here, since
$r\left(0\right)=0$ ,
${r}^{\prime}\left(0\right)=0$ ,
${r}^{\u2033}\left(0\right)\ne 0$ , then, according to Equation (9), ξ = x/3, nearly, if
$\left|x\right|\ll \text{1}$ .

Replacing e^{ξ} in Equation (12) by 1 + ξ, with ξ = x/3, we obtain, forthwith, the better approximation

${\text{e}}^{x}=1+x+\frac{1}{2}{x}^{2}\left(1+\xi \right)=1+x+\frac{1}{2}{x}^{2}\left(1+\frac{1}{3}x\right)=1+x+\frac{1}{2}{x}^{2}+\frac{1}{6}{x}^{3}.$ (15)

Otherwise we may start from

${\text{e}}^{x}=1+x+\frac{1}{2}{x}^{2}+\frac{1}{6}{x}^{3}{\text{e}}^{\xi},\text{\hspace{0.17em}}0<\xi <x,$ (16)

take $\xi =kx+m{x}^{\text{2}}$ , expand further

${\text{e}}^{\xi}=1+kx+\left(\frac{1}{2}{k}^{2}+m\right){x}^{2}+\left(\frac{1}{6}{k}^{3}+km\right){x}^{3}+\left(\frac{1}{24}{k}^{4}+\frac{1}{2}{k}^{2}m+\frac{1}{2}{m}^{2}\right){x}^{4}+\cdots $ (17)

or

${\text{e}}^{x}=1+x+\frac{1}{2}{x}^{2}+\frac{1}{6}{x}^{3}+\frac{k}{6}{x}^{4}+\left(\frac{{k}^{2}}{12}+\frac{m}{6}\right){x}^{5}+\left(\frac{{k}^{3}}{36}+\frac{km}{6}\right){x}^{6}+\cdots $ (18)

To have in the above equation as many correct terms as possible we set

$\frac{k\text{}}{6}=\frac{1}{4!}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left(\frac{{k}^{2}}{12}+\frac{m}{6}\right)=\frac{1}{5!}$ (19)

resulting in

$\xi =\frac{1}{4}x+\frac{3}{160}{x}^{2}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x\ll 1.$ (20)

6. Trigonometric Function Approximations

Taylor’s theorem is not restricted to polynomials, but may be advantageously used to directly construct other approximating functions. For instance, we may start with

$r\left(x\right)=\sqrt{1+x}-\left(a\mathrm{cos}\left(x\right)+b\mathrm{sin}\left(x\right)\right)$ (21)

and use free numbers a and b to enforce $r\left(0\right)=0$ and ${r}^{\prime}\left(0\right)=0$ , to have

$\begin{array}{l}r\left(x\right)=\sqrt{1+x}-\left(\mathrm{cos}\left(x\right)+\frac{1}{2}\mathrm{sin}\left(x\right)\right),\\ {r}^{\u2033}\left(x\right)=-\frac{1}{4}{\left(1+x\right)}^{-\frac{3}{2}}+\mathrm{cos}\left(x\right)+\frac{1}{2}\mathrm{sin}\left(x\right),{r}^{\u2033}\left(0\right)=\frac{3}{4}\ne 0.\end{array}$ (22)

Consequently, the Taylor, or the GMVT, form of r(x) is

$r\left(x\right)=\frac{1}{2}{x}^{2}{r}^{\u2033}\left(\xi \right)=\frac{1}{2}{x}^{2}\left(-\frac{1}{4}{\left(1+\xi \right)}^{-\frac{3}{2}}+\mathrm{cos}\left(\xi \right)+\frac{1}{2}\mathrm{sin}\left(\xi \right)\right),0<\xi <x$ (23)

or, asymptotically, as $x\to 0,\xi \to 0$ ,

$\sqrt{1+x}=\mathrm{cos}\left(x\right)+\frac{1}{2}\mathrm{sin}\left(x\right)+\frac{3}{8}{x}^{2},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}\left|x\right|\ll \text{1}$ (24)

7. Rational Function Approximations

Rational approximations are also desirable, and efficient. Here we start with, say

$r\left(x\right)={\text{e}}^{x}-\frac{a+bx}{1+cx}$ (25)

of the three free parameters a, b, c. Imposing on r(x) the conditions

$r\left(0\right)=0,{r}^{\prime}\left(0\right)=0,{r}^{\u2033}\left(0\right)=0$ (26)

we readily have

${\text{e}}^{x}=\frac{2+x}{2-x}-\frac{1}{12}{x}^{3},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x\ll 1.$ (27)

If the point of osculation is not x = 0, but x = a, then x in the theorem is shifted to x − a.

8. First Order Linear Homogeneous Recursions

In the numerical integration of IVPs we are constantly confronted by the need to solve linear homogeneous recursions.

The first order, homogeneous, recursion

${y}_{n+1}+b{y}_{n}=0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}n=0,1,2,\cdots $ (28)

where b is a constants independent of n, is brought, without much ado, to the explicit, closed-form, representation

${y}_{n}={\left(-b\right)}^{n}{y}_{0}$ (29)

by merely repeating the recursion. We note that if
$\left|b\right|>\text{1}$ , then y_{n} keeps growing with n, while if
$\left|b\right|<\text{1}$ , then
${y}_{n}\to 0$ , as
$n\to \infty $ .

9. Second Order Linear Homogeneous Recursions

Next we consider the three-term homogeneous recursion.

Let the sequence ${y}_{0},{y}_{1},{y}_{2},\cdots ,{y}_{n-1},{y}_{n},{y}_{n+1}$ be generated by the homogeneous recursion

${y}_{n+2}+b{y}_{n+1}+c{y}_{n}=0$ (30)

with coefficients b and c assumed independent of n. Recursion (30) is satisfied by ${y}_{n}={z}^{n}$ provided z is a root the characteristic equation

${z}^{2}+bz+c=0.$ (31)

In case the two roots z_{1}, z_{2} of Equation (31) are distinct,
${z}_{1}\ne {z}_{2}$ , then by the linearity of the recursion we have the general solution of this recursion in the form

${y}_{n}={c}_{1}{z}_{1}^{n}+{c}_{2}{z}_{2}^{n}$ (32)

with c_{1} and c_{2} determined by the initial conditions y_{0} and y_{1}.

In case the roots of Equation (31) are equal, ${z}_{\text{1}}={z}_{\text{2}}=z=-b/2$ , ${b}^{\text{2}}-\text{4}c=0$ , then we verify that ${y}_{n}={c}_{1}{z}^{n}+{c}_{2}n{z}^{n}$ , with

${c}_{1}={y}_{0},\text{\hspace{0.17em}}{c}_{2}={y}_{1}/2-{y}_{0}.$ (33)

In case the roots of Equation (31) are complex conjugates, ${z}_{1}=\alpha +i\beta $ , ${z}_{2}=\alpha -i\beta $ , ${z}_{1}{z}_{2}={\left|z\right|}^{2}=c={\alpha}^{2}+{\beta}^{2}$ , then we may put z in the form

$z=\left|z\right|{\text{e}}^{\pm i\theta},\text{\hspace{0.17em}}z=\left|z\right|\left(\mathrm{cos}\left(\theta \right)\pm i\mathrm{sin}\left(\theta \right)\right),\text{\hspace{0.17em}}{z}^{n}={\left|z\right|}^{n}\left(\mathrm{cos}\left(n\theta \right)\pm i\mathrm{sin}\left(n\theta \right)\right)$ (34)

where $\mathrm{cos}\left(\theta \right)=\alpha /\left|z\right|,\mathrm{sin}\left(\theta \right)=\beta /\left|z\right|$ . Now, ${y}_{n}={c}_{1}{z}_{1}^{n}+{c}_{2}{z}_{2}^{n}$ becomes

${y}_{n}={\left|z\right|}^{n}\left(\left({c}_{1}+{c}_{2}\right)\mathrm{cos}\left(n\theta \right)+i\left({c}_{1}-{c}_{2}\right)\mathrm{sin}\left(n\theta \right)\right).$ (35)

with c_{1},c_{2} fixed by the initial conditions y_{0}, y_{1}.

For example, the recursion

${y}_{2}-3{y}_{1}+2{y}_{0}=0,\text{\hspace{0.17em}}{y}_{0}=1,\text{\hspace{0.17em}}{y}_{1}=1\text{\hspace{0.17em}}+\in $ (36)

results in

${y}_{n}=1\text{\hspace{0.17em}}+\in \left({2}^{n}-1\right).$ (37)

10. The Advantage of an Implicit Method at a Branching Point

Implicit methods for the numerical integration of the first-order IVP hold some stability advantages, but they may require the solution of a nonlinear equation for the next predicted value.

At a point of bifurcation they hold the extra advantage of capturing multiple solutions, otherwise missed by an explicit method. Here is an example. The initial value problem

${y}^{\prime}=-\sqrt{1-{y}^{2}},y\left(0\right)=1,{y}^{\prime}\left(0\right)=0$ (38)

is solved by both

$y\left(t\right)=1\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}y\left(t\right)=\mathrm{cos}\left(t\right).$ (39)

Using the Euler explicit method

${y}_{1}={y}_{0}+\tau {{y}^{\prime}}_{0}$ (40)

where y_{1} is an approximation to y(τ), we have

${y}_{1}={y}_{0}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}{y}_{n}=1$ (41)

which is only the first solution y(t) = 1 of IVP (38).

Using the implicit method

${y}_{1}={y}_{0}+\frac{1}{2}\tau \left({{y}^{\prime}}_{0}+{{y}^{\prime}}_{1}\right)$ (42)

we obtain

${y}_{1}=1-\frac{1}{2}\tau \sqrt{1-{y}_{1}^{2}}$ (43)

then the quadratic equation

$\left(1+\frac{1}{4}{\tau}^{2}\right){y}_{1}^{2}-2{y}_{1}+\left(1-\frac{1}{4}{\tau}^{2}\right)=0$ (44)

for y_{1}, solved by

a first ${y}_{\text{1}}=\text{1}$ , and a second ${y}_{1}=\frac{4-{\tau}^{2}}{4+{\tau}^{2}}=1-\frac{1}{2}{\tau}^{2}+\frac{1}{8}{\tau}^{4}+O\left({\tau}^{6}\right)$ (45)

as compared with

$y\left(\tau \right)=\mathrm{cos}\left(\tau \right)=1-\frac{1}{2}{\tau}^{2}+\frac{1}{24}{\tau}^{4}+O\left({\tau}^{6}\right).$ (46)

11. Sensitivity to Initial Conditions

The solution of the IVP

${y}^{\prime}=y-1,\text{\hspace{0.17em}}y\left(0\right)={y}_{0}$ (47)

is

$y\left(t\right)=1+\left({y}_{0}-1\right){\text{e}}^{t}$ (48)

and if ${y}_{0}=\text{1}$ , then $y\left(t\right)=\text{1}$ , but if ${y}_{0}>\text{1}$ , then $y\left(t\right)\to \infty $ as $t\to \infty $ .

12. Determination of the Order of Consistency of Multistep Methods

To fully, yet concisely, demonstrate the consistency and stability issues in the integration of first order IVP, and their resolution, we shall look in detail at the general two-step method

${y}_{2}={\alpha}_{0}{y}_{0}+{\alpha}_{1}{y}_{1}+\tau \left({\beta}_{0}{{y}^{\prime}}_{0}+{\beta}_{1}{{y}^{\prime}}_{1}\right)+err,y=y\left(t\right)$ (49)

in which y_{2} is the computed approximation to the correct y(2τ), in which err is the error y(2τ) − y_{2}, and in which α_{0}, α_{1}, β_{0}, β_{1} are free parameters to be determined for highest accuracy and method stability.

In accordance with Taylor’s theorem we require, for the highest possible order of consistency, that the calculated y_{2} is the correct y(2τ), namely err = 0, for

$y=1,\text{\hspace{0.17em}}y=t,\text{\hspace{0.17em}}y={t}^{2}$ (50)

leading to the system of equations

${\alpha}_{0}+{\alpha}_{1}=1,\text{\hspace{0.17em}}{\alpha}_{1}+{\beta}_{0}+{\beta}_{1}=2,\text{\hspace{0.17em}}{\alpha}_{1}+2{\beta}_{1}=4$ (51)

and then to

${\alpha}_{1}=1-{\alpha}_{0},\text{\hspace{0.17em}}{\beta}_{0}=\frac{1}{2}\left(-1+{\alpha}_{0}\right),\text{\hspace{0.17em}}{\beta}_{1}=\frac{1}{2}\left(3+{\alpha}_{0}\right)$ (52)

in which we leave α_{0} free for now, to use it next to guarantee the stability of the method.

According to Taylor’s theorem the worst case error arises from the next order polynomial, or the function with a constant third derivative. Accordingly, we take next

$y\left(t\right)=\frac{1}{6}{M}_{3}{t}^{3},\text{\hspace{0.17em}}{y}^{\u2034}\left(t\right)={M}_{3}$ (53)

and have from Equation (49) and Equation (51) that

$y\left(2\tau \right)-{y}_{2}=\frac{5-{a}_{0}}{12}{M}_{3}{\tau}^{3}$ (54)

which is the local error per step. After n steps the error rises to the global O(τ^{2}).

13. Stability of the Multistep Method

The following Lemma is greatly useful for ascertaining the stability of an integration method.

Lemma. Let real roots z(τ) of the characteristic equation for the integration scheme of the first-order IVP be such that $z\left(\tau =0\right)\le \text{1}$ . Then, a sufficient condition for the (conditional) stability of the method is that at $z\left(\tau =0\right)=\text{1}$ , $\text{d}z/\text{d}\tau <0$ and that at $z\left(\tau =0\right)=-\text{1}$ , $\text{d}z/\text{d}\tau >0$ .

Proof. It results directly from the continuity and differentiability of z(τ) that if $z\left(\tau =0\right)=\text{1}$ and $\text{d}z/\text{d}\tau <0$ at τ = 0, then z(τ) < 1 for some τ > 0. See also [5] .

Specifically, for the model IVP

${y}^{\prime}=-y,\text{\hspace{0.17em}}y\left(0\right)={y}_{0}=1,\text{\hspace{0.17em}}y\left(t\right)=y\left(0\right){\text{e}}^{-t}$ (55)

the two-step method of Equation (49) becomes

$2{y}_{2}=\left(2{\alpha}_{0}+\tau \left(1-{\alpha}_{0}\right)\right){y}_{0}+\left(2-2{\alpha}_{0}-\tau \left(3+{\alpha}_{0}\right)\right){y}_{1}$ (56)

of the characteristic equation

$2{z}^{2}+\left(-2+2{\alpha}_{0}+\tau \left(3+{\alpha}_{0}\right)\right)z+\left(-2{\alpha}_{0}+\tau \left(-1+{\alpha}_{0}\right)\right)=0.$ (57)

At τ = 0 the equation reduces to

${z}^{2}+\left(-1+{\alpha}_{0}\right)z-{\alpha}_{0}=0$ (58)

which is of the two roots

${z}_{1}=1,\text{\hspace{0.17em}}{z}_{2}=-{\alpha}_{0},\text{\hspace{0.17em}}\text{\hspace{0.05em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.05em}}-1<{\alpha}_{0}\le 1.$ (59)

To verify the stability of the method we seek ${z}^{\prime}\left(\tau \right)$ at τ = 0.

Implicitly differentiating characteristic Equation (57) with respect to τ we have

$4z{z}^{\prime}+\left(3+{\alpha}_{0}\right)z+\left(-2+2{\alpha}_{0}+\tau \left(3+{\alpha}_{0}\right)\right){z}^{\prime}-1+{\alpha}_{0}=0.$ (60)

At τ = 0, the above equation reduces to

$4z{z}^{\prime}+\left(3+{\alpha}_{0}\right)z+\left(-2+2{\alpha}_{0}\right){z}^{\prime}-1+{\alpha}_{0}=0$ (61)

and for ${z}_{1}=1$ we obtain from the above equation that

${{z}^{\prime}}_{1}\left(\tau =0\right)=-\frac{2\left(1+{\alpha}_{0}\right)}{2+{a}_{0}}<0$ (62)

and since for stability z_{1}(τ) needs to come down at τ = 0, hence
${\alpha}_{0}>-\text{1}$ .

14. The Adam-Bashforth Method

In this method ${\alpha}_{0}=0$ , for which the characteristic equation reduces to

$2{z}^{2}+\left(-2+3\tau \right)z-\tau =0.$ (63)

We set z = 1 in the above equation and get from it the corresponding τ = 0. Then we set in the above equation z = −1 and obtain from it τ = 1, at which $\text{d}z/\text{d}\tau =-4/3$ , implying that the method is stable for $0<\tau <\text{1}$ .

Actually

$z=\frac{1}{4}\left(2-3\tau \pm \sqrt{4-4\tau +9{\tau}^{2}}\right).$ (64)

15. Other Possibilities

For ${\alpha}_{0}=-3/4$ the characteristic equation of the multistep method becomes

$8{z}^{2}+\left(-14+9\tau \right)z+\left(6-7\tau \right)=0$ (65)

and by implicit differentiation with respect to τ

$16z{z}^{\prime}+9z+\left(-14+9\tau \right){z}^{\prime}-7=0$ (66)

where ${z}^{\prime}=\text{d}z/\text{d}\tau $ . At τ = 0, z = 1, the above equation yields ${z}^{\prime}\left(\tau =0\right)=-1$ , and the method is stable for some τ. We set z = 1 into the characteristic equation and get for it but τ = 0. We set into the characteristic equation z = −1 and get from it τ = 7/4, implying that the method is stable now for $0<\tau <7/4$ .

Actually,

$z=\frac{1}{16}\left(14-9\tau \pm \sqrt{4-28\tau +81{\tau}^{2}}\right).$ (67)

16. Amplification of an Initial Error

We shall consider now the application of the two-step method of the previous section to the IVP

${y}^{\prime}=0,\text{\hspace{0.17em}}y\left(0\right)=1,\text{\hspace{0.17em}}y\left(t\right)=1.$ (68)

For ${\alpha}_{0}=-3/4$ , ${\alpha}_{1}=7/4$ , and with ${y}^{\prime}\left(t\right)=0$ , the two-step method becomes

${y}_{2}=\frac{1}{4}\left(-3{y}_{0}+7{y}_{1}\right)$ (69)

for which the characteristic equation is

$4{z}^{2}-7z+3=0,\text{\hspace{0.17em}}{z}_{1}=1,\text{\hspace{0.17em}}{z}_{2}=\frac{3}{4}$ (70)

and hence

${y}_{n}={c}_{1}{\left(1\right)}^{n}+{c}_{2}{\left(\frac{3}{4}\right)}^{n}.$ (71)

Say we start the method with ${y}_{0}=\text{1}$ , ${y}_{1}=1+\epsilon $ , such that

${c}_{1}+{c}_{2}=1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}{c}_{1}+\frac{3}{4}{c}_{2}=1+\epsilon $ (72)

resulting in ${c}_{1}=1+4\epsilon $ , ${c}_{2}=-4\epsilon $ , and

${y}_{n}=1+4\epsilon -4\epsilon {\left(\frac{3}{4}\right)}^{n}$ (73)

and

${y}_{\infty}=1+4\epsilon .$ (74)

17. A Three Step Method

The integration method

${y}_{3}={y}_{2}+\frac{1}{12}\tau \left(23{{y}^{\prime}}_{2}-16{{y}^{\prime}}_{1}+5{{y}^{\prime}}_{0}\right)$ (75)

is correct for y = 1, y = t, y = t^{2} and y = t^{3}. For

$y\left(t\right)=\frac{1}{24}{M}_{4}{t}^{4}$ (76)

we have from Equation (75) that

$y\left(3\tau \right)-{y}_{3}=\frac{3}{8}{M}_{4}{\tau}^{3}.$ (77)

For ${y}^{\prime}=-y$ , $y\left(0\right)={y}_{0}$ the characteristic equation of the three step method becomes

$12{z}^{3}+\left(-12+23\tau \right){z}^{2}-16\tau z+5\tau =0$ (78)

and at τ = 0 it reduces to

$12{z}^{3}-12{z}^{2}=0$ , of roots ${z}_{1}=1,{z}_{2}={z}_{3}=0$ . (79)

Implicit differentiation of Equation (78) with respect to τ yields

$36{z}^{2}{z}^{\prime}+23{z}^{2}+\left(-12+23\tau \right)2z{z}^{\prime}-16z-16\tau {z}^{\prime}+5=0$ (80)

and at τ = 0, z = 1, we have that ${z}^{\prime}=-1$ , so that near τ = 0

$z=1-\tau $ (81)

and the method is stable.

We further have from Equation (79) that at τ = 6/11, z_{3} = −1 and z_{1} = z_{2} = 1/2.

At the repeating root z = 0, the derivative function ${z}^{\prime}$ does not exist. Instead we write τ in terms of z as

$\tau =\frac{12\left(1-z\right)}{23{z}^{2}-16z+5}{z}^{2}$ (82)

and if z = 0, nearly, then

$\tau =\frac{12}{5}{z}^{2}$ (83)

and

$z=\pm \sqrt{\frac{5}{12}\tau}.$ (84)

18. Advancing and Retarding the Computed Motion

Next, we turn our attention to the second order IVP, see [6] and [7] , as typified by the model second order problem

${y}^{\u2033}+y=0,\text{\hspace{0.17em}}y\left(0\right)={y}_{0},\text{\hspace{0.17em}}{y}^{\prime}\left(0\right)={{y}^{\prime}}_{0}$ (85)

which we propose to approximate as

$\frac{{y}_{0}-2{y}_{1}+{y}_{2}}{{\tau}^{2}}+\left(1\text{\hspace{0.17em}}+\in \right){y}_{1}=0,\text{\hspace{0.17em}}\in \text{\hspace{0.17em}}=\alpha \tau +\beta {\tau}^{2}.$ (86)

The characteristic equation of this method is

${z}^{2}+\left(-2+{\tau}^{2}\left(1\text{\hspace{0.17em}}+\in \right)\right)z+1=0.$ (87)

For a sufficiently small τ, the roots of the characteristic equation are complex and $\left|z\right|=\text{1}$ . Hence the closed-form prediction of the computed y at step n

${y}_{n}={c}_{1}\mathrm{cos}\left(n\theta \right)+{c}_{2}\mathrm{sin}\left(n\theta \right)$ (88)

where c_{1} and c_{2} are determined by the initial conditions.

From the characteristic Equation (87) we have that

$\mathrm{cos}\left(\theta \right)=1-\frac{1}{2}{\tau}^{2}\left(1\text{\hspace{0.17em}}+\in \right),\text{\hspace{0.17em}}\mathrm{sin}\left(\theta \right)=\frac{1}{2}\sqrt{4-{\left(-2+{\tau}^{2}\left(1\text{\hspace{0.17em}}+\in \right)\right)}^{2}}$ (89)

or

$\theta =\tau +\frac{1}{2}\alpha {\tau}^{2}+\frac{1}{24}\left(1-3{\alpha}^{2}+12\beta \right){\tau}^{3}+O\left({\tau}^{5}\right),\text{\hspace{0.17em}}\in \text{\hspace{0.17em}}=2-{\tau}^{2}-2\mathrm{cos}\left(\tau \right).$ (90)

To drop the τ^{2} term in the above equation we take α = 0, and are left with

$\frac{\theta}{\tau}=1+\frac{1}{24}\left(1+12\beta \right){\tau}^{2}+O\left({\tau}^{4}\right)$ (91)

suggesting that θ may be advanced or retarded relative to τ with a proper choice of β. For instance, for β = −1/12 we have that θ = τ, nearly.

19. Integration of the Equation of Motion Linear Prediction

Inasmuch as the initial conditions to the second order equation of motion are usually given in terms of initial position and initial velocity, we prefer to reduce the second order problem into a coupled system of first order equations for position and velocity, and follow them in tandem.

To remain both concise and specific, we consider the model initial value problem

${x}^{\prime}=-y,\text{\hspace{0.17em}}{y}^{\prime}=x,\text{\hspace{0.17em}}{x}_{0}=x\left(0\right)=1,\text{\hspace{0.17em}}{y}_{0}=y\left(0\right)=0$ (92)

where x = x(t), y = y(t), t > 0, and where ${()}^{\prime}$ denotes differentiation with respect to time t. This initial value problem, that coincides with a single second order problem, is solved by $x=\mathrm{cos}\left(t\right)$ , $y=\text{sin}\left(t\right)$ representing a constant circular motion of period $T=2\text{\pi}$ .

We propose to follow the initial value problem with the explicit scheme

$\begin{array}{l}{x}_{1}={x}_{0}+\tau {{x}^{\prime}}_{0}\\ {y}_{1}={y}_{0}+\tau \left({\alpha}_{0}{{y}^{\prime}}_{0}+{\alpha}_{1}{{y}^{\prime}}_{1}\right)\end{array}$ (93)

in which τ is the time step, where x_{1} = x(τ) and y_{1} = y(τ), approximately, and with the coefficients α_{0}, α_{1} to be presently determined by stability and accuracy considerations.

With ${x}^{\prime}=-y$ , ${y}^{\prime}=x$ , system (93) becomes the system of recursions

$\begin{array}{l}{x}_{1}={x}_{0}-\tau {y}_{0}\\ {y}_{1}={y}_{0}+\tau \left({\alpha}_{0}{x}_{0}+{\alpha}_{1}{x}_{1}\right)\end{array}$ (94)

that explicitly produces x_{1} and y_{1} out of x_{0} and y_{0}, and then x_{2} and y_{2} out of x_{1} and y_{1}, and so on up to x_{n} and y_{n}. System (94) is solved by
${x}_{n}={z}^{n}{x}_{0}$ ,
${y}_{n}={z}^{n}{y}_{0}$ for magnification factor z that satisfies the pair of linear equations

$\begin{array}{l}z{x}_{0}={x}_{0}-\tau {y}_{0}\\ z{y}_{0}={y}_{0}+\tau \left({\alpha}_{0}{x}_{0}+{\alpha}_{1}z{x}_{0}\right)\end{array}$ (95)

for any x_{0} and y_{0}. Equation (95) is recast in the matrix-vector form to assume the form

$\left[\begin{array}{cc}z-1& \tau \\ -\tau \left({a}_{0}+{a}_{1}z\right)& z-1\end{array}\right][\begin{array}{c}{x}_{0}\\ {y}_{0}\end{array}]=0$ (96)

and the condition that it have a nontrivial solution is that the determinant of the system’s matrix of coefficients be zero, leading to the characteristic equation

$\mathrm{det}\left[\begin{array}{cc}z-1& \tau \\ -\tau \left({a}_{0}+{a}_{1}z\right)& z-1\end{array}\right]=0,\text{\hspace{0.17em}}{z}^{2}+2\left(-1+\frac{1}{2}{a}_{1}{\tau}^{2}\right)z+1+{a}_{0}{\tau}^{2}=0$ (97)

for z. The periodic nature of the solution to this initial value problems dictates that z be complex. Let
$\left|z\right|$ be the modulus of complex z. If
$\left|z\right|<\text{1}$ , then
${\left|z\right|}^{n}\to 0$ as
$n\to \infty $ , and if
$\left|z\right|>\text{1}$ , then
${\left|z\right|}^{n}\to \infty $ as
$n\to \infty $ . To avoid these undesirable eventualities of an artificial energy sink and an artificial, numerically induced, energy source, we select α_{0} = 0 in Equation (94), and are left with the reduced characteristic equation

${z}^{2}+2\left(-1+\frac{1}{2}{\alpha}_{1}{\tau}^{2}\right)z+1=0,\text{\hspace{0.17em}}a{z}^{2}+bz+c=0$ (98)

that possesses two complex roots z_{1} and z_{2} such that
${z}_{1}{z}_{2}=c/a={\left|z\right|}^{2}=1$ .

In fact,

$z=1-\frac{1}{2}{\alpha}_{1}{\tau}^{2}\pm i\tau \sqrt{{\alpha}_{1}-\frac{1}{4}{\alpha}_{1}^{2}{\tau}^{2}}$ (99)

where i^{2} = −1, and z is complex if

${\alpha}_{1}>0,\text{\hspace{0.17em}}4-{\alpha}_{1}{\tau}^{2}>0.$ (100)

By the fact that $\left|z\right|=\text{1}$ , the complex solution to Equation (98) is energy conserving, and may be written as

${z}_{1}=\mathrm{cos}\left(\theta \right)-i\mathrm{sin}\left(\theta \right),\text{\hspace{0.17em}}{z}_{2}=\mathrm{cos}\left(\theta \right)+i\mathrm{sin}\left(\theta \right)$ (101)

with

$\mathrm{cos}\left(\theta \right)=1-\frac{1}{2}{\alpha}_{1}{\tau}^{2},\text{\hspace{0.17em}}\mathrm{sin}\left(\theta \right)=\tau \sqrt{{\alpha}_{1}-\frac{1}{4}{\alpha}_{1}^{2}{\tau}^{2}}.$ (102)

Now, x_{n} and y_{n} are generally written as

${x}_{n}={c}_{1}{z}_{1}^{n}+{c}_{2}{z}_{2}^{n},\text{\hspace{0.17em}}{y}_{n}={{c}^{\prime}}_{1}{z}_{1}^{n}+{{c}^{\prime}}_{2}{z}_{2}^{n}$ (103)

with constants
${c}_{1},{c}_{2},{{c}^{\prime}}_{1},{{c}^{\prime}}_{2}$ determined by the initial conditions. Given x_{0} = 1, y_{0} = 0 we get from Equation (94), x_{1} = 1, y_{1} = α_{1}τ. Writing x_{n} and y_{n} in Equation (102) for n = 0 and n = 1 we obtain the two systems of linear equations

$\left[\begin{array}{cc}1& 1\\ {z}_{1}& {z}_{2}\end{array}\right][\begin{array}{c}{c}_{1}\\ {c}_{2}\end{array}]=[\begin{array}{c}1\\ 1\end{array}],\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left[\begin{array}{cc}1& 1\\ {z}_{1}& {z}_{2}\end{array}\right][\begin{array}{c}{{c}^{\prime}}_{1}\\ {{c}^{\prime}}_{2}\end{array}]={a}_{1}\tau [\begin{array}{c}0\\ 1\end{array}]$ (104)

readily solved for ${c}_{1},{c}_{2},{{c}^{\prime}}_{1},{{c}^{\prime}}_{2}$ as

$[\begin{array}{c}{c}_{1}\\ {c}_{2}\end{array}]=\frac{1}{{z}_{2}-{z}_{1}}[\begin{array}{c}{z}_{2}-1\\ -{z}_{1}+1\end{array}],\text{\hspace{0.17em}}\text{\hspace{0.17em}}[\begin{array}{c}{{c}^{\prime}}_{1}\\ {{c}^{\prime}}_{2}\end{array}]=\frac{{a}_{1}\tau}{{z}_{2}-{z}_{1}}[\begin{array}{c}-1\\ 1\end{array}]$ (105)

in which
${z}_{1}=\mathrm{cos}\left(\theta \right)-i\mathrm{sin}\left(\theta \right)$ ,
${z}_{2}=\mathrm{cos}\left(\theta \right)+i\mathrm{sin}\left(\theta \right)$ ,
${z}_{2}-{z}_{1}=2i\mathrm{sin}\left(\theta \right)$ . Writing z_{1} and z_{2} in terms of θ recasts Equation (103) into the form

$\begin{array}{l}{x}_{n}=\left({c}_{1}+{c}_{2}\right)\mathrm{cos}\left(n\theta \right)+i\left({c}_{2}-{c}_{1}\right)\mathrm{sin}\left(n\theta \right),\\ {y}_{n}=\left({{c}^{\prime}}_{1}+{{c}^{\prime}}_{2}\right)\mathrm{cos}\left(n\theta \right)+i\left({{c}^{\prime}}_{2}-{{c}^{\prime}}_{1}\right)\mathrm{sin}\left(n\theta \right)\end{array}$ (106)

and we have from Equation (105) that

$\begin{array}{l}{c}_{1}+{c}_{2}=1,\text{\hspace{0.17em}}{c}_{2}-{c}_{1}=-i{\left(\mathrm{sin}\left(\theta \right)\right)}^{-1}{\alpha}_{1}{\tau}^{2}\\ {{c}^{\prime}}_{1}+{{c}^{\prime}}_{2}=0,\text{\hspace{0.17em}}{{c}^{\prime}}_{2}-{{c}^{\prime}}_{1}=-i{\left(\mathrm{sin}\left(\theta \right)\right)}^{-1}{\alpha}_{1}\tau \end{array}$ (107)

with which we finally get

${x}_{n}=\mathrm{cos}\left(n\theta \right)+\frac{1}{2}{\alpha}_{1}{\tau}^{2}{\left(\mathrm{sin}\left(\theta \right)\right)}^{-1}\mathrm{sin}\left(n\theta \right),\text{\hspace{0.17em}}{y}_{n}={\alpha}_{1}\tau {\left(\mathrm{sin}\left(\theta \right)\right)}^{-1}\mathrm{sin}\left(n\theta \right)$ (108)

as the general numerical solution to our initial value problem.

20. Period Control

A cycle is completed when
$\mathrm{sin}\left(n\theta \right)=0$ or
$n\theta =2\text{\pi}$ . Then, according to Equation (108) y_{n} = 0 and x_{n} = 1. From
$\tau n\theta =2\text{\pi}\tau $ and T = nτ we obtain the computed period as

$T=2\text{\pi}\frac{\tau}{\theta}$ (109)

and to retain
$T=2\text{\pi}$ we select α_{1} in Equation (93) so as to guarantee τ = θ or
$\mathrm{sin}\left(\tau \right)=\mathrm{sin}\left(\theta \right)$ . This condition becomes, in view of Equation (102),

$\mathrm{sin}\left(\tau \right)=\tau \sqrt{{\alpha}_{1}-\frac{1}{4}{\alpha}_{1}^{2}{\tau}^{2}}$ (110)

leading to the quadratic equation

$\frac{1}{4}{\tau}^{2}{\alpha}_{1}^{2}-{\alpha}_{1}+\frac{{\mathrm{sin}}^{2}\left(\tau \right)}{{\tau}^{2}}=0$ (111)

for α_{1}, and resulting in

${\alpha}_{1}=2\left(1-\mathrm{cos}\left(\tau \right)\right)/{\tau}^{2}$ (112)

or

${\alpha}_{1}=1-\frac{1}{12}{\tau}^{2}+\frac{1}{360}{\tau}^{4}.$ (113)

if τ is small.

21. Quadratic Prediction

Inclusion of the acceleration in the prediction of x_{1} suggests the higher order scheme

$\begin{array}{l}{x}_{1}={x}_{0}+\tau {{x}^{\prime}}_{0}+\frac{1}{2}{\tau}^{2}{{x}^{\u2033}}_{0}\\ {y}_{1}={y}_{0}+\frac{1}{2}\tau \left({\alpha}_{0}{{y}^{\prime}}_{0}+{\alpha}_{1}{{y}^{\prime}}_{1}\right)\end{array}$ (114)

that becomes for

$\begin{array}{l}{x}^{\prime}=-y,\text{\hspace{0.17em}}{y}^{\prime}=x,\text{\hspace{0.17em}}{x}^{\u2033}=-x\\ {x}_{1}={x}_{0}-\tau {y}_{0}-\frac{1}{2}{\tau}^{2}{x}_{0},\\ {y}_{1}={y}_{0}+\frac{1}{2}\tau \left({\alpha}_{0}{x}_{0}+{\alpha}_{0}{x}_{1}\right).\end{array}$ (115)

Substitution of x_{1} = zx_{0}, y_{1} = zy_{0} in Equation (115) results in the system

$\left[\begin{array}{cc}z-1+\frac{1}{2}{\tau}^{2}& \tau \\ -\frac{1}{2}\tau \left({a}_{0}+{a}_{1}z\right)& z-1\end{array}\right][\begin{array}{c}{x}_{0}\\ {y}_{0}\end{array}]=0$ (116)

from which we obtain the quadratic characteristic equation

$\begin{array}{l}\mathrm{det}\left[\begin{array}{cc}z-1+\frac{1}{2}{\tau}^{2}& \tau \\ -\frac{1}{2}\tau \left({a}_{0}+{a}_{1}z\right)& z-1\end{array}\right]=0,\\ {z}^{2}+2\left(-1+\frac{1}{4}{\tau}^{2}+\frac{1}{4}{a}_{1}{\tau}^{2}\right)z+1+\frac{1}{2}{\tau}^{2}\left({a}_{0}-1\right)=0\end{array}$ (117)

for magnification factor z. To assure
$\left|z\right|=\text{1}$ for the complex roots of Equation (117) we set α_{0} = 1 and are left with

${z}^{2}+2\left(-1+\frac{1}{4}{\tau}^{2}\beta \right)z+1=0$ (118)

where β = 1 + α_{1}. The two roots of Equation (118) are

$z=1-\frac{1}{4}{\tau}^{2}\beta \pm i\tau \sqrt{\frac{1}{2}\beta -\frac{1}{16}{\tau}^{2}{\beta}^{2}}$ (119)

and z is complex if

$\beta >0,\text{\hspace{0.17em}}8-{\tau}^{2}\beta >0.$ (120)

Because $\left|z\right|=\text{1}$ we may write the complex roots of Equation (118) as

$z=\mathrm{cos}\left(\theta \right)\pm i\mathrm{sin}\left(\theta \right),\text{\hspace{0.17em}}\mathrm{cos}\left(\theta \right)=1-\frac{1}{4}{\tau}^{2}\beta ,\text{\hspace{0.17em}}\mathrm{sin}\left(\theta \right)=\tau \sqrt{\frac{1}{2}\beta -\frac{1}{16}{\tau}^{2}{\beta}^{2}}.$ (121)

The numerical scheme is period conserving if τ = θ, or $\mathrm{sin}\theta =\mathrm{sin}\tau $ . This is assured, according to Equation (121), by β such that

$\mathrm{sin}\left(\tau \right)=\tau \sqrt{\frac{1}{2}\beta -\frac{1}{16}{\tau}^{2}{\beta}^{2}}$ (122)

or

$\frac{1}{16}{\tau}^{2}\beta -\frac{1}{2}\beta +{\left(\frac{\mathrm{sin}\left(\tau \right)}{\tau}\right)}^{2}=0$ (123)

resulting in

$\beta =4\left(1-\mathrm{cos}\left(\tau \right)\right)/{\tau}^{2}$ (124)

or

${\alpha}_{1}=1-\frac{1}{6}{\tau}^{2}+\frac{1}{180}{\tau}^{4}$ (125)

if τ is small.

22. Conclusion

We accomplished here showing how to routinely determine the consistency and stability of any multistep method, explicit as well as implicit, for the stepwise integration of the first order initial value problem. We have also demonstrated here the advantage of using implicit methods to capture different solutions emanating from a branch-off point. For the integration of the second order equation of motion we have shown how to advance and retard the motion of the computed solution.

Conflicts of Interest

The author declares no conflicts of interest regarding the publication of this paper.

[1] | Hairer, E., Norset, S.P. and Wanner, G. (1980) Solving Ordinary Differential Equations. Springer-Verlag, Berlin, Heidelberg. |

[2] | Gautschi, W. (2010) Numerical Analysis. 2nd Edition, Birkhauser, Berlin. |

[3] |
Fried, I. (2000) The Advantage of an Implicit Correction at Bifurcation. Journal of Sound and Vibration, 235, 153-155. https://doi.org/10.1006/jsvi.1999.2829 |

[4] |
Fried, I. and Waldrop, L. (2001) Kira Is Energy Consuming. Journal of Sound and Vibration, 244, 169-172. https://doi.org/10.1006/jsvi.2000.3467 |

[5] |
Dahlquist, G. (1963) A Special Stability Problem for Linear Multistep Methods. BIT Numerical Mathematics, 3, 27-43. https://doi.org/10.1007/BF01963532 |

[6] |
Lambert, J.D. and Watson, I.A. (1976) Symmetric Multistep Methods for Periodic Initial Value Problems. IMA Journal of Applied Mathematics, 18, 189-202. https://doi.org/10.1093/imamat/18.2.189 |

[7] |
Quinlan, G.D. and Tremaine, S. (1990) Symmetric Multistep Methods for the Numerical Integration of Planetary Orbits. The Astronomical Journal, 100, 1694-1700. https://doi.org/10.1086/115629 |

Copyright © 2020 by authors and Scientific Research Publishing Inc.

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.