11
 Proceedings of the 12th International Conference on Computational and Mathematical Methods in Science and Engineering, CMMSE 2012 July, 2-5, 2012. A rational Falkner method for solving special second order IVPs Higinio Ramos 1 and Ces´ areo Lore nzo 2 1 Scientic Computing Group, University of Salamanca. Spain 2 Escuela Polit´ ecnica Superior de Zamor a, University of Salamanc a. Spain emails:  [email protected] ,  [email protected] Abstract In this paper we present the construction of a rational non-standard explicit algo- rithm for solving initial -value problems of the special second order. The main formula is a ration al one to follo w the solution. The appearanc e of the rst derivative in this main formula requires the use of a second formula to follow the derivative, as is usually done in Falkner methods. Local truncation errors and linear stabi lity analys is are ad- dressed. Some numeri cal experimen ts are consi dered in order to check the behav ior of the proposed method. Key words: rational method, Falkner method, spe cial second order ODEs MSC 2000: 65L05 1 In tr oduct io n Second-order dierential equations deserve special consideration because they appear fre- quen tly in applie d sciences. Exampl es of that are the mass mov ement under the action of a force, problems of orbital dynamics, or in general, any problem involving Newton’s law. There is a vast literature addressing the numerical solution of the so-called  special second-order  initial value problem (I.V.P.) y ′′ (x) = f (x, y(x)), y(x 0 ) = y 0 , y (x 0 ) = y 0 , x ∈  [ x 0 ,x N ] ,  (1) (see for example the classical books by Henrici [6], Collatz [1], Lambert [7], Shampine and Gordon [10] or Hairer et al. [5]). c CMMSE ISBN:978-84-615-5392-1

A rational Falkner method for solvin initial value problems

Embed Size (px)

DESCRIPTION

In this paper the authors propose a rational Falkner method for solving initial value problems in odes for which the classical polynomial approximation fails.

