A review on numerical schemes for solving a linear ...

3 downloads 0 Views 589KB Size Report
Sep 30, 2013 - A. Tocino were supported by a grant of Vicerrectorado de Investigación of Salamanca University. M. J. Senosiain (B) · A. Tocino. Department of ...
A review on numerical schemes for solving a linear stochastic oscillator

M. J. Senosiain & A. Tocino

BIT Numerical Mathematics ISSN 0006-3835 Bit Numer Math DOI 10.1007/s10543-014-0507-z

1 23

Your article is protected by copyright and all rights are held exclusively by Springer Science +Business Media Dordrecht. This e-offprint is for personal use only and shall not be selfarchived in electronic repositories. If you wish to self-archive your article, please use the accepted manuscript version for posting on your own website. You may further deposit the accepted manuscript version in any repository, provided it is only made publicly available 12 months after official publication or later and provided acknowledgement is given to the original source of publication and a link is inserted to the published article on Springer's website. The link must be accompanied by the following text: "The final publication is available at link.springer.com”.

1 23

Author's personal copy BIT Numer Math DOI 10.1007/s10543-014-0507-z

A review on numerical schemes for solving a linear stochastic oscillator M. J. Senosiain · A. Tocino

Received: 30 September 2013 / Accepted: 10 June 2014 © Springer Science+Business Media Dordrecht 2014

Abstract In recent years several numerical methods to solve a linear stochastic oscillator with one additive noise have been proposed. The usual aim of these approaches was to preserve different long time properties of the oscillator solution. In this work we collect these properties, namely, symplecticity, linear growth of its second moment and asymptotic oscillation around zero. We show that these features can be studied in terms of the coefficients of the matrices that appear in the linear recurrence obtained when the schemes are applied to the oscillator. We use this study to compare the numerical schemes as well as to propose new schemes improving some properties of classical methods. Keywords Stochastic differential equations · Stochastic oscillator · Stochastic Hamiltonian systems · Stochastic numerical methods · Stochastic symplectic integrators · Second order moment Mathematics Subject Classification (2010)

60H10 · 60H35 · 65P10

Communicated by Anne Kværnø. M. J. Senosiain was supported by MINECO under Project MTM2012-38445. M. J. Senosiain and A. Tocino were supported by a grant of Vicerrectorado de Investigación of Salamanca University. M. J. Senosiain (B) · A. Tocino Department of Mathematics, University of Salamanca, Salamanca, Spain e-mail: [email protected] A. Tocino e-mail: [email protected]

123

Author's personal copy M. J. Senosiain, A. Tocino

1 Introduction Our aim is to compare the behavior of some numerical schemes proposed to solve the linear stochastic oscillator with one additive noise X¨ t + X t = α W˙ t , where α > 0 is a constant and Wt is a standard Wiener process. This oscillator can be written as the 2-dimensional Itô system    d Xt 0 = dYt −1

1 0



   Xt 0 dt + α dWt , t ≥ 0. Yt 1

(1.1)

The unique solution of (1.1) for initial data X 0 = x0 ∈ R, Y0 = y0 ∈ R is given, see [9], by t X t = x0 cos(t) + y0 sin(t) + α

sin(t − s) dWs , 0

t Yt = −x0 sin(t) + y0 cos(t) + α

cos(t − s) dWs . 0

The present study is focused on three important properties of this analytical solution: (i) Symplecticity: The linear stochastic oscillator is a stochastic Hamiltonian system, see [6]. Then its phase flow preserves symplectic structure, i.e. d X t ∧ dYt = d x0 ∧ dy0 for all t ≥ 0. (ii) Linear growth of the second moment, see [9]: E[X t2 + Yt2 ] = x02 + y02 + α 2 t, ∀t ≥ 0. (iii) Oscillatory character of the components, see [7]: X t and Yt have infinitely many zeros, all simple, on [t0 , ∞) for every t0 ≥ 0; so the solution oscillates infinitely often. 2 Algebraic conditions for the three properties If a numerical method with constant step size  is applied to the problem (1.1), discrete approximations {(xn , yn )} at tn = n with xn ≈ X tn , yn ≈ Ytn are produced. All the numerical methods reviewed in this paper share the same form, namely 

