<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AM</journal-id><journal-title-group><journal-title>Applied Mathematics</journal-title></journal-title-group><issn pub-type="epub">2152-7385</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/am.2019.108048</article-id><article-id pub-id-type="publisher-id">AM-94473</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Consistency and Stability Issues in the Numerical Integration of the First and Second Order Initial Value Problem
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Isaac</surname><given-names>Fried</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Department of Mathematics, Boston University, Boston, MA, USA</addr-line></aff><pub-date pub-type="epub"><day>01</day><month>08</month><year>2019</year></pub-date><volume>10</volume><issue>08</issue><fpage>676</fpage><lpage>690</lpage><history><date date-type="received"><day>12,</day>	<month>July</month>	<year>2019</year></date><date date-type="rev-recd"><day>18,</day>	<month>August</month>	<year>2019</year>	</date><date date-type="accepted"><day>21,</day>	<month>August</month>	<year>2019</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  In this note we consider some basic, yet unusual, issues pertaining to the accuracy and stability of numerical integration methods to follow the solution of first order and second order initial value problems (IVP). Included are remarks on multiple solutions, multi-step methods, effect of initial value perturbations, as well as slowing and advancing the computed motion in second order problems.
 
</p></abstract><kwd-group><kwd>Initial Value Problems</kwd><kwd> Numerical Integration</kwd><kwd> Consistency</kwd><kwd> Stability</kwd><kwd> Multiple Solutions</kwd><kwd> Sensitivity to Initial Conditions</kwd><kwd> Slowing and Advancing the Computed Motion</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>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 [<xref ref-type="bibr" rid="scirp.94473-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.94473-ref2">2</xref>] . 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 [<xref ref-type="bibr" rid="scirp.94473-ref3">3</xref>] , 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 [<xref ref-type="bibr" rid="scirp.94473-ref4">4</xref>] , we consider the means of slowing and advancing the computed speed of the numerical solution of the equation of motion.</p></sec><sec id="s2"><title>2. The Generalized Mean Value Theorem—Taylor’s Theorem</title><p>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.</p><p>The mean value theorem (MVT) states that if function f(x), f ( 0 ) = 0 , f ′ ( 0 ) ≠ 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 &lt; ξ &lt; x , at which the slope of the chord equals to the slope of the tangent line to f(x) at point ξ, or</p><p>f ( x ) − f ( 0 ) x = f ′ ( ξ ) ,     or     f ( x ) = x f ′ ( ξ ) ,   0 &lt; ξ &lt; x (1)</p><p>implying that f(x) is nearly linear near x = 0.</p><p>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</p><p>f ( 0 ) = 0 , f ′ ( 0 ) = 0 , f ″ ( 0 ) = 0 , ⋯ , f ( n − 1 ) ( 0 ) = 0 , f ( n ) ( 0 ) ≠ 0. (2)</p><p>Then, function f(x) may be expressed in the form</p><p>f ( x ) = 1 n ! x n f ( n ) ( ξ ) ,   0 &lt; ξ &lt; x (3)</p><p>implying that if f<sup>(n)</sup>(x) is bounded near x = 0, then f(x), like x<sup>n</sup>, is small if | x | ≪ 1 .</p></sec><sec id="s3"><title>3. Where Is ξ</title><p>We consider first the simplest case of n = 1, for which Equation (3) is</p><p>f ( x ) = x f ′ ( ξ ) ,   f ( 0 ) = 0 ,   f ′ ( 0 ) ≠ 0 ,   0 &lt; ξ &lt; x (4)</p><p>and take</p><p>f ( x ) = A x + B x 2 + C x 3 ,   f ′ ( x ) = A + 2 B x + 3 C x 2 . (5)</p><p>such that A = f ′ ( 0 ) , B = f ″ ( 0 ) / 2 ! , C = f ‴ ( 0 ) / 3 ! .</p><p>We further assume that, approximately</p><p>ξ = k x + m x 2 (6)</p><p>and have from this that</p><p>f ( x ) − x f ′ ( ξ ) = B ( 1 − 2 k ) x 2 + ( G − 3 G k 2 − 2 B m ) x 3 + O ( x 4 ) . (7)</p><p>Annulling the first two terms of the above equation results in</p><p>k = 1 2 ,     m = 1 8 G B ,     or     m = 1 24 f ‴ ( 0 ) f ″ ( 0 ) (8)</p><p>or generally, for any n in Equation (2)</p><p>ξ = 1 n + 1 x ,     if   | x | ≪ 1. (9)</p></sec><sec id="s4"><title>4. Polynomial Approximations</title><p>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<sup>x</sup> near x = 0. We start by writing</p><p>r ( x ) = e x − ( a + b x ) (10)</p><p>and propose to fix free parameters a and b such that r ( 0 ) = 0 , r ′ ( 0 ) = 0 , namely, such that</p><p>r ( x ) = e x − ( 1 + x ) ,   r ″ ( x ) = e x ,   r ″ ( 0 ) = 1 ≠ 0. (11)</p><p>Now, by fundamental Equation (3), we may write r(x) of r ( 0 ) = 0 , r ′ ( 0 ) = 0 , as</p><p>r ( x ) = 1 2 x 2 r ″ ( ξ )     or     e x = 1 + x + 1 2 x 2 e ξ , 0 &lt; ξ &lt; x (12)</p><p>providing us with a good linear polynomial approximation to e<sup>x</sup> in the vicinity of x = 0.</p><p>Moreover, since e<sup>x</sup> is an increasing function, we readily obtain from Equation (12) the strict inequalities</p><p>1 + x + 1 2 x 2 &lt; e x &lt; 1 + x + 1 2 x 2 e x (13)</p><p>or</p><p>1 + x + 1 2 x 2 &lt; e x &lt; 1 + x 1 − 1 2 x 2 . (14)</p></sec><sec id="s5"><title>5. Improving the Polynomial Approximation with ξ</title><p>The reason the lower bound on e<sup>x</sup> 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 ( 0 ) = 0 , r ′ ( 0 ) = 0 , r ″ ( 0 ) ≠ 0 , then, according to Equation (9), ξ = x/3, nearly, if | x | ≪ 1 .</p><p>Replacing e<sup>ξ</sup> in Equation (12) by 1 + ξ, with ξ = x/3, we obtain, forthwith, the better approximation</p><p>e x = 1 + x + 1 2 x 2 ( 1 + ξ ) = 1 + x + 1 2 x 2 ( 1 + 1 3 x ) = 1 + x + 1 2 x 2 + 1 6 x 3 . (15)</p><p>Otherwise we may start from</p><p>e x = 1 + x + 1 2 x 2 + 1 6 x 3 e ξ ,   0 &lt; ξ &lt; x , (16)</p><p>take ξ = k x + m x 2 , expand further</p><p>e ξ = 1 + k x + ( 1 2 k 2 + m ) x 2 + ( 1 6 k 3 + k m ) x 3 + ( 1 24 k 4 + 1 2 k 2 m + 1 2 m 2 ) x 4 + ⋯ (17)</p><p>or</p><p>e x = 1 + x + 1 2 x 2 + 1 6 x 3 + k 6 x 4 + ( k 2 12 + m 6 ) x 5 + ( k 3 36 + k m 6 ) x 6 + ⋯ (18)</p><p>To have in the above equation as many correct terms as possible we set</p><p>k 6 = 1 4 !     and     ( k 2 12 + m 6 ) = 1 5 ! (19)</p><p>resulting in</p><p>ξ = 1 4 x + 3 160 x 2     if   x ≪ 1. (20)</p></sec><sec id="s6"><title>6. Trigonometric Function Approximations</title><p>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</p><p>r ( x ) = 1 + x − ( a cos ( x ) + b sin ( x ) ) (21)</p><p>and use free numbers a and b to enforce r ( 0 ) = 0 and r ′ ( 0 ) = 0 , to have</p><p>r ( x ) = 1 + x − ( cos ( x ) + 1 2 sin ( x ) ) , r ″ ( x ) = − 1 4 ( 1 + x ) − 3 2 + cos ( x ) + 1 2 sin ( x ) , r ″ ( 0 ) = 3 4 ≠ 0. (22)</p><p>Consequently, the Taylor, or the GMVT, form of r(x) is</p><p>r ( x ) = 1 2 x 2 r ″ ( ξ ) = 1 2 x 2 ( − 1 4 ( 1 + ξ ) − 3 2 + cos ( ξ ) + 1 2 sin ( ξ ) ) , 0 &lt; ξ &lt; x (23)</p><p>or, asymptotically, as x → 0 , ξ → 0 ,</p><p>1 + x = cos ( x ) + 1 2 sin ( x ) + 3 8 x 2 ,     if   | x | ≪ 1 (24)</p></sec><sec id="s7"><title>7. Rational Function Approximations</title><p>Rational approximations are also desirable, and efficient. Here we start with, say</p><p>r ( x ) = e x − a + b x 1 + c x (25)</p><p>of the three free parameters a, b, c. Imposing on r(x) the conditions</p><p>r ( 0 ) = 0 , r ′ ( 0 ) = 0 , r ″ ( 0 ) = 0 (26)</p><p>we readily have</p><p>e x = 2 + x 2 − x − 1 12 x 3 ,     if   x ≪ 1. (27)</p><p>If the point of osculation is not x = 0, but x = a, then x in the theorem is shifted to x − a.</p></sec><sec id="s8"><title>8. First Order Linear Homogeneous Recursions</title><p>In the numerical integration of IVPs we are constantly confronted by the need to solve linear homogeneous recursions.</p><p>The first order, homogeneous, recursion</p><p>y n + 1 + b y n = 0 ,     n = 0 , 1 , 2 , ⋯ (28)</p><p>where b is a constants independent of n, is brought, without much ado, to the explicit, closed-form, representation</p><p>y n = ( − b ) n y 0 (29)</p><p>by merely repeating the recursion. We note that if | b | &gt; 1 , then y<sub>n</sub> keeps growing with n, while if | b | &lt; 1 , then y n → 0 , as n → ∞ .</p></sec><sec id="s9"><title>9. Second Order Linear Homogeneous Recursions</title><p>Next we consider the three-term homogeneous recursion.</p><p>Let the sequence y 0 , y 1 , y 2 , ⋯ , y n − 1 , y n , y n + 1 be generated by the homogeneous recursion</p><p>y n + 2 + b y n + 1 + c y n = 0 (30)</p><p>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</p><p>z 2 + b z + c = 0. (31)</p><p>In case the two roots z<sub>1</sub>, z<sub>2</sub> of Equation (31) are distinct, z 1 ≠ z 2 , then by the linearity of the recursion we have the general solution of this recursion in the form</p><p>y n = c 1 z 1 n + c 2 z 2 n (32)</p><p>with c<sub>1</sub> and c<sub>2</sub> determined by the initial conditions y<sub>0</sub> and y<sub>1</sub>.</p><p>In case the roots of Equation (31) are equal, z 1 = z 2 = z = − b / 2 , b 2 − 4 c = 0 , then we verify that y n = c 1 z n + c 2 n z n , with</p><p>c 1 = y 0 ,   c 2 = y 1 / 2 − y 0 . (33)</p><p>In case the roots of Equation (31) are complex conjugates, z 1 = α + i β , z 2 = α − i β , z 1 z 2 = | z | 2 = c = α 2 + β 2 , then we may put z in the form</p><p>z = | z | e &#177; i θ ,   z = | z | ( cos ( θ ) &#177; i sin ( θ ) ) ,   z n = | z | n ( cos ( n θ ) &#177; i sin ( n θ ) ) (34)</p><p>where cos ( θ ) = α / | z | , sin ( θ ) = β / | z | . Now, y n = c 1 z 1 n + c 2 z 2 n becomes</p><p>y n = | z | n ( ( c 1 + c 2 ) cos ( n θ ) + i ( c 1 − c 2 ) sin ( n θ ) ) . (35)</p><p>with c<sub>1</sub>,c<sub>2</sub> fixed by the initial conditions y<sub>0</sub>, y<sub>1</sub>.</p><p>For example, the recursion</p><p>y 2 − 3 y 1 + 2 y 0 = 0 ,   y 0 = 1 ,   y 1 = 1   + ∈ (36)</p><p>results in</p><p>y n = 1   + ∈ ( 2 n − 1 ) . (37)</p></sec><sec id="s10"><title>10. The Advantage of an Implicit Method at a Branching Point</title><p>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.</p><p>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</p><p>y ′ = − 1 − y 2 , y ( 0 ) = 1 , y ′ ( 0 ) = 0 (38)</p><p>is solved by both</p><p>y ( t ) = 1     and     y ( t ) = cos ( t ) . (39)</p><p>Using the Euler explicit method</p><p>y 1 = y 0 + τ y ′ 0 (40)</p><p>where y<sub>1</sub> is an approximation to y(τ), we have</p><p>y 1 = y 0     and     y n = 1 (41)</p><p>which is only the first solution y(t) = 1 of IVP (38).</p><p>Using the implicit method</p><p>y 1 = y 0 + 1 2 τ ( y ′ 0 + y ′ 1 ) (42)</p><p>we obtain</p><p>y 1 = 1 − 1 2 τ 1 − y 1 2 (43)</p><p>then the quadratic equation</p><p>( 1 + 1 4 τ 2 ) y 1 2 − 2 y 1 + ( 1 − 1 4 τ 2 ) = 0 (44)</p><p>for y<sub>1</sub>, solved by</p><p>a first y 1 = 1 , and a second y 1 = 4 − τ 2 4 + τ 2 = 1 − 1 2 τ 2 + 1 8 τ 4 + O ( τ 6 ) (45)</p><p>as compared with</p><p>y ( τ ) = cos ( τ ) = 1 − 1 2 τ 2 + 1 24 τ 4 + O ( τ 6 ) . (46)</p></sec><sec id="s11"><title>11. Sensitivity to Initial Conditions</title><p>The solution of the IVP</p><p>y ′ = y − 1 ,   y ( 0 ) = y 0 (47)</p><p>is</p><p>y ( t ) = 1 + ( y 0 − 1 ) e t (48)</p><p>and if y 0 = 1 , then y ( t ) = 1 , but if y 0 &gt; 1 , then y ( t ) → ∞ as t → ∞ .</p></sec><sec id="s12"><title>12. Determination of the Order of Consistency of Multistep Methods</title><p>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</p><p>y 2 = α 0 y 0 + α 1 y 1 + τ ( β 0 y ′ 0 + β 1 y ′ 1 ) + e r r , y = y ( t ) (49)</p><p>in which y<sub>2</sub> is the computed approximation to the correct y(2τ), in which err is the error y(2τ) − y<sub>2</sub>, and in which α<sub>0</sub>, α<sub>1</sub>, β<sub>0</sub>, β<sub>1</sub> are free parameters to be determined for highest accuracy and method stability.</p><p>In accordance with Taylor’s theorem we require, for the highest possible order of consistency, that the calculated y<sub>2</sub> is the correct y(2τ), namely err = 0, for</p><p>y = 1 ,   y = t ,   y = t 2 (50)</p><p>leading to the system of equations</p><p>α 0 + α 1 = 1 ,   α 1 + β 0 + β 1 = 2 ,   α 1 + 2 β 1 = 4 (51)</p><p>and then to</p><p>α 1 = 1 − α 0 ,   β 0 = 1 2 ( − 1 + α 0 ) ,   β 1 = 1 2 ( 3 + α 0 ) (52)</p><p>in which we leave α<sub>0</sub> free for now, to use it next to guarantee the stability of the method.</p><p>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</p><p>y ( t ) = 1 6 M 3 t 3 ,   y ‴ ( t ) = M 3 (53)</p><p>and have from Equation (49) and Equation (51) that</p><p>y ( 2 τ ) − y 2 = 5 − a 0 12 M 3 τ 3 (54)</p><p>which is the local error per step. After n steps the error rises to the global O(τ<sup>2</sup>).</p></sec><sec id="s13"><title>13. Stability of the Multistep Method</title><p>The following Lemma is greatly useful for ascertaining the stability of an integration method.</p><p>Lemma. Let real roots z(τ) of the characteristic equation for the integration scheme of the first-order IVP be such that z ( τ = 0 ) ≤ 1 . Then, a sufficient condition for the (conditional) stability of the method is that at z ( τ = 0 ) = 1 , d z / d τ &lt; 0 and that at z ( τ = 0 ) = − 1 , d z / d τ &gt; 0 .</p><p>Proof. It results directly from the continuity and differentiability of z(τ) that if z ( τ = 0 ) = 1 and d z / d τ &lt; 0 at τ = 0, then z(τ) &lt; 1 for some τ &gt; 0. See also [<xref ref-type="bibr" rid="scirp.94473-ref5">5</xref>] .</p><p>Specifically, for the model IVP</p><p>y ′ = − y ,   y ( 0 ) = y 0 = 1 ,   y ( t ) = y ( 0 ) e − t (55)</p><p>the two-step method of Equation (49) becomes</p><p>2 y 2 = ( 2 α 0 + τ ( 1 − α 0 ) ) y 0 + ( 2 − 2 α 0 − τ ( 3 + α 0 ) ) y 1 (56)</p><p>of the characteristic equation</p><p>2 z 2 + ( − 2 + 2 α 0 + τ ( 3 + α 0 ) ) z + ( − 2 α 0 + τ ( − 1 + α 0 ) ) = 0. (57)</p><p>At τ = 0 the equation reduces to</p><p>z 2 + ( − 1 + α 0 ) z − α 0 = 0 (58)</p><p>which is of the two roots</p><p>z 1 = 1 ,   z 2 = − α 0 ,     and     − 1 &lt; α 0 ≤ 1. (59)</p><p>To verify the stability of the method we seek z ′ ( τ ) at τ = 0.</p><p>Implicitly differentiating characteristic Equation (57) with respect to τ we have</p><p>4 z z ′ + ( 3 + α 0 ) z + ( − 2 + 2 α 0 + τ ( 3 + α 0 ) ) z ′ − 1 + α 0 = 0. (60)</p><p>At τ = 0, the above equation reduces to</p><p>4 z z ′ + ( 3 + α 0 ) z + ( − 2 + 2 α 0 ) z ′ − 1 + α 0 = 0 (61)</p><p>and for z 1 = 1 we obtain from the above equation that</p><p>z ′ 1 ( τ = 0 ) = − 2 ( 1 + α 0 ) 2 + a 0 &lt; 0 (62)</p><p>and since for stability z<sub>1</sub>(τ) needs to come down at τ = 0, hence α 0 &gt; − 1 .</p></sec><sec id="s14"><title>14. The Adam-Bashforth Method</title><p>In this method α 0 = 0 , for which the characteristic equation reduces to</p><p>2 z 2 + ( − 2 + 3 τ ) z − τ = 0. (63)</p><p>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 d z / d τ = − 4 / 3 , implying that the method is stable for 0 &lt; τ &lt; 1 .</p><p>Actually</p><p>z = 1 4 ( 2 − 3 τ &#177; 4 − 4 τ + 9 τ 2 ) . (64)</p></sec><sec id="s15"><title>15. Other Possibilities</title><p>For α 0 = − 3 / 4 the characteristic equation of the multistep method becomes</p><p>8 z 2 + ( − 14 + 9 τ ) z + ( 6 − 7 τ ) = 0 (65)</p><p>and by implicit differentiation with respect to τ</p><p>16 z z ′ + 9 z + ( − 14 + 9 τ ) z ′ − 7 = 0 (66)</p><p>where z ′ = d z / d τ . At τ = 0, z = 1, the above equation yields z ′ ( τ = 0 ) = − 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 &lt; τ &lt; 7 / 4 .</p><p>Actually,</p><p>z = 1 16 ( 14 − 9 τ &#177; 4 − 28 τ + 81 τ 2 ) . (67)</p></sec><sec id="s16"><title>16. Amplification of an Initial Error</title><p>We shall consider now the application of the two-step method of the previous section to the IVP</p><p>y ′ = 0 ,   y ( 0 ) = 1 ,   y ( t ) = 1. (68)</p><p>For α 0 = − 3 / 4 , α 1 = 7 / 4 , and with y ′ ( t ) = 0 , the two-step method becomes</p><p>y 2 = 1 4 ( − 3 y 0 + 7 y 1 ) (69)</p><p>for which the characteristic equation is</p><p>4 z 2 − 7 z + 3 = 0 ,   z 1 = 1 ,   z 2 = 3 4 (70)</p><p>and hence</p><p>y n = c 1 ( 1 ) n + c 2 ( 3 4 ) n . (71)</p><p>Say we start the method with y 0 = 1 , y 1 = 1 + ε , such that</p><p>c 1 + c 2 = 1 ,     c 1 + 3 4 c 2 = 1 + ε (72)</p><p>resulting in c 1 = 1 + 4 ε , c 2 = − 4 ε , and</p><p>y n = 1 + 4 ε − 4 ε ( 3 4 ) n (73)</p><p>and</p><p>y ∞ = 1 + 4 ε . (74)</p></sec><sec id="s17"><title>17. A Three Step Method</title><p>The integration method</p><p>y 3 = y 2 + 1 12 τ ( 23 y ′ 2 − 16 y ′ 1 + 5 y ′ 0 ) (75)</p><p>is correct for y = 1, y = t, y = t<sup>2</sup> and y = t<sup>3</sup>. For</p><p>y ( t ) = 1 24 M 4 t 4 (76)</p><p>we have from Equation (75) that</p><p>y ( 3 τ ) − y 3 = 3 8 M 4 τ 3 . (77)</p><p>For y ′ = − y , y ( 0 ) = y 0 the characteristic equation of the three step method becomes</p><p>12 z 3 + ( − 12 + 23 τ ) z 2 − 16 τ z + 5 τ = 0 (78)</p><p>and at τ = 0 it reduces to</p><p>12 z 3 − 12 z 2 = 0 , of roots z 1 = 1 , z 2 = z 3 = 0 . (79)</p><p>Implicit differentiation of Equation (78) with respect to τ yields</p><p>36 z 2 z ′ + 23 z 2 + ( − 12 + 23 τ ) 2 z z ′ − 16 z − 16 τ z ′ + 5 = 0 (80)</p><p>and at τ = 0, z = 1, we have that z ′ = − 1 , so that near τ = 0</p><p>z = 1 − τ (81)</p><p>and the method is stable.</p><p>We further have from Equation (79) that at τ = 6/11, z<sub>3</sub> = −1 and z<sub>1</sub> = z<sub>2</sub> = 1/2.</p><p>At the repeating root z = 0, the derivative function z ′ does not exist. Instead we write τ in terms of z as</p><p>τ = 12 ( 1 − z ) 23 z 2 − 16 z + 5 z 2 (82)</p><p>and if z = 0, nearly, then</p><p>τ = 12 5 z 2 (83)</p><p>and</p><p>z = &#177; 5 12 τ . (84)</p></sec><sec id="s18"><title>18. Advancing and Retarding the Computed Motion</title><p>Next, we turn our attention to the second order IVP, see [<xref ref-type="bibr" rid="scirp.94473-ref6">6</xref>] and [<xref ref-type="bibr" rid="scirp.94473-ref7">7</xref>] , as typified by the model second order problem</p><p>y ″ + y = 0 ,   y ( 0 ) = y 0 ,   y ′ ( 0 ) = y ′ 0 (85)</p><p>which we propose to approximate as</p><p>y 0 − 2 y 1 + y 2 τ 2 + ( 1   + ∈ ) y 1 = 0 ,   ∈   = α τ + β τ 2 . (86)</p><p>The characteristic equation of this method is</p><p>z 2 + ( − 2 + τ 2 ( 1   + ∈ ) ) z + 1 = 0. (87)</p><p>For a sufficiently small τ, the roots of the characteristic equation are complex and | z | = 1 . Hence the closed-form prediction of the computed y at step n</p><p>y n = c 1 cos ( n θ ) + c 2 sin ( n θ ) (88)</p><p>where c<sub>1</sub> and c<sub>2</sub> are determined by the initial conditions.</p><p>From the characteristic Equation (87) we have that</p><p>cos ( θ ) = 1 − 1 2 τ 2 ( 1   + ∈ ) ,   sin ( θ ) = 1 2 4 − ( − 2 + τ 2 ( 1   + ∈ ) ) 2 (89)</p><p>or</p><p>θ = τ + 1 2 α τ 2 + 1 24 ( 1 − 3 α 2 + 12 β ) τ 3 + O ( τ 5 ) ,   ∈   = 2 − τ 2 − 2 cos ( τ ) . (90)</p><p>To drop the τ<sup>2</sup> term in the above equation we take α = 0, and are left with</p><p>θ τ = 1 + 1 24 ( 1 + 12 β ) τ 2 + O ( τ 4 ) (91)</p><p>suggesting that θ may be advanced or retarded relative to τ with a proper choice of β. For instance, for β = −1/12 we have that θ = τ, nearly.</p></sec><sec id="s19"><title>19. Integration of the Equation of Motion Linear Prediction</title><p>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.</p><p>To remain both concise and specific, we consider the model initial value problem</p><p>x ′ = − y ,   y ′ = x ,   x 0 = x ( 0 ) = 1 ,   y 0 = y ( 0 ) = 0 (92)</p><p>where x = x(t), y = y(t), t &gt; 0, and where ( ) ′ denotes differentiation with respect to time t. This initial value problem, that coincides with a single second order problem, is solved by x = cos ( t ) , y = sin ( t ) representing a constant circular motion of period T = 2 π .</p><p>We propose to follow the initial value problem with the explicit scheme</p><p>x 1 = x 0 + τ x ′ 0 y 1 = y 0 + τ ( α 0 y ′ 0 + α 1 y ′ 1 ) (93)</p><p>in which τ is the time step, where x<sub>1</sub> = x(τ) and y<sub>1</sub> = y(τ), approximately, and with the coefficients α<sub>0</sub>, α<sub>1</sub> to be presently determined by stability and accuracy considerations.</p><p>With x ′ = − y , y ′ = x , system (93) becomes the system of recursions</p><p>x 1 = x 0 − τ y 0 y 1 = y 0 + τ ( α 0 x 0 + α 1 x 1 ) (94)</p><p>that explicitly produces x<sub>1</sub> and y<sub>1</sub> out of x<sub>0</sub> and y<sub>0</sub>, and then x<sub>2</sub> and y<sub>2</sub> out of x<sub>1</sub> and y<sub>1</sub>, and so on up to x<sub>n</sub> and y<sub>n</sub>. 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</p><p>z x 0 = x 0 − τ y 0 z y 0 = y 0 + τ ( α 0 x 0 + α 1 z x 0 ) (95)</p><p>for any x<sub>0</sub> and y<sub>0</sub>. Equation (95) is recast in the matrix-vector form to assume the form</p><p>[ z − 1 τ − τ ( a 0 + a 1 z ) z − 1 ] [ x 0 y 0 ] = 0 (96)</p><p>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</p><p>det [ z − 1 τ − τ ( a 0 + a 1 z ) z − 1 ] = 0 ,   z 2 + 2 ( − 1 + 1 2 a 1 τ 2 ) z + 1 + a 0 τ 2 = 0 (97)</p><p>for z. The periodic nature of the solution to this initial value problems dictates that z be complex. Let | z | be the modulus of complex z. If | z | &lt; 1 , then | z | n → 0 as n → ∞ , and if | z | &gt; 1 , then | z | n → ∞ as n → ∞ . To avoid these undesirable eventualities of an artificial energy sink and an artificial, numerically induced, energy source, we select α<sub>0</sub> = 0 in Equation (94), and are left with the reduced characteristic equation</p><p>z 2 + 2 ( − 1 + 1 2 α 1 τ 2 ) z + 1 = 0 ,   a z 2 + b z + c = 0 (98)</p><p>that possesses two complex roots z<sub>1</sub> and z<sub>2</sub> such that z 1 z 2 = c / a = | z | 2 = 1 .</p><p>In fact,</p><p>z = 1 − 1 2 α 1 τ 2 &#177; i τ α 1 − 1 4 α 1 2 τ 2 (99)</p><p>where i<sup>2</sup> = −1, and z is complex if</p><p>α 1 &gt; 0 ,   4 − α 1 τ 2 &gt; 0. (100)</p><p>By the fact that | z | = 1 , the complex solution to Equation (98) is energy conserving, and may be written as</p><p>z 1 = cos ( θ ) − i sin ( θ ) ,   z 2 = cos ( θ ) + i sin ( θ ) (101)</p><p>with</p><p>cos ( θ ) = 1 − 1 2 α 1 τ 2 ,   sin ( θ ) = τ α 1 − 1 4 α 1 2 τ 2 . (102)</p><p>Now, x<sub>n</sub> and y<sub>n</sub> are generally written as</p><p>x n = c 1 z 1 n + c 2 z 2 n ,   y n = c ′ 1 z 1 n + c ′ 2 z 2 n (103)</p><p>with constants c 1 , c 2 , c ′ 1 , c ′ 2 determined by the initial conditions. Given x<sub>0</sub> = 1, y<sub>0</sub> = 0 we get from Equation (94), x<sub>1</sub> = 1, y<sub>1</sub> = α<sub>1</sub>τ. Writing x<sub>n</sub> and y<sub>n</sub> in Equation (102) for n = 0 and n = 1 we obtain the two systems of linear equations</p><p>[ 1 1 z 1 z 2 ] [ c 1 c 2 ] = [ 1 1 ] ,     [ 1 1 z 1 z 2 ] [ c ′ 1 c ′ 2 ] = a 1 τ [ 0 1 ] (104)</p><p>readily solved for c 1 , c 2 , c ′ 1 , c ′ 2 as</p><p>[ c 1 c 2 ] = 1 z 2 − z 1 [ z 2 − 1 − z 1 + 1 ] ,     [ c ′ 1 c ′ 2 ] = a 1 τ z 2 − z 1 [ − 1 1 ] (105)</p><p>in which z 1 = cos ( θ ) − i sin ( θ ) , z 2 = cos ( θ ) + i sin ( θ ) , z 2 − z 1 = 2 i sin ( θ ) . Writing z<sub>1</sub> and z<sub>2</sub> in terms of θ recasts Equation (103) into the form</p><p>x n = ( c 1 + c 2 ) cos ( n θ ) + i ( c 2 − c 1 ) sin ( n θ ) , y n = ( c ′ 1 + c ′ 2 ) cos ( n θ ) + i ( c ′ 2 − c ′ 1 ) sin ( n θ ) (106)</p><p>and we have from Equation (105) that</p><p>c 1 + c 2 = 1 ,   c 2 − c 1 = − i ( sin ( θ ) ) − 1 α 1 τ 2 c ′ 1 + c ′ 2 = 0 ,   c ′ 2 − c ′ 1 = − i ( sin ( θ ) ) − 1 α 1 τ (107)</p><p>with which we finally get</p><p>x n = cos ( n θ ) + 1 2 α 1 τ 2 ( sin ( θ ) ) − 1 sin ( n θ ) ,   y n = α 1 τ ( sin ( θ ) ) − 1 sin ( n θ ) (108)</p><p>as the general numerical solution to our initial value problem.</p></sec><sec id="s20"><title>20. Period Control</title><p>A cycle is completed when sin ( n θ ) = 0 or n θ = 2 π . Then, according to Equation (108) y<sub>n</sub> = 0 and x<sub>n</sub> = 1. From τ n θ = 2 π τ and T = nτ we obtain the computed period as</p><p>T = 2 π τ θ (109)</p><p>and to retain T = 2 π we select α<sub>1</sub> in Equation (93) so as to guarantee τ = θ or sin ( τ ) = sin ( θ ) . This condition becomes, in view of Equation (102),</p><p>sin ( τ ) = τ α 1 − 1 4 α 1 2 τ 2 (110)</p><p>leading to the quadratic equation</p><p>1 4 τ 2 α 1 2 − α 1 + sin 2 ( τ ) τ 2 = 0 (111)</p><p>for α<sub>1</sub>, and resulting in</p><p>α 1 = 2 ( 1 − cos ( τ ) ) / τ 2 (112)</p><p>or</p><p>α 1 = 1 − 1 12 τ 2 + 1 360 τ 4 . (113)</p><p>if τ is small.</p></sec><sec id="s21"><title>21. Quadratic Prediction</title><p>Inclusion of the acceleration in the prediction of x<sub>1</sub> suggests the higher order scheme</p><p>x 1 = x 0 + τ x ′ 0 + 1 2 τ 2 x ″ 0 y 1 = y 0 + 1 2 τ ( α 0 y ′ 0 + α 1 y ′ 1 ) (114)</p><p>that becomes for</p><p>x ′ = − y ,   y ′ = x ,   x ″ = − x x 1 = x 0 − τ y 0 − 1 2 τ 2 x 0 , y 1 = y 0 + 1 2 τ ( α 0 x 0 + α 0 x 1 ) . (115)</p><p>Substitution of x<sub>1</sub> = zx<sub>0</sub>, y<sub>1</sub> = zy<sub>0</sub> in Equation (115) results in the system</p><p>[ z − 1 + 1 2 τ 2 τ − 1 2 τ ( a 0 + a 1 z ) z − 1 ] [ x 0 y 0 ] = 0 (116)</p><p>from which we obtain the quadratic characteristic equation</p><p>det [ z − 1 + 1 2 τ 2 τ − 1 2 τ ( a 0 + a 1 z ) z − 1 ] = 0 , z 2 + 2 ( − 1 + 1 4 τ 2 + 1 4 a 1 τ 2 ) z + 1 + 1 2 τ 2 ( a 0 − 1 ) = 0 (117)</p><p>for magnification factor z. To assure | z | = 1 for the complex roots of Equation (117) we set α<sub>0</sub> = 1 and are left with</p><p>z 2 + 2 ( − 1 + 1 4 τ 2 β ) z + 1 = 0 (118)</p><p>where β = 1 + α<sub>1</sub>. The two roots of Equation (118) are</p><p>z = 1 − 1 4 τ 2 β &#177; i τ 1 2 β − 1 16 τ 2 β 2 (119)</p><p>and z is complex if</p><p>β &gt; 0 ,   8 − τ 2 β &gt; 0. (120)</p><p>Because | z | = 1 we may write the complex roots of Equation (118) as</p><p>z = cos ( θ ) &#177; i sin ( θ ) ,   cos ( θ ) = 1 − 1 4 τ 2 β ,   sin ( θ ) = τ 1 2 β − 1 16 τ 2 β 2 . (121)</p><p>The numerical scheme is period conserving if τ = θ, or sin θ = sin τ . This is assured, according to Equation (121), by β such that</p><p>sin ( τ ) = τ 1 2 β − 1 16 τ 2 β 2 (122)</p><p>or</p><p>1 16 τ 2 β − 1 2 β + ( sin ( τ ) τ ) 2 = 0 (123)</p><p>resulting in</p><p>β = 4 ( 1 − cos ( τ ) ) / τ 2 (124)</p><p>or</p><p>α 1 = 1 − 1 6 τ 2 + 1 180 τ 4 (125)</p><p>if τ is small.</p></sec><sec id="s22"><title>22. Conclusion</title><p>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.</p></sec><sec id="s23"><title>Conflicts of Interest</title><p>The author declares no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s24"><title>Cite this paper</title><p>Fried, I. (2019) Consistency and Stability Issues in the Numerical Integration of the First and Second Order Initial Value Problem. Applied Mathematics, 10, 676-690. https://doi.org/10.4236/am.2019.108048</p></sec></body><back><ref-list><title>References</title><ref id="scirp.94473-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Hairer, E., Norset, S.P. and Wanner, G. (1980) Solving Ordinary Differential Equations. Springer-Verlag, Berlin, Heidelberg.</mixed-citation></ref><ref id="scirp.94473-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Gautschi, W. (2010) Numerical Analysis. 2nd Edition, Birkhauser, Berlin.</mixed-citation></ref><ref id="scirp.94473-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">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</mixed-citation></ref><ref id="scirp.94473-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">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</mixed-citation></ref><ref id="scirp.94473-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Dahlquist, G. (1963) A Special Stability Problem for Linear Multistep Methods. BIT Numerical Mathematics, 3, 27-43. https://doi.org/10.1007/BF01963532</mixed-citation></ref><ref id="scirp.94473-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">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</mixed-citation></ref><ref id="scirp.94473-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">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</mixed-citation></ref></ref-list></back></article>