Citation preview

  • Proceedings of the 12th International Conferenceon Computational and Mathematical Methodsin Science and Engineering, CMMSE 2012July, 2-5, 2012.

    A rational Falkner method for solving special second orderIVPs

    Higinio Ramos1 and Cesareo Lorenzo2

    1 Scientic Computing Group, University of Salamanca. Spain

    2 Escuela Politecnica Superior de Zamora, University of Salamanca. Spain

    emails: [email protected], [email protected]

    Abstract

    In this paper we present the construction of a rational non-standard explicit algo-rithm for solving initial-value problems of the special second order. The main formulais a rational one to follow the solution. The appearance of the rst derivative in thismain formula requires the use of a second formula to follow the derivative, as is usuallydone in Falkner methods. Local truncation errors and linear stability analysis are ad-dressed. Some numerical experiments are considered in order to check the behavior ofthe proposed method.

    Key words: rational method, Falkner method, special second order ODEsMSC 2000: 65L05

    1 Introduction

    Second-order dierential equations deserve special consideration because they appear fre-quently in applied sciences. Examples of that are the mass movement under the action ofa force, problems of orbital dynamics, or in general, any problem involving Newton's law.

    There is a vast literature addressing the numerical solution of the so-called specialsecond-order initial value problem (I.V.P.)

    y 00(x) = f(x; y(x)); y(x0) = y0; y 0(x0) = y 00; x 2 [x0; xN ] ; (1)

    (see for example the classical books by Henrici [6], Collatz [1], Lambert [7], Shampine andGordon [10] or Hairer et al. [5]).

    cCMMSE ISBN:978-84-615-5392-1

  • Rational Falkner method

    Although it is possible to integrate a second-order I.V.P. by reducing it to a rst-ordersystem and applying one of the methods available for such systems, it seems more natural toprovide numerical methods in order to integrate the problem directly. The Stormer-Cowellmethods is a well-known class of schemes of this type.

    The advantage of this procedure lies in the fact that they are able to exploit specialinformation about ODES, and this results in an increase in eciency. For instance, it is well-known that Runge-Kutta-Nystrom methods for (1) involve a real improvement as comparedto standard Runge-Kutta methods for a given number of stages ([5], p. 285), although thecomputational cost remains high because of the number of function evaluations. On theother hand, a linear k-step method for rst-order ODEs becomes a 2k-step method for (1),([5], p. 461), increasing the computational work.

    One of the methods for numerically solving the problem in (1) is the explicit methoddue to Falkner [2], which can be written in the form

    yn+1 = yn + h y0n + h

    2k1Xj=0

    j 5j fn ;(2)

    y0n+1 = y0n + h

    k1Xj=0

    j 5j fn ;

    where h is the stepsize, yn and y0n are approximations to the values of the solution and

    its derivative at xn = x0 + nh , fn = f(xn; yn; y0n) and 5jfn is the standard notation for

    the backward dierences. The coecients j and j can be obtained using appropriategenerating functions [3].

    The implicit Falkner formulas may also be used for solving the above problem, (see [1])and may be written as

    yn+1 = yn + h y0n + h

    2kX

    j=0

    j 5j fn+1 ;(3)

    y0n+1 = y0n + h

    kXj=0

    j 5j fn+1 ;

    where the coecients can be obtained using appropriate generating functions [3].For the problem in (1) the above formulas may be used more eciently taking the

    explicit formula in (2) to approximate the solution and the corresponding implicit formulain (3) to approximate the derivative (for details see [3]). In this way, the two-step procedureprovided by the Falkner formulas is given by

    cCMMSE ISBN:978-84-615-5392-1

  • H. Ramos, C. Lorenzo

    yn+1 = yn + h y0n +

    h2

    6

    4y00n y00n1

    (4)

    y0n+1 = y0n +

    h

    12(5y00n+1 + 8y

    00n y00n1) ;

    which result in an explicit method due to the absence of the derivative in the functionf(x; y). The local truncation errors for these formulas are given respectively by

    1

    8y(4)(xn)h

    4 +O(h5) and 124

    y(5)(xn)h4 +O(h5) :

    A similar strategy was used by Beeman [9] to develop the well-known semi-implicitmethod

    yn+1 = yn + h y0n +

    h2

    6

    4y00n y00n1

    (5)

    y0n+1 = y0n +

    h

    6(2y00n+1 + 5y

    00n y00n1) :

    which has been commonly used in molecular dynamics, when the acceleration at time onlydepends on position and not on velocity. In this case the local truncation errors are givenby

    1

    8y(4)(xn)h

    4 +O(h5) and 112

    y(4)(xn)h3 +O(h4) :

    2 Rational Falkner method

    In this section we derive a rational method to approximate the solution y(xn+1) for theproblem in (1) based on the ideas in [4]. We suggest an approximation to the theoreticalsolution y(xn+1) by

    y(xn + h) = y(xn) + h y0(xn) +

    h2 y 00(xn)y(xn) + a(h)y 0(xn)

    ; (6)

    where a(h) is a suciently dierentiable unknown function of the step size that has to bedetermined and it is assumed that y(xn) + a(h)y

    0(xn) 6= 0.From (6) it results that

    Fn(y; a; h) =y(xn + h) y(xn) hy 0(xn)

    y(xn) + a(h)y

    0(xn) h2 y 00(xn) = 0 :

    cCMMSE ISBN:978-84-615-5392-1

  • Rational Falkner method

    Now, if we consider a(h) expanded in Taylor series about h = 0, after expanding Fn(y; a; h)in Taylor series about xn the following expression is obtained:

    Fn(y; a; h) =1

    2

    2 + y(xn) + a(0)y 0(xn) y 00(xn)h2+1

    6

    hy(xn) y

    (3)(xn) + y0(xn)

    3 a0(0) y 00(xn) + a(0) y(3)(xn)

    ih3

    +O(h4) : (7)

    Imposing that the coecients of h2 and h3 in (7) vanish, we obtain a system of equationsfrom which it is readily deduced that

    a(0) =2 y(xn)y 0(xn)

    ;

    a0(0) =2y(3)(xn)

    3 y 0(xn) y 00(xn);

    provided that y 0(xn); y 00(xn) 6= 0. Introducing the above values in the Taylor series of a(h)we have

    a(h) =2 y(xn)y0(xn)

    2hy(3)(xn)

    3y0(xn)y00(xn)+O(h2) : (8)

    From (6) and (8) it is readily deduced the numerical scheme, which may be written in theform

    yn+1 = yn + hy0n +

    3h2 f2n6 fn 2h f 0n

    ; (9)

    where yn = y(xn) ; yn+1 ' y(xn+1) ; fn = f(xn; yn) and

    f 0n =@ f

    @ x(xn; yn) +

    @ f

    @ y(xn; yn) y

    0n :

    It can be easily checked that the method in (9) is exact when the solution of the dierentialequation is of the form

    y(x) = c1 + c2 x+c3

    c4 + x

    where the ci are arbitrary constants.

    The presence of the derivative in the formula in (9) forces to consider a second formulato follow the derivative on each step. Due to the form of the function f(x; y) we include the

    cCMMSE ISBN:978-84-615-5392-1

  • H. Ramos, C. Lorenzo

    value y 00(xn+ h) in the formula. Following a similar procedure as for the formula in (9) wehave obtained the formula

    y0n+1 = y0n +

    4h f2n(2fn + fn+1)

    12 f2n 2h fn f 0n + h2 (f 0n)2: (10)

    The rational Falkner method consists in both formulas (9) and (10)

    yn+1 = yn + hy0n +

    3h2 f2n6 fn 2h f 0n

    ;

    (11)

    y0n+1 = y0n +

    4h f2n(2fn + fn+1)

    12 f2n 2h fn f 0n + h2 (f 0n)2:

    3 Local truncation errors

    To obtain the expressions for the local truncation errors we follow the procedure as in [7].We consider the functional given by

    L(z(x); h) = z(x+ h) z(x) h z 0(x) 3h2 (z 00(x))2

    6 z 00(x) 2h z(3)(x) ; (12)

    where z(x) is an arbitrary function dened on [x0; xN ] and dierentiable as often as weneed, after expanding in Taylor series about x and collecting terms in h we obtain

    L(z(x); h) = 172

    3z(4)(x) 4

    z(3)(x)

    2z00(x)

    !h4 +O(h5) ; (13)

    which means that the formula in (9) has at least second-order of accuracy. The localtruncation error of the method may be written as

    Tn+1 =1

    72

    0B@3y(4)n 4y(3)n

    2y 00n

    1CA h4 +O(h5) ;where y

    (4)n ; y

    (3)n ; y 00n denote respectively the numerical approximations to the fourth, third

    and second derivatives of y(x) at the point xn.

    For the formula in (10) we consider the functional given by

    Lp(z(x); h) = z0(x+ h) z0(x) 4h (z00(x))2(2z 00(x) + z 00(x+ h))

    12 (z 00(x))2 2h z 00(x) z(3)(x) + h2 (z(3)(x))2 ; (14)

    cCMMSE ISBN:978-84-615-5392-1

  • Rational Falkner method

    After expanding in Taylor series about x and collecting terms in h results

    Lp(z(x); h) = 3z(3)(x)3 z(5)(x)z00(x)2 2z(4)(x)z(3)(x)z00(x)

    72z00(x)2

    !h4 +O(h5) ; (15)

    and the local truncation error for the formula in (10) may be written as

    T pn+1 =

    3(y

    (3)n )3 y(5)n (y 00n )2 2y(4)n y(3)n y 00n

    72(y 00n )2

    !h4 +O(h5) ;

    with the obvious notations for the derivatives of y(x) at the point xn.

    4 Stability analysis

    The linear stability analysis of the above formulas follow a similar procedure as for linearmultistep methods. Considering the Dahlquist's test given by

    y00(x) = 2y(x); y(xn) = yn; y0(xn) = yn : (16)

    The solution of this problem is y(x) = e(xxn)yn, from which we obtain that y(xn + h) =ehy(xn). This means that for < 0 the exact solution decreases. It should be expectedthat the application of the numerical method to this problem has a similar behavior. If weapply the method in (9) to the problem in (16) we obtain the dierence equation

    yn+1 =h22 + 4h+ 6

    6 2h yn :

    Setting H = h the stability function is obtained as

    R(H) =H2 + 4H + 6

    6 2H :

    If H were allowed to be in the complex plane, than the stability region of the methodconsists of the region in the H-complex plane for which it is jR(H)j < 1, which is plottedin Figure 1.

    In particular, for < 0 the stability interval results from the intersection with the realaxis, and is given by 6 < H < 0.

    5 Numerical experiments

    In order to evaluate the performance of the rational Falkner method in this article, we haveconsidered the methods in (4) and (5) for comparison purposes. As they are all two-step

    cCMMSE ISBN:978-84-615-5392-1

  • H. Ramos, C. Lorenzo

    -8 -6 -4 -2 0 2

    -4

    -2

    0

    2

    4

    Figure 1: Stability region for the method in (9).

    methods, apart from the known values y0; y00, we need the value y1 in order to initialize the

    methods. This additional value may be obtained by any one-step method, but as in theexamples we know the exact solution, we have used the true values. The errors have beendened as the maximum of the absolute errors on the nodal points of the solution over theintegration interval

    Emax(y) = maxxj2[x0;xN ]

    fjy(xj) yj jg ;

    and the maximum of the absolute errors on the nodal points of the derivative over theintegration interval

    Emax(y0) = max

    xj2[x0;xN ]jy0(xj) y0j j ;

    where NI refers to the number of steps used in the integration.

    5.1 Example 1

    Consider the nonlinear problem

    y 00(x) = 6 y(x)2 ; y(0) = 1 ; y0(0) = 2 ;

    cCMMSE ISBN:978-84-615-5392-1

  • Rational Falkner method

    whose exact solution is y(x) =1

    (x+ 1)2. We have integrated this problem over the interval

    [0; 2]. In Table 1 appear the errors for the solution and the derivative for dierent number ofsteps. We have included a nal column named CPU with the computational time needed,in seconds. We observe that the computational times are similar for the tree methodsconsidered, but the errors are smaller with the rational method.

    5.2 Example 2

    Consider the problem

    y 00(x) = 6 y(x)2 6 ; y(0) = 2 ; y0(0) = 0 ;

    whose exact solution is y(x) = 2 + 3 tan2p

    3x. We have integrated this problem over

    the interval [0; 0:8]. In Table 2 appear for dierent number of steps the maximum of therelative errors on the grid points over the integration interval for the solution. We see thatthe rational Falkner method shows a better performance.

    6 Conclusions

    A two-step rational Falkner method for solving initial-value problems of the special formy00 = f(x; y) has been presented. The method consists in a couple of rational formulas,one to follow the solution, and the other to follow the derivative. The analysis of the localtruncation errors and the stability region are presented. The numerical examples show thegood performance of the method.

    References

    [1] L. Collatz, The Numerical treatment of Dierential Equations, Springer, Berlin,1966.

    [2] V. M. Falkner, A method of numerical solution of dierential equations, Phil. Mag.S. 7, 21 (1936) 621-640.

    [3] H. Ramos, C. Lorenzo, Review of explicit Falkner methods and its modications forsolving special second-order I.V.P.s, Computer Physics Communications 181 (2010)1833-1841.

    [4] H. Ramos, A non-standard explicit integration scheme for initial-value problems, Ap-plied Mathematics and Computation 189 (2007) 710{718.

    cCMMSE ISBN:978-84-615-5392-1

  • H. Ramos, C. Lorenzo

    [5] E. Hairer, S. P. Norsett and G. Wanner, Solving Ordinary Dierential EquationsI , Springer, Berlin, 1987.

    [6] P. Henrici, Discrete variable Methods in Ordinary Dierential Equations, John Wiley,New York, 1962.

    [7] J. D. Lambert, Computational Methods in Ordinary Dierential Equations, JohnWiley & sons, London, 1973.

    [8] M. K. Jain, Numerical Solution of Dierential Equations, Wiley Eastern Limited,New Delhi, 1984.

    [9] D. Beeman, Some multistep methods for use in molecular dynamics calculations, J.Comput. Phys. 20(1976) 130.

    [10] L. F. Shampine and M. K. Gordon, \Computer solution of Ordinary DierentialEquations. The initial Value Problem", (1975), Freeman, San Francisco, CA.

    cCMMSE ISBN:978-84-615-5392-1

  • Rational Falkner method

    Beeman (5) NI Emax(y) Emax(y0) CPU

    100 5:70 103 7:59 103 0:000200 1:43 103 1:92 103 0:016400 3:60 104 4:82 104 0:016800 9:04 105 1:21 104 0:0311600 2:25 105 3:02 105 0:1253200 5:63 106 7:54 106 0:203

    Falkner (4) NI Emax(y) Emax(y0) CPU

    100 6:78 104 9:02 104 0:015200 9:04 105 1:20 104 0:016400 1:16 105 1:55 105 0:031800 1:48 106 1:97 106 0:0631600 1:86 107 2:48 107 0:1403200 2:34 108 3:12 108 0:313

    Method (11) NI Emax(y) Emax(y0) CPU

    100 5:26 105 7:06 105 0:000200 7:31 106 9:79 106 0:015400 9:63 107 1:29 106 0:016800 1:24 107 1:65 107 0:0471600 1:56 108 2:09 108 0:1093200 1:96 109 2:63 109 0:219

    Table 1: Data for the problem y 00(x) = 6 y(x)2. Maximum absolute errors for dierentnumber of steps.

    cCMMSE ISBN:978-84-615-5392-1

  • H. Ramos, C. Lorenzo

    NI Beeman (5) Falkner (4) Method (11)

    100 5:26 103 1:17 103 1:48 104200 1:42 103 1:60 104 2:18 105400 3:72 104 2:09 105 2:97 106800 9:49 105 2:67 106 3:89 1071600 2:42 105 3:37 107 5:04 1083200 6:05 106 4:24 108 6:33 109

    Table 2: Data for the problem y 00(x) = 6 y(x)2 6. Maximum relative errors for dierentnumber of steps.

    cCMMSE ISBN:978-84-615-5392-1