xn+1 yn+1

 =A

   xn a + α b  Wn := 11 yn a21

a12 a22

    xn b1 +α  Wn yn b2

(2.1)

with Wn = Wtn+1 − Wtn and the matrix A and the vector b depending on the method and on the constant step size .

123

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator

2.1 Symplecticity A straightforward computation gives that a method of the form (2.1) preserves symplectic structure if and only if condition (D)

det (A) = 1

is fulfilled. 2.2 Linear growth of the second moment Mimicking property (ii) in Sect. 1, the linear growth of the second moment of the numerical solution {(xn , yn )} at the points tn = n will be given by condition   E xn2 + yn2 = x02 + y02 + α 2 tn , ∀n ≥ 0.

(2.2)

From (2.1) we get  2

 

   2 2 2 E x 2 + a2 + a2 E y2 = a11 + a21 + yn+1 E xn+1 n 12 22 n

+2 (a11 a12 + a21 a22 ) E [xn yn ] + α 2 b12 + b22  for n ≥ 0. Then linear growth of the second moment condition (2.2) of a numerical method of the form (2.1) is equivalent to the identities (G1)

a11 a12 + a21 a22 = 0;

(G2)

2 + a 2 = 1; a11 21

(G3)

2 + a 2 = 1; a12 22

(G4)

b12 + b22 = 1.

2.3 Asymptotic oscillations around zero To prove the oscillatory character of {xn } we follow the idea given in [9]; with a similar proof the oscillatory character of {yn } would be shown.   xn+1 Consider the recurrence (2.1) with initial conditions x0 , y0 ; define Z n = xn if n ≥ 0. For n ≥ 1 Z n = B Z n−1 + rn with B=

 tr(A) 1

   −det(A) α (b1  Wn + (a12 b2 − a22 b1 ) Wn−1 ) , rn = 0 0

123

Author's personal copy M. J. Senosiain, A. Tocino

where tr(A), det(A) stand for the trace and the determinant of A, respectively. Then if n ≥ 1 n B n− j r j . (2.3) Zn = Bn Z0 + j=1

Suppose that 4det(A) − (tr(A))2 > 0;

(S1)

since the eigenvalues of B are tr(A) ±i λ± = 2



4det(A) − (tr(A))2 , 2

√ they can be written λ± = det(A) e±iθ for some 0 < θ < π. Then it can be shown that ⎛ ⎞ (det(A))n/2 sin((n+1)θ) −(det(A))(n+1)/2 sin(nθ) sin(θ) sin(θ) ⎠. Bn = ⎝ n/2 sin((n−1)θ) (det(A))(n−1)/2 sin(nθ) −(det(A)) sin(θ) sin(θ) Denoting αˆ n = (det(A))n/2

sin ((n + 1)θ ) sin(nθ ) , βˆn = −(det(A))(n+1)/2 sin(θ ) sin(θ )

and considering the first component in (2.3) one has xn+1 = αˆ n (a11 x0 + a12 y0 + αb1 W0 ) + βˆn x0 +

n

αˆ n−i rˆi

i=1

where rˆi = α (b1 Wi + (a12 b2 − a22 b1 )Wi−1 ) for i ≥ 1, i.e. xn+1 = αˆ n (a11 x0 + a12 y0 ) + βˆn x0 +

n

αˆ n−i rˆi ,

(2.4)

i=0

with rˆ0 = αb1 W0 . Suppose now that det(A) = 1. Then the sequences αˆ n , βˆn are bounded. If in addition b1 = 0, then rˆ0 = 0, rˆi = α a12 b2 Wi−1 , i ≥ 1. Therefore αˆ n−i rˆi ≡ N(0, γi2 ) with 2 α 2 a 2 b2 . On the other hand, if a b − a b = 0 then rˆ = α b W , γi2 = αˆ n−i 12 2 22 1 i 1 i 12 2 2 α 2 b2 . From these assertions we obtain i ≥ 0 and αˆ n−i rˆi ≡ N(0, γi2 ) with γi2 = αˆ n−i 1 that if (S2)

123

{b1 = 0 and a12 b2 = 0} or {a12 b2 − a22 b1 = 0 and b1 = 0},

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator

n the sequence {γi2 } is bounded and sn2 := i=0 γi2 → +∞ as n → +∞. It follows from n the Law of the Iterated Logarithm, see Itô [4], that the sequence {Sn }n≥0 , Sn := ˆ n−i rˆi will exceed a.s. every positive and negative bounds infinitely often as i=0 α n → +∞. Using this in (2.4) together with the fact that the sequence αˆ n (a11 x0 + a12 y0 ) + βˆn x0 is bounded, we finally conclude that: Lemma 2.1 If a numerical method applied with constant step size to the problem (1.1) is of the form (2.1) and satisfies conditions (D), (S1) and (S2) then the component {xn } of the numerical solution switch signs a.s. infinitely many times as n → +∞. 3 Comparison on symplecticity and oscillatory character The following list gathers the schemes under analysis together with some relevant reference where each method is applied to the proposed stochastic oscillator: • Euler–Maruyama method (EM) [9]: 

1 A= −

    0 , b= 1 1

• Backward Euler–Maruyama method (BEM) [9]: A=

1 1 + 2



1 −

   1   , b= 1 1 + 2 1

• Partitioned Euler–Maruyama method (PEM) [9]:  A=

1 −

    0 , b = 1 1 − 2

(3.1)

• Midpoint Rule method (MR) [2]: A=

1 4 + 2

 4 − 2 −4

   2 4  , b = 4 − 2 4 + 2 2

• Stochastic θ -methods [8]: for 0 ≤ θ ≤ 1 1 A= 1 + 2 θ 2



1 − (1 − θ )θ 2 −

   1  θ , b= 2 2 1 1 − (1 − θ )θ 2 1+ θ (3.2)

• Exponential method (EX) [10]:  A=

cos() − sin()

   sin() 0 , b= cos() 1

123

Author's personal copy M. J. Senosiain, A. Tocino

• Integral method (INT) [1]:  A=

   cos() sin() sin() , b= − sin() cos() cos()

• Symplectic method (SYM) [6]: A=

     1 − 2  , b= 1 − 1

• Optimal method (OPT) [6]:    1 2 sin2 2 cos() sin() A= , b= − sin() cos() sin()  

• Two stage Stochastic Symplectic Runge–Kutta method (2SRK), [5]: For 0 < σ1 , σ2 < 1/2 



⎞ 2 2+σ1 (−1+2σ1 )2 4+2 −1+σ1 (−1+2σ1 ) 4−σ1 (1−2σ1 )2 2 2 2 2 2 2 2 2 ⎟ ⎜ (4+(1−2σ1 )  )(1+σ1  ) (4+(1−2σ1 )  )(1+σ1  ) A=⎜



 ⎟ ⎝ −2 2+σ1 (−1+2σ1 )2 4+2 −1+σ1 (−1+2σ1 ) 4−σ1 (1−2σ1 )2 ⎠ (4+(1−2σ1 )2 2 )(1+σ12 2 ) (4+(1−2σ1 )2 2 )(1+σ12 2 )



⎞  2 + 2σ − σ (−1 + 2σ )(σ − σ ) 2 1 − 2σ 1 2 1 1 1 2 1 ⎠ ⎝ b= (4+(1−2σ1 )2 2 )(1+σ12 2 ) 2(2 + (2σ12 − σ2 )2 ) ⎛

• Predictor–corrector method using PEM as predictor and MR as corrector (PC(PEM– MR)) [3]:    2 2   1 − 2 (1 − 2 ) A= , b= 2 2 1 − 1 − 2 • Predictor-corrector method using EM as predictor and BEM as corrector (PC(EM– BEM)) [3]:      1 − 2  , b= A= 1 − 1 − 2 In the sequel we will refer to these schemes by its abbreviations. Remark 3.1 Recall that EM and BEM are particular θ -methods (θ = 0 and θ = 1, respectively). Observe also that MR, the one stage stochastic symplectic Runge–Kutta method proposed in [5] and the θ -method with θ = 1/2 (trapezoidal method) coincide when they are applied to the oscillator. Except θ -methods with θ = 1/2 (in particular EM and BEM) and PC methods, all the above methods fulfill the condition (D). This result is shown in the first column

123

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator Table 1 Fulfillment of conditions (D), (G1)–(G4), (S1) and (S2) by the methods defined in Sect. 3: 0 means that the condition is not fulfilled √ and the symbols ,  and  mean that it is fulfilled for all  > 0, for 0 <  < 2 and for 0 <  < 2, respectively Method

(D)

(G1)

(G2)

(G3)

(G4)

(S1)

(S2)

EM

0



0

0

0





BEM

0



0

0

0





PEM



0

0

0







MR









0



0

θ = 1/2









0



0

θ = 0, 1/2, 1

0



0

0

0



0

EX















INT















OPT









0



0

SYM



0

0

0

0





2SRK









0



0

PC(PEM–MR)

0

0

0

0

0



0

PC(EM–BEM)

0



0

0

0



0

of Table 1 where the symbols , 0 mean, respectively, that the property is or is not fulfilled. Since the schemes PEM (applied with  < 2), EX, INT and SYM (if  < 2) fulfill conditions (D), (S1) and (S2), Lemma 2.1 ensures that the numerical solution obtained with them oscillates infinitely often. Table 1 shows the accomplishment of conditions (S1)–(S2) by the studied schemes; for condition (S1) two new symbols appear: the symbol  means that the condition is fulfilled if√0 <  < 2 and the symbol  represents that the condition is fulfilled if 0 <  < 2. 4 Linear growth of the second moment 4.1 A review of existing results Several authors have analyzed the growth rate of the second moment of some of the studied schemes applied to the stochastic oscillator. Only INT and EX methods have been proved to preserve exactly the linear growth rate, see [1,10], respectively. Concerning the other methods, in [9] it is proved that EM shows exponential growth and BEM gives a slower growth rate than the original one. In the same work, Strømmen and Higham prove that for PEM there exist functions C1 () and C2 () independent of n and of the form 1 + O() as  → 0 such that for any 0 <  < 2,       C1 () 1 + α 2 tn ≤ E xn2 + yn2 ≤ C2 () 1 + α 2 tn . In [2,8] it was obtained for the MR that   E xn2 + yn2 = x02 + y02 +

1+

1 2  2 α tn ,

(4.1)

2

123

Author's personal copy M. J. Senosiain, A. Tocino

which shows that the midpoint rule gives a linear growth for the second moment, but it underestimates the exact rate. Notice that when  → 0 the growth rate tends to the exact one, i.e. the MR can be said to preserve asymptotically the linear growth rate of the second moment. 4.2 New results The above mentioned results of EM (θ = 0) and BEM (θ = 1) in [9] can be extended to the family of θ -methods. Since these methods are given by (2.1) with (3.2) it is easy to obtain       2 (1 − 2θ ) α2  2 2 E xn2 + yn2 + = 1+ + yn+1 . E xn+1 2 2 1+ θ 1 + 2 θ 2

(4.2)

Notice that (4.1) follows from (4.2) if θ = 1/2. If 0 ≤ θ < 1/2 and 0 < 2 < 2 then  E

xn2

+

yn2



    2 (1 − 2θ ) 2 2 E x ≥ 1+ + y n−1 n−1 1 + 2 θ 2 n    1 1−2θ 2  2 (1 − 2θ )  2 2 2 2 2 1+2 θ 2  n x ≥ e x ≥ ··· ≥ 1 + + y + y 0 0 0 0 1 + 2 θ 2   1 1−2θ t ≥ e 2 1+2 θ 2 n x02 + y02 ,

which grows exponentially with tn . Then the rate of growth of θ -methods with 0 ≤ θ < 1/2 is qualitatively greater than the linear growth rate of the true second moment. 2 (1−2θ) If 1/2 < θ ≤ 1, denoting M = 1 + 1+ 2 θ 2 , then 0 < M < 1 and     2 2 E xn2 + yn2 = M E xn−1 + + yn−1

α2  1 + 2 θ 2

  2 2 + (1 + M) = M 2 E xn−2 + yn−2

α2  1 + 2 θ 2

  α2  = · · · = M n x02 + y02 + (1 + M + · · · + M n−1 ) 1 + 2 θ 2  n     2 2 α 1 +  (1 − θ )2 n 2 2 = M x0 + y0 + 1− (2θ − 1) 1 + 2 θ 2 < x02 + y02 +

α2 (2θ − 1)

which proves that   E xn2 + yn2 = 0, lim tn →∞ tn

123

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator

i.e. the growth rate of θ -methods with 1/2 < θ ≤ 1 is qualitatively slower than the linear growth rate of the true second moment. On the other hand, if 0 <  < 2, the exact rate of growth of PEM can be calculated (see Appendix), giving:   4 2 2 2 2 2 α t + sin (nθ ) (x + y ) + 4x y n 0 0 0 0 4 − 2 4 − 2 2 2  α  sin((n − 1)θ ) sin(nθ ) +√ (x02 − y02 ) sin(2nθ ) − √ 2 sin(θ ) 4− 4 − 2

E[xn2 + yn2 ] = x02 + y02 +



α 2 3 cos((n − 1)θ ) sin(nθ ) , 4 − 2 sin(θ )

with cos(θ ) = 1 − 2 , 0 < θ < π . In a similar way the exact rate of growth of SYM and PC(PEM–MR) are calculated. For SYM it is obtained: 2

  E xn2 + yn2 = x02 + y02 +

  4 2 2 2 2 2 α t + sin (nθ ) (x + y ) − 4x y n 0 0 0 0 4 − 2 4 − 2

 (x02 − y02 ) sin(2nθ ) 4 − 2 α 2 2 (1 − 2 ) sin((n − 1)θ ) sin(nθ ) + √ sin(θ ) 4 − 2 2 3 2 α  (3 −  ) cos((n − 1)θ ) sin(nθ ) , + 4 − 2 sin(θ ) −√

where 0 <  < 2 and cos(θ ) = 1 −

2 2 ,

0 < θ < π ; and for PC(PEM–MR):

E[xn2 + yn2 ]   n   2 2 2 4 − 4 2 2 − y (nθ) − x y sin(2nθ) x02 + y02 + x02 sin = √ √ 0 0 0 4 2 − 2 2 2 2 − 2 ⎤ ⎡     j n−1 3 2 (32 − 4) 2 4 − 4 2 2 ⎣ sin(2 jθ) ⎦, +α  + sin ( jθ) − √ √ 1+ 4 4 4(2 − 2 ) 2 2 2 − 2 j=0

 √ 2 where 0 <  < 2 and cos(θ ) = 2− , 0 < θ < π/2. 2+2 Finally, straightforward calculations give for the OPT  E

xn2

+

yn2



=

x02

+

y02



4 sin2 2 + α 2 tn ; 2

for the 2SRK E[xn2 + yn2 ] = x02 + y02 +

4 + 4(σ1 − σ2 )2 2 α 2 tn ; (4 + (1 − 2σ1 )2 2 )(1 + σ12 2 )

123

Author's personal copy M. J. Senosiain, A. Tocino

and for PC(EM–BEM) E[xn2

+

yn2 ]

= (1 −  +  ) 2

4 n

(x02

+

y02 ) + (1 + 2 )

 n−1 1 (1 − 2 + 4 )k α 2 tn . n k=0

Observe that when  → 0 the growth rate of PEM, SYM, PC(PEM–MR), OPT, 2SRK and PC(EM–BEM) tend to the exact one, i.e. these methods can be said to preserve asymptotically the linear growth rate of the second moment. 4.3 Improved methods In Sect. 2.2 it was shown that linear growth of the second moment of a numerical solution obtained by a method of the form (2.1) is equivalent to fulfill conditions (G1)–(G4). Table 1 shows the accomplishment of conditions (G1)–(G4) by the studied schemes; notice that only EX and INT methods satisfy the four conditions, confirming the assertion at the beginning of Sect. 4.1. Schurz [8] showed how the observed bias in the evolution of the second moment of the stochastic θ -method with θ = 1/2 can be removed changing in the method (3.2) the value of   1 /2 b= 1 1 + 2 /4 by b∗ =



 /2 . 1 1 + 2 /4 1

Actually, as we shall see here, all θ -methods can be improved to preserve the linear growth of the second moment. It is obvious that for any pair  α11 α21

α12 α22



  β1 , β2

(4.3)

2 + α 2 = 0, α 2 + α 2 = 0, β 2 + β 2 = 0, the method (2.1) with with α11 21 12 22 1 2

⎛ A=

 α11 2 2 ⎜ α11 +α21 ⎝ α21  2 +α 2 α11 21

⎞  α12 2 2 α12 +α22 ⎟ ⎠  α22 2 +α 2 α12 22

and

1

b=  β12 + β22

  β1 β2

(4.4)

fulfills (G2),(G3) and (G4). Observe also that if the matrix in (4.3) satisfies condition (G1), then so do the matrix A in (4.4). In sum, if a method represented by the pair (4.3) satisfies (G1) it can be improved so that the new method, represented by the pair

123

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator

in (4.4), satisfies (G1)–(G4) and, consequently, this improved method preserves the exact rate of growth of the second moment. In this sense we have • Improved stochastic θ -methods:    1 − θ (1 − θ )2 , − 1 − θ (1 − θ )2 1 + 2 (1 − θ )2 1 + 2 θ 2   1 θ ∗ b =√ . 2 2 1 1+ θ 1

A∗ =



In particular the improved Euler–Maruyama method (IEM) is given by     1 1  0 , b∗ = A∗ = √ , 1 1 + 2 − 1 and the improved Backward Euler–Maruyama method (IBEM) by     1 1 1   A∗ = √ , b∗ = √ . 2 2 − 1 1 1+ 1+ Notice also that the improved θ -method for θ = 1/2 coincides with the above mentioned proposed by Schurz in [8]. • Improved optimal method (IOPT): 

cos() A = − sin() ∗

    sin() sin 2

∗ . , b = cos() cos 2

• Improved two stage Stochastic Symplectic Runge–Kutta method (I2SRK): A∗





 4+2 −1+σ1 (−1+2σ1 ) 4−σ1 (1−2σ1 )2 2 ⎜ (4+(1−2σ1 )2 2 )(1+σ1 2 ) =⎜

⎝ −2 2+σ1 (−1+2σ1 )2 2 (4+(1−2σ1 )2 2 )(1+σ1 2 )





⎞ 2 2+σ1 (−1+2σ1 )2 2 ⎟ (4+(1−2σ1 )2 2 )(1+σ1 2 ) 

 ⎟ 2 2 4+ −1+σ1 (−1+2σ1 ) 4−σ1 (1−2σ1 ) ⎠ (4+(1−2σ1 )2 2 )(1+σ12 2 )

 1−2σ1 +2σ2 −σ1 (−1+2σ1 )(σ1 −σ2 )2



⎜ (4+(1−2σ1 )2 2 )(1+σ12 2 )(1+(σ1 −σ2 )2 2 ) ⎟ ⎟ b∗ = ⎜ ⎝ ⎠ 2+(2σ12 −σ2 )2 (4+(1−2σ1 )2 2 )(1+σ12 2 )(1+(σ1 −σ2 )2 2 ) where 0 < σ1 < 1/2, 0 < σ2 < 1/2. • Improved predictor-corrector method with predictor EM and corrector BEM (IPC(EM–BEM)), [3]:     1 1 1 − 2   ∗ , b = A∗ = √ √ − 1 − 2 1 − 2 + 4 1 + 2 1

123

Author's personal copy M. J. Senosiain, A. Tocino Table 2 Fulfillment of conditions (D), (G1)–(G4), (S1) and (S2) by the improved methods: 0 means that the condition is not fulfilled and  means that it is fulfilled for all  > 0 METHOD

(D)

(G1)

(G2)

(G3)

(G4)

(S1)

(S2)

IEM















IBEM















I θ = 0, 1













0

IOPT













0

I2SRK













0

IPC(EM–BEM)













0

Table 2 shows the fulfillment of conditions (D), (G1)–(G4), (S1) and (S2) by the above defined methods. Obviously all the improved methods fulfill conditions (G2)(G4). Notice that all of them also satisfy (D) and (G1); in addition, IEM and IBEM satisfy (S1) and (S2). 5 Numerical examples In this section some numerical experiments that confirm the theoretical results are given. The first experiment is devoted to comparing the growth rate of the second moment of the numerical solution of (1.1) with α = 1 obtained by seven of the above methods. For each method the value of E[xn2 + yn2 ] was approximated, where 105 trajectories are simulated in the time interval [0, 2000] for step  = 1 and where the initial values are x0 = 1, y0 = 0 . Firstly, we compare the methods EX, INT, OPT, PC(EM–BEM) and PC(PEM–MR). The results are shown on the left hand of Fig. 1. It can be seen that PC(PEM–MR) and PC(EM–BEM) methods present a growth rate greater than the real one; OPT gives a lower growth rate than the exact one; only EX and INT methods 4000

2000

3000

1500

2000

1000

1000

500

500

1000

1500

2000

500

1000

1500

2000

Fig. 1 Mean values of E[xn2 + yn2 ] with α = 1,  = 1, compared with the line of slope corresponding to the exact rate growth α 2 = 1 . Left OPT (squares), EX (bullets), INT (circles), PC(EM–BEM) (times symbols), PC(PEM–MR) (triangles). Right IOPT (squares), EX (bullets), IPC(EM–BEM) (times symbols)

123

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator 20

10

20

40

60

80

100

120

10

20

Fig. 2 Comparison between sample trajectories of the exact solution, OPT (squares), EX (bullets), PC(PEM–MR) (triangles) and PC(EM–BEM) (times symbols) methods with α = 1,  = 0.02

capture the exact rate of growth. Next, the experiment was repeated replacing OPT and PC(EM–BEM) by their improved counterparts IOPT and IPC(EM–BEM). The result, shown on the right hand of Fig. 1, confirms that the improved methods capture exactly the linear growth rate of the second moment. In the second experiment, devoted to confirming the oscillation of the numerical approximations, the solution of (1.1) with α = 1 has been compared with the numerical solutions obtained by OPT, EX, PC(PEM–MR) and PC(EM–BEM) methods, where 500 trajectories are simulated in the time interval [0, 120] for step  = 0.02 and where the initial values are x0 = 0, y0 = 0. Figure 2 corresponds to a sample trajectory of each solution and shows that the four methods reproduce quite well the oscillatory property of the exact solution. 6 Conclusions The behavior of 12 numerical schemes applied to the linear stochastic oscillator regarding symplecticity, linear growth of the second moment and oscillatory nature of the analytical solution has been analyzed in terms of the coefficients of the corresponding matrices, concluding that only EX and INT preserve the three properties. As new results, it has been proved that θ -methods show exponential growth rate for 0 ≤ θ < 1/2 and a slower growth rate than the exact one if 1/2 < θ ≤ 1. Moreover the exact growth rate of the second moment for PEM, SYM, PC(PEM– MR), OPT, 2SRK and PC(EM–BEM) methods has been calculated. Starting from θ -methods, OPT, 2SRK, and PC(EM–BEM) new improved methods, denoted by I θ methods, IOPT, I2SRK and IPC(EM–BEM), preserving the exact rate of growth of the second moment, as well as symplecticity, have been proposed. Simple conditions on the coefficients of the matrices prove that EM, BEM, PEM (if  < 2), EX, INT, SYM (if  < 2), IEM and IBEM give oscillatory numerical solutions.

123

Author's personal copy M. J. Senosiain, A. Tocino Acknowledgments The authors thank the reviewers for their helpful comments. They are specially grateful to the referee who helped to improve the structure of the paper.

Appendix Consider the recurrence (2.1) with initial conditions x0 , y0 obtained when the PEM method is applied to the linear stochastic oscillator (1.1). The scheme may be written           0 xn n x0 n−1 0 n−2 0 =A + αW0 A + α W1 A + · · · + α Wn−1 yn y0 1 1 1 where A is given in (3.1). Suppose  < 2 and denote by 2 +i λ=1− 2



4 − 2 2

and λ¯ the eigenvalues of A. Since |λ| = 1 we write λ = eiθ , 0 < θ < π . It can be seen that ⎛ An = ⎝

cos(nθ ) + −√

√  4−2

2 4−2

sin(nθ )

sin(nθ )

√ 2 4−2

cos(nθ ) −

sin(nθ )

√  4−2

sin(nθ )

⎞ ⎠.

If  ·  denotes the Euclidean vector norm, we have

E[xn2

+

yn2 ]

! !2 !  !2  ! n−1 ! ! j 0 !2 ! xn ! ! n x0 ! 2 ! ! !A ! ! ! . A = E! = + α  ! ! yn ! y0 ! 1 !

(7.1)

j=0

Since !  !2   2 ! n x0 ! ! = (x 2 + y 2 ) 1 + 2 sin2 (nθ ) + (x 2 − y 2 ) √  !A sin(2nθ ) 0 0 0 0 ! y0 ! 4 − 2 4 − 2 8 sin2 (nθ ) + x0 y0 4 − 2 and !  !2 2 ! j 0 ! !A ! = 1 + 2 sin2 ( jθ ) − √  sin(2 jθ ), ! ! 1 4 − 2 4 − 2

123

Author's personal copy A review on numerical schemes for solving a linear stochastic oscillator

from (7.1) we get E[xn2 + yn2 ] = x02 + y02 + sin2 (nθ ) 

 2  2 2 (x + y ) + 4x y 0 0 0 0 4 − 2

(x02 − y02 ) sin(2nθ ) 4 − 2  n−1  22  2 2 1+ sin ( jθ ) − √ sin(2 jθ ) . +α  4 − 2 4 − 2 j=0 +√

Finally, using that n−1

sin2 ( jθ ) =

cos((n − 1)θ ) sin(nθ ) n − , 2 2 sin(θ )

sin(2 jθ ) =

sin(nθ ) sin ((n − 1)θ ) , sin(θ )

j=0 n−1 j=0

we obtain   4 2 E[xn2 + yn2 ] = x02 + y02 + α 2 n + sin2 (nθ) (x02 + y02 ) + 4x0 y0 2 2 4− 4−  2 2 + (x0 − y0 ) sin(2nθ ) 4 − 2   2 3 cos((n − 1)θ) sin(nθ) sin((n − 1)θ) sin(nθ ) 2 + −α . sin(θ) sin(θ) 4 − 2 4 − 2

References 1. Cohen, D.: On the numerical discretisation of stochastic oscillators. Math. Comput. Simul. 82(8), 1478–1495 (2012) 2. Hong, J., Scherer, R., Wang, L.: Midpoint rule for a linear stochastic oscillator with additive noise. Neural Parallel Sci. Comput. 14(1), 1–12 (2006) 3. Hong, J., Scherer, R., Wang, L.: Predictor-corrector methods for a linear stochastic oscillator with additive noise. Math. Comput. Model. 46, 738–764 (2007) 4. Itô, K.: Introduction to Probability Theory. Cambridge University Press, Cambridge (1984) 5. Ma, Q., Ding, D., Ding, X.: Symplectic conditions and stochastic generating functions of stochastic Runge–Kutta methods for stochastic Hamiltonian systems with multiplicative noise. Appl. Math. Comput. 219, 635–643 (2012) 6. Milstein, G.N., Repin, Y.M., Tretyakov, M.V.: Symplectic integration of Hamiltonian systems with additive noise. SIAM J. Numer. Anal. 39, 2066–2088 (2002) 7. Markus, L., Weerasinghe, A.: Stochastic oscillators. J. Differ. Equ. 71(2), 288–314 (1988) 8. Schurz, H.: New stochastic integrals, oscillation theorems and energy identities. Commun. Appl. Anal. 13(2), 181–194 (2009) 9. Stømmen, A.H., Higham, D.J.: Numerical simulation of a linear stochastic oscillator with additive noise. Appl. Numer. Math. 51(1), 89–99 (2004) 10. Tocino, A.: On preserving long-time features of a linear stochastic oscillator. BIT 47, 189–196 (2007)

123

Suggest Documents