rounding error in numerical solution of stochastic...

21
Rounding Error in Numerical Solution of Stochastic Differential Equations Armando Arciniega * and Edward Allen Department of Mathematics and Statistics, Texas Tech University, Lubbock, Texas, USA ABSTRACT The present investigation is concerned with estimating the rounding error in numerical solution of stochastic differential equations. A statistical rounding error analysis of Euler’s method for stochastic differential equations is performed. In particular, numerical evaluation of the quantities EjXðt n Þ 2 ^ Y n j 2 and E½Fð ^ Y n Þ 2 FðXðt n ÞÞ is investigated, where X(t n ) is the exact solution at the nth time step and Y ˆ n is the approximate solution that includes computer rounding error. It is shown that rounding error is inversely proportional to the square root of the step size. An extrapolation technique provides second-order accuracy, and is one way to increase accuracy while avoiding rounding error. Several compu- tational results are given. 281 DOI: 10.1081/SAP-120019286 0736-2994 (Print); 1532-9356 (Online) Copyright q 2003 by Marcel Dekker, Inc. www.dekker.com * Correspondence: Armando Arciniega, Department of Mathematics and Statistics, Texas Tech University, Lubbock, Texas 79409-1042, USA; E-mail: aarcinie@ math.ttu.edu. STOCHASTIC ANALYSIS AND APPLICATIONS Vol. 21, No. 2, pp. 281–300, 2003 MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016 ©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Upload: others

Post on 15-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

Rounding Error in Numerical Solution of StochasticDifferential Equations

Armando Arciniega* and Edward Allen

Department of Mathematics and Statistics, Texas Tech University,

Lubbock, Texas, USA

ABSTRACT

The present investigation is concerned with estimating the rounding error

in numerical solution of stochastic differential equations. A statistical

rounding error analysis of Euler’s method for stochastic differential

equations is performed. In particular, numerical evaluation of the

quantities EjXðtnÞ2 Ynj2

and E½FðYnÞ2 FðXðtnÞÞ� is investigated, where

X(tn) is the exact solution at the nth time step and Yn is the approximate

solution that includes computer rounding error. It is shown that rounding

error is inversely proportional to the square root of the step size. An

extrapolation technique provides second-order accuracy, and is one way

to increase accuracy while avoiding rounding error. Several compu-

tational results are given.

281

DOI: 10.1081/SAP-120019286 0736-2994 (Print); 1532-9356 (Online)

Copyright q 2003 by Marcel Dekker, Inc. www.dekker.com

*Correspondence: Armando Arciniega, Department of Mathematics and Statistics,

Texas Tech University, Lubbock, Texas 79409-1042, USA; E-mail: aarcinie@

math.ttu.edu.

STOCHASTIC ANALYSIS AND APPLICATIONS

Vol. 21, No. 2, pp. 281–300, 2003

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 2: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

1. INTRODUCTION

The study of stochastic differential equations plays a prominent role in a

range of application areas. When a differential equation model for some

physical phenomenon is formulated, preferably the exact solution can be

obtained. However, even for ordinary differential equations, this is generally

not possible and numerical methods must be used. Numerical solution of

stochastic differential equations has been studied by many researchers (see,

for example, Refs.[3,5,8] and the references therein). In the present

investigation, rounding error in Euler’s method for stochastic differential

equations is analyzed and computationally tested.

Rounding error is present in any numerical scheme, and can lead to

unsatisfactory results. The following deterministic example illustrates that

rounding error can be of significant importance. Consider the initial value

problem

dxdt¼ xðtÞ2 1:07

tþ0:07

� �2

2 2ð1:07Þ2

ðtþ0:07Þ3; 0 # t # 1

xð0Þ ¼ e21 þ 1:070:07

� �2:

8><>: ð1:1Þ

The exact solution to this problem is

xðtÞ ¼ e t21 þ1:07

t þ 0:07

2

:

Absolute errors of the numerical solution at time t ¼ 1 are shown in Fig. 1

using the first-order Euler’s method. In addition, the absolute errors of the

second-order method obtained by extrapolating (through Richardson

extrapolation[6]) the approximate values are also shown. (This will be

referred to as the extrapolated Euler method.) Notice that when the step size

gets sufficiently small, the errors exhibit a random behavior due to

accumulation of rounding errors and the error does not decrease at the

theoretical rate. However, the errors in the extrapolated Euler method are

much smaller than the errors in Euler’s method for larger step size. This

indicates that Richardson extrapolation may be used to obtain accurate results

before rounding error becomes significant. (Of course, in addition to using

higher-order numerical methods, increasing the number of digits in the

calculations can also reduce the rounding errors.)

In the next section, statistical analyses of rounding error for numerical

solution of stochastic differential equations are given for mean square error

Arciniega and Allen282

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 3: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

and for expectation of functions of the solution. It is also shown how

Richardson extrapolation can alleviate the rounding error with regard to

approximation of the expectation of functions of the solution.

2. ANALYSES OF ROUNDING ERROR

2.1. Introduction

Consider an Ito process X ¼ {XðtÞ : 0 # t # T} satisfying the stochastic

differential equation

dXðtÞ ¼ f ðt;XðtÞÞdt þ gðt;XðtÞÞdWðtÞ; 0 # t # T

Xð0Þ ¼ X0;

(ð2:1Þ

Figure 1. Illustration of the error reduction possible by extrapolating Euler’s method.

Rounding Error in Numerical Solution 283

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 4: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

where X(t) satisfies the equivalent Ito stochastic integral equation

XðtÞ ¼ X0 þ

Z t

0

f ðs;XðsÞÞds þ

Z t

0

gðs;XðsÞÞdWðsÞ; 0 # t # T : ð2:2Þ

Select a positive integer N $ 2 and partition the interval [0,T ] into

0 ¼ t0 , t1 , · · · , tN ¼ T;

where tn ¼ nh for each n ¼ 0; 1; . . .;N: It is assumed that the step size h is

fixed, so that the common distance between the discrete times is h ¼ TN:

An Euler approximation to (2.1) is a stochastic process satisfying the

iterative scheme

Y0 ¼ X0;

Yn ¼ Yn21 þ f ðtn21;Yn21Þðtn 2 tn21Þþ gðtn21;Yn21ÞðWðtnÞ2Wðtn21ÞÞ

(

ð2:3Þ

for each n ¼ 1; . . .;N; where Yn denotes the approximation to the exact solution

at the nth time step. That is Yn < XðtnÞ: Denote the random increments of the

Wiener process W ¼ {WðtÞ : t $ 0} by DWn ¼ WðtnÞ2Wðtn21Þ: It is well

known that these increments are independent normal random variables with

mean zero and variance tn 2 tn21; for each n ¼ 1; . . .;N (see, for example,

Ref.[2]). If h ¼ tn 2 tn21; equation (2.3) takes the form

Y0 ¼ X0;

Yn ¼ Yn21 þ hf ðtn21;Yn21Þþ gðtn21;Yn21ÞðDWnÞ

(ð2:4Þ

for each n ¼ 1; . . .;N: The following theorem is a well known result concerning

the strong convergence of Euler’s method for stochastic differential equations

(see Ref.[3] or Ref.[5]).

Theorem 2.1. Suppose the functions f and g satisfy uniform growth and

Lipschitz conditions in the second variable, and are Holder continuous of

order 12

in the first variable. Specifically, there exists a constant K . 0 such

Arciniega and Allen284

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 5: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

that for all s; t [ ½0; T�; x; y [ R;

j f ðt; xÞ2 f ðt; yÞj þ jgðt; xÞ2 gðt; yÞj # Kjx 2 yj ð2:5Þ

j f ðt; xÞj2þ jgðt; xÞj

2# K 2ð1 þ jxj

2Þ ð2:6Þ

j f ðs; xÞ2 f ðt; xÞj þ jgðs; xÞ2 gðt; xÞj # Kjs 2 tj12: ð2:7Þ

Then, there exists a positive constant C1 ¼ C1ðTÞ such that

EjXðtnÞ2 Ynj2# C1h:

The error formula given in Theorem 2.1 depends linearly on the step size h.

Consequently, reducing the step size should give correspondingly greater

accuracy to the numerical values. However, neglected in the result of Theorem

2.1 is the effect that rounding error plays in the choice of the step size. As h

becomes smaller, more calculations are necessary and more rounding error is

expected. In practice then, the difference-equation

Y0 ¼ X0;

Yn ¼ Yn21 þ hf ðtn21; Yn21Þ þ gðtn21; Yn21ÞðDWnÞ

(ð2:8Þ

for each n ¼ 1; . . .;N; is not used to calculate the approximation to the

solution X(tn) at the point tn. Instead, the following equation is used

Y0 ¼ Y0 þ ~e0;

Yn ¼ Yn21 þ hf ðtn21; Yn21Þ þ gðtn21; Yn21ÞðDWnÞ þ ~en

8<: ð2:9Þ

for each n ¼ 1; . . .;N; where en denotes the rounding error in performing

function evaluations, multiplications, and summations in the nth step.

Statistical rounding error analyses as described in Refs.[4,7] are performed

in the present investigation. At each iteration, one assumes that the rounding

errors en are normally distributed with mean zero and that en is independent of

em for n – m: In particular, it is assumed that Eð ~enÞ ¼ 0 and Eð ~e2nÞ #

~Cd2 for

each n, where d is proportional to the unit roundoff error. That is, d/ b2t;where b is the base of the computer system and t is the number of digits in the

floating-point representation. Now notice that the numerical scheme for Yn in

Rounding Error in Numerical Solution 285

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 6: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

(2.9) can be written in the form

Y0 ¼ Y0 þ e0;

Yn ¼ Yn þ en

(ð2:10Þ

where en is the accumulated error due to rounding. To see this, first notice that

Y0 ¼ Y0 þ e0 ¼ Y0 þ ~e0: Therefore,

Y1 ¼ Y0 þ hf ðt0; Y0Þ þ gðt0; Y0ÞðDW0Þ þ ~e1

¼ Y0 þ ~e0 þ hf ðt0; Y0 þ ~e0Þ þ gðt0; Y0 þ ~e0ÞðDW0Þ þ ~e1

¼ Y0 þ hf ðt0; Y0Þ þ gðt0; Y0ÞðDW0Þ þ e1 þ ~e1

¼ Y1 þ e1 þ ~e1 ¼ Y1 þ e1;

where

Y1 ¼ Y0 þ hf ðt0; Y0Þ þ gðt0; Y0ÞðDW0Þ;

e1 ¼ e1 þ ~e1; and

e1 ¼ ~e0 þ h½ f ðt0; Y0 þ ~e0Þ2 f ðt0; Y0Þ�

þ ðDW0Þ½gðt0; Y0 þ ~e0Þ2 gðt0; Y0Þ�:

Considering e1, it follows that

e 21 ¼ ~e 2

0 þ h2½ f ðt0; Y0 þ ~e0Þ2 f ðt0; Y0Þ�2

þ ðDW0Þ2½gðt0; Y0 þ ~e0Þ2 gðt0; Y0Þ�

2

þ 2 ~e0h½ f ðt0; Y0 þ ~e0Þ2 f ðt0; Y0Þ�

þ 2 ~e0ðDW0Þ½gðt0; Y0 þ ~e0Þ2 gðt0; Y0Þ�

þ 2hðDW0Þ½ f ðt0; Y0 þ ~e0Þ

2 f ðt0;Y0Þ�½gðt0; Y0 þ ~e0Þ2 gðt0; Y0Þ�:

However, the random increments DWn are normally distributed with

mean zero and variance h, i.e., DWn [ Nð0; hÞ for each n. Therefore,

Arciniega and Allen286

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 7: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

from the preceding equation,

Eðe21Þ ¼Eð ~e2

0Þ þ h2E{½ f ðt0; Y0 þ ~e0Þ2 f ðt0; Y0Þ�2} þ hE{½gðt0; Y0 þ ~e0Þ

2 gðt0; Y0Þ�2} þ E{2 ~e0h½ f ðt0;Y0 þ ~e0Þ2 f ðt0; Y0Þ�}:

Applying the Lipschitz condition (2.5) on f and g, and using

the Cauchy–Schwarz inequality on the third term of the last equation

leads to

Eðe21Þ # Eð ~e2

0Þ þ K 2½h2Eð ~e20Þ þ hEð ~e2

0Þ� þ 2hKEð ~e20Þ

# ~Cd2½1 þ 2hK þ hðh þ 1ÞK 2�:

For notational convenience, denote r1h by

r1h ¼ ½2K þ ðT þ 1ÞK 2�h:

Then,

Eðe21Þ #

~Cd2ð1 þ r1hÞ:

Since Eð ~e0Þ ¼ 0 and Eð ~e21Þ #

~Cd2; then

Eðe21Þ ¼ E½ð ~e1 þ e1Þ

2� ¼ Eð ~e21Þ þ Eðe2

1Þ #~Cd2 þ ~Cd2ð1 þ r1hÞ

¼ ~Cd2½1 þ ð1 þ r1hÞ�:

Similarly, the second step leads to

Y2 ¼ Y2 þ e2

and

Eðe22Þ # ð1 þ r1hÞEðe2

1Þ # ð1 þ r1hÞ½Eð ~e21Þ þ Eðe2

1Þ�

# ð1 þ r1hÞ½ ~Cd2 þ ~Cd2ð1 þ r1hÞ�

¼ ~Cd2½ð1 þ r1hÞ þ ð1 þ r1hÞ2�:

Rounding Error in Numerical Solution 287

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 8: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

Hence,

Eðe22Þ ¼ E½ð ~e2 þ e2Þ

2� ¼ Eð ~e22Þ þ Eðe2

# ~Cd2 þ ~Cd2½ð1 þ r1hÞ þ ð1 þ r1hÞ2�

¼ ~Cd2½1 þ ð1 þ r1hÞ þ ð1 þ r1hÞ2�:

Continuing in this manner, the nth step leads to

Yn ¼ Yn þ en

and

Eðe2nÞ # ð1 þ r1hÞEðe2

n21Þ

# ð1 þ r1hÞ½Eð ~e2n21Þ þ Eðe2

n21Þ�

# ð1 þ r1hÞ½ ~Cd2 þ Eðe2n21Þ�

# ~Cd2½ð1 þ r1hÞ þ ð1 þ r1hÞ2 þ · · · þ ð1 þ r1hÞn�:

Thus,

Eðe2nÞ ¼ E½ð ~en þ enÞ

2�

¼ Eð ~e2nÞ þ Eðe2

# ~Cd2½1 þ ð1 þ r1hÞ þ ð1 þ r1hÞ2 þ · · · þ ð1 þ r1hÞn�

# ~Cd2 ð1 þ r1hÞn

r1h#

~Cd2

r1her1T ¼ C

d2

h;

where C ¼~Ce r1T

r1and r1 ¼ ½2K þ ðT þ 1ÞK 2�: This proves the following

result:

Theorem 2.2. Let Y0; . . .; YN be the approximations obtained using (2.9) or

(2.10). If en are independently distributed random variables with Eð ~enÞ ¼ 0 and

Eð ~e2nÞ #

~Cd2; then the accumulated error en for any n satisfies

Eðe2nÞ # C

d2

h

for some positive constant C, where d is proportional to the unit roundoff error.

Arciniega and Allen288

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 9: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

Theorem 2.2 will be useful in the analysis of rounding error for functional

expectations. First, however, a mean square convergence result for Euler’s

method with rounding error is formulated. The proof is similar in structure to the

proof of Theorem 7.2 in Ref.[3]

2.2. Rounding Error for Mean Square Convergence

(Strong Convergence)

Theorem 2.3. Let Y0; . . .; YN be the approximations obtained using (2.10).

Let Eð ~enÞ ¼ 0;Eð ~e2nÞ ,

~Cd2; and suppose the hypotheses of Theorem 2.1 are

satisfied. Then, there exist positive constants C1, C2, and C3 such that

EjXðtnÞ2 Ynj2# C1h þ C2 þ

C3

h

d2:

Proof. First, notice that conditions (2.5)–(2.7) guarantee a unique solution

X(t) to (2.1). Denote gn by

gn ¼ EjXðtnÞ2 Ynj2:

Then,

g0 ¼ EjXðt0Þ2 Y0j2¼ EjX0 þ ~e0 2 X0j

2¼ Ej ~e0j

2# ~Cd2:

Next, define Y(t) by

YðtÞ ¼ Yn21 þ ~en þ

Z t

tn21

f ðtn21; Yn21Þds

þ

Z t

tn21

gðtn21; Yn21ÞdWðsÞ: ð2:11Þ

Notice that

Yðtn21Þ ¼ Yn21 þ ~en:

Now,

XðtÞ2 YðtÞ ¼ Xðtn21Þ2 Yn21 2 ~en

þ

Z t

tn21

½ f ðs;XðsÞÞ2 f ðtn21; Yn21Þ�ds

þ

Z t

tn21

½gðs;XðsÞÞ2 gðtn21; Yn21Þ�dWðsÞ:

Rounding Error in Numerical Solution 289

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 10: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

and

dðXðtÞ2 YðtÞÞ ¼ ½ f ðt;XðtÞÞ2 f ðtn21; Yn21Þ�dt þ ½gðt;XðtÞÞ

2 gðtn21; Yn21Þ�dWðtÞ:

Applying Ito’s formula to the preceding equation, one obtains

dððXðtÞ2 YðtÞÞ2Þ

¼ {2ðXðtÞ2 YðtÞÞðf ðt;XðtÞÞ2 f ðtn21; Yn21ÞÞ

þ ðgðt;XðtÞÞ2 gðtn21; Yn21ÞÞ2}dt

þ 2ðXðtÞ2 YðtÞÞðgðt;XðtÞÞ2 gðtn21; Yn21ÞÞdWðtÞ:

Integrating the preceding equation from tn21 to tn and taking expectations

where, as before,

gn ¼ EjXðtnÞ2 Ynj2;

and noticing that

EjXðtn21Þ2 Yðtn21Þj2¼ gn21 þ Eð ~e2

leads to

gn ¼ gn21 þ Eð ~e2nÞ þ

Z tn

tn21

E{2ðXðsÞ2 YðsÞÞðf ðs;XðsÞÞ2 f ðtn21; Yn21ÞÞ

þ ðgðs;XðsÞÞ2 gðtn21; Yn21ÞÞ2}ds # gn21 þ ~Cd2

þ

Z tn

tn21

{EjXðsÞ2 YðsÞj2þ Ej f ðs;XðsÞÞ2 f ðtn21; Yn21Þj

2

þ Ejgðs;XðsÞÞ2 gðtn21; Yn21Þj2}ds ð2:12Þ

as Eð ~e2nÞ #

~Cd2 for each n. Invoking the Lipschitz (2.5) and Holder (2.7)

Arciniega and Allen290

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 11: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

conditions, one has

j f ðs;XðsÞÞ2 f ðtn21; Yn21Þj2#3{j f ðs;XðsÞÞ2 f ðs;Xðtn21ÞÞj

2

þ j f ðs;Xðtn21ÞÞ2 f ðtn21;Xðtn21ÞÞj2

þ j f ðtn21;Xðtn21ÞÞ2 f ðtn21; Yn21Þj2}

þ ðs 2 tn21Þ þ jXðtn21Þ2 Yn21j2}

# 3K 2 jKðsÞ Xðtn1Þj2þ ðs tn1Þ

n

þjXðtn1Þ Ynj2o

ð2:13Þ

Similarly,

jgðs;XðsÞÞ2 gðtn21; Yn21Þj2# 3K 2{jXðsÞ2 Xðtn21Þj

2

þ ðs 2 tn21Þ þ jXðtn21Þ2 Yn21j2}: ð2:14Þ

Now, consider

EjXðsÞ2 Xðtn21Þj2

¼ E

Z s

tn21

f ðt;XðtÞÞdt þ

Z s

tn21

gðt;XðtÞÞdWðtÞ

��������2

# 2 E

Z s

tn21

f ðt;XðtÞÞdt

��������2

þE

Z s

tn21

gðt;XðtÞÞdWðtÞ

��������2

" #

# 2{ðs 2 tn21Þ

Z s

tn21

Ej f ðt;XðtÞÞj2dt þ

Z s

tn21

Ejgðt;XðtÞÞj2dt}

# 2{½ðs 2 tn21Þ þ 1�

Z s

tn21

K 2Eð1 þ jXðtÞj2Þdt}:

However, from Theorem 3.8 of Ref.,[3]

EjXðtÞj2# ð1 þ EjX0j

2ÞeLt

for some constant L. Therefore,

EjXðsÞ2 Xðtn21Þj2# K1ðs 2 tn21Þ; ð2:15Þ

Rounding Error in Numerical Solution 291

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 12: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

where K1 depends only on K, T, and X0. Substituting (2.13), (2.14), and (2.15)

into (2.12) leads to

gn # gn21 þ ~Cd2 þ

Z tn

tn21

{EjXðsÞ2 YðsÞj2

þ 6K 2½ðK1 þ 1Þðs 2 tn21Þ þ gn21�}ds

# gn21ð1 þ 6K 2hÞ þ 3K 2ðK1 þ 1Þh2

þ

Z tn

tn21

EjXðsÞ2 YðsÞj2ds þ ~Cd2: ð2:16Þ

Applying the Bellman–Gronwall inequality: if a(t) and b(t) are measurable

bounded functions such that for some ~L . 0;

aðtÞ # bðtÞ þ ~L

Z t

0

aðsÞds;

then

aðtÞ # bðtÞ þ ~L

Z t

0

e~Lðt2sÞbðsÞds

to (2.16) with

aðtÞ ¼ EjXðtÞ2 YðtÞj2

and

bðtÞ ¼ ðEjXðtn21Þ2 Yn21j2Þð1 þ 6K 2hÞ þ 3K 2ðK1 þ 1Þh2 þ ~Cd2

on ½tn21; tn� leads to

gn # gn21ð1 þ 6K 2hÞ

þ

Z tn

tn21

e tn2s½gn21ð1 þ 6K 2hÞ þ 3K 2ðK1 þ 1Þh2 þ ~Cd2�ds

þ 3K 2ðK1 þ 1Þh2 þ ~Cd2

# ½gn21ð1 þ 6K 2hÞ þ 3K 2ðK1 þ 1Þh2 þ ~Cd2�eh: ð2:17Þ

Arciniega and Allen292

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 13: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

Iterating (2.17) with g0 ¼ Ej ~e0j2

leads to

gn # rn2Ej ~e0j

2þ ð3K 2ðK1 þ 1Þh2 þ ~Cd2Þeh 1 2 rn

2

1 2 r2

; ð2:18Þ

where r2 ¼ ð1 þ 6K 2hÞeh: Now, Ej ~e0j2# ~Cd2 implies that rn

2Ej ~e0j2# C2d

2;where C2 ¼ ~CeTð1þ6K 2Þ: Therefore,

gn # C2d2 þ h½3K 2ðK1 þ 1Þ�

heh

r2 2 1rn

2 þ~Cd2 eh

r2 2 1rn

2: ð2:19Þ

However,

rn2 # r

Th

2 ¼ ½ð1 þ 6K 2hÞeh�Th # eTð1þ6K 2Þ;

and

heh

r2 2 1¼

h

1 þ 6K 2h 2 e2h#

1

6K 2:

Also,

~Cd2 eh

r2 2 1rn

2 ¼~Cd2

h

heh

r2 2 1rn

2:

Substituting all this into (2.19) leads to

gn # C1h þ C2 þC3

h

d2; ð2:20Þ

where C1 ¼ ðK1þ1Þ2

eTð1þ6K 2Þ and C3 ¼~C

6K 2 eTð1þ6K 2Þ: This completes the proof

of the theorem. A

2.3. Rounding Error for Functional Expectation

(Weak Convergence)

Let Yn and Yn be the approximations of (2.1) using Euler’s method with

and without rounding error, respectively. If F is a smooth function, it is

possible to obtain an expansion of the form

E½FðYnÞ2 FðXðtnÞÞ� ¼ c1h þ Oðh2Þ;

where X(tn) denotes the exact solution at the nth step and c1 is a constant

independent of h (see Ref.[9]). This expansion justifies the Richardson

Rounding Error in Numerical Solution 293

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 14: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

extrapolation technique described in the next section, and it indicates how

Euler’s method can be modified to a weak second-order scheme.

Now, consider an equation of the form

E½FðYnÞ2 FðXðtnÞÞ� ¼ E½FðYnÞ2 FðYnÞ þ FðYnÞ2 FðXðtnÞÞ�

¼ E½F0ðYnÞðYn 2 YnÞ� þ c1h þ Oðh2Þ

# ðEðF0ðYnÞÞÞ1=2ðEðYn 2 YnÞ

2Þ1=2 þ c1h þ Oðh2Þ:

ð2:21Þ

Since

Yn ¼ Yn þ en;

it follows from Theorem 2.2 that

Eðe2nÞ

� �1=2¼ ðEðYn 2 YnÞ

2Þ1=2 #Cd2

h

1=2

:

Substituting this into (2.21) leads to

E½FðYnÞ2 FðXðtnÞÞ� # MCd2

h

1=2

þc1h þ Oðh2Þ; ð2:22Þ

where

M ¼Y[RmaxðF0ðYÞÞ1=2:

This proves the following result:

Theorem 2.4. Let Yn and Yn be the approximations of (2.1) using Euler’s

method with and without rounding error, respectively. Let F be a smooth

function satisfying the following expansion

E½FðYnÞ2 FðXðtnÞÞ� ¼ c1h þ Oðh2Þ;

where X(tn) denotes the exact solution at the nth step and c1 is a constant

independent of h. Then,

E½FðYnÞ2 FðXðtnÞÞ� # MCd2

h

1=2

þc1h þ Oðh2Þ

for some positive constants C and M.

Arciniega and Allen294

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 15: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

3. ALLEVIATION OF ROUNDING ERROR THROUGH

HIGHER-ORDER METHODS (EXTRAPOLATION)

A consequence of Theorem 2.4 is the justification of Richardson

extrapolation between values corresponding to two different step sizes. The

extrapolation technique is described in Refs.[5,9] or Ref.[6] That is, an

approximation is first calculated with step size h, and then a second

approximation is calculated with step size h/2. For example, if Euler’s method

is used with n equal time steps h, then

E½FðYnÞ2 FðXðtnÞÞ� ¼ MCd2

h

1=2

þc1h þ Oðh2Þ:

Next, Euler’s method is used with 2n time steps of equal length h/2 so that

E½FðYh=2

2n Þ2 FðXðtnÞÞ� ¼ M2Cd2

h

1=2

þc1

h

2þ Oðh2Þ:

A combination of the two preceding equations yields

E½2FðYh=2

2n Þ2 FðYnÞ2 FðXðtnÞÞ� ¼ ~MCd2

h

1=2

þOðh2Þ;

where ~M ¼ Mð2ffiffiffi2

p2 1Þ: This result implies that through Richardson

extrapolation, the method error may be made sufficiently small before the

rounding error dominates as the step size h is decreased. The computational

results described in the next section support this supposition.

4. COMPUTATIONAL RESULTS

In this section, computational results are given that support the theoretical

results in the present investigation. The first example is the stochastic version

of the deterministic example given in the introduction. Consider the stochastic

initial value problem

dXðtÞ ¼ XðtÞ2 1:07tþ0:07

� �2

2 2ð1:07Þ2

ðtþ0:07Þ3

dtþ

ffiffi2

p

10dWðtÞ; 0 # t # 1

Xð0Þ ¼ e21 þ 1:070:07

� �2:

8>><>>: ð4:1Þ

It is desired to estimate EFðXð1ÞÞ ¼ EXð1Þ: The expectation of the solution to

Rounding Error in Numerical Solution 295

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 16: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

this problem is

EXðtÞ ¼ e t21 þ1:07

tþ 0:07

2

and is obtained by application of Ito’s formula. Therefore,

EXð1Þ ¼ 2:

Table 1 presents the absolute errors in Euler’s method and those in the

extrapolated Euler method. The numerical values are based on 100,000

independent trials. As in the deterministic case, when the step size gets

sufficiently small, the errors exhibit a random behavior due to accumulation of

rounding errors. However, the errors in the extrapolated Euler method are

much smaller than the errors in Euler’s method for larger step size h. This

indicates that Richardson extrapolation may be used to obtain accurate results

before the rounding error dominates as the step size h is decreased. Figure 2

illustrates graphically the numerical values given in Table 1. Notice that Fig. 2

is similar to Fig. 1.

The next example presents the error reduction possible by extrapolating

Euler’s method for a system. To illustrate, consider the following stochastic

system

dX1ðtÞ ¼ 2dW1ðtÞ þ X22ðtÞdW2ðtÞ; 0 # t # 1

dX2ðtÞ ¼12

X2ðtÞdW1ðtÞ

X1ð0Þ ¼ 0

X2ð0Þ ¼ 1

8>>>>><>>>>>:

ð4:2Þ

Table 1. Error reduction possible by extrapolating Euler’s method.

Number of

intervals in t Euler’s method Extrapolation

800 11.0511

1600 5.5051 0.0409

3200 2.7452 0.0146

6400 1.3700 0.0052

12800 0.6811 0.0078

25600 0.3398 0.0015

51200 0.1728 0.0059

102400 0.0876 0.0023

204800 0.0195 0.0485

409600 0.0724 0.1643

Arciniega and Allen296

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 17: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

It is desired to estimate EFðX1ð1ÞÞ ¼ EX21ð1Þ: By application of Ito’s’s

formula, it can be shown that

EX21ðtÞ ¼

2

3ðe3t=2 2 1Þ þ t:

Hence,

EX21ð1Þ ¼

1

3ð2e3=2 þ 1Þ < 3:321126:

Table 2 presents the absolute errors in Euler’s method and those obtained in

extrapolating Euler’s method. The approximate values are based on 1,000,000

independent trials. Notice that the error in Richardson extrapolation becomes

small before rounding error becomes significant, whereas the error in Euler’s

method is eventually dominated by accumulation of rounding error for suf-

ficiently small step size h. Of course, the extrapolated Euler method also suffers

from rounding error as the step size decreases. However, the extrapolated Euler

method can obtain accurate results before rounding error dominates.

Figure 2. Illustration of the error reduction possible by extrapolating Euler’s method.

Rounding Error in Numerical Solution 297

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 18: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

The next example illustrates that, although rounding error is present in all

second-order schemes, the accuracy generally is much better than that of

Euler’s method for large step sizes before rounding error dominates. The

calculational results of a weak second-order Runge–Kutta method described

by Abukhaled and Allen[1] and the results of Euler method are compared for

Table 2. Error reduction possible by applying Richardson

extrapolation

Number of

intervals in t Euler’s method

Extrapolated Euler

method

10 0.2567

20 0.1582 0.0597

40 0.0775 0.0032

80 0.0251 0.0272

160 0.0082 0.0087

320 0.0124 0.0166

Figure 3. Illustration of the errors in Euler and second-order methods.

Arciniega and Allen298

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 19: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

the following stochastic initial value problem

dXðtÞ ¼ ð1 þ XðtÞÞdt þ ð1 þ XðtÞÞdWðtÞ; 0 # t # 1

Xð0Þ ¼ 1:

(ð4:3Þ

The expectation of the solution to this problem is

EXðtÞ ¼ 2e t 2 1:

Thus,

EXð1Þ ¼ 2e 2 1 < 4:4366:

Figure 3 indicates that the errors of both second-order methods are much

smaller than the errors in Euler’s method before rounding error dominates for

small h. The approximate values are based on 1,000,000 independent trials.

CONCLUSION

Statistical rounding error analyses in numerical solution of stochastic

differential equations have been performed. Rounding error in Euler’s method

for stochastic differential equations has been analyzed and computationally

tested. It was found that rounding error is inversely proportional to the square

root of the step size and proportional to b 2t where b is the base and t is the

number of digits in the floating-point system. Richardson extrapolation was

applied to Euler’s method to alleviate the rounding error with regard to

approximation of functional expectation. Calculational results indicate that

higher-order methods may sometimes be used to obtain accurate results before

rounding error dominates as the step size is decreased.

ACKNOWLEDGMENTS

The research was supported by the Texas Advanced Research Program

Grants ARP 0202-44-6283, ARP 0212-44-1582, and the National Science

Foundation Grant NSF 1316-44-1775.

REFERENCES

1. Abukhaled, M.I.; Allen, E.J. A class of second-order Runge–Kutta

methods for numerical solution of stochastic differential equations. Stoch.

Anal. Appl. 1998, 16, 977–991.

Rounding Error in Numerical Solution 299

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 20: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a

2. Arnold, L. Stochastic Differential Equations: Theory and Applications;

John Wiley & Sons: New York, 1974.

3. Gard, T.C. Introduction to Stochastic Differential Equations; Marcel

Dekker: New York, 1988.

4. Henrici, P. Elements of Numerical Analysis; John Wiley & Sons:

New York, 1964.

5. Kloeden, P.E.; Platen, E. Numerical Solution of Stochastic Differential

Equations; Springer-Verlag: New York, 1992.

6. Marchuk, G.I.; Shaidurov, V.V. Difference Methods and Their

Extrapolations; Springer-Verlag: New York, 1983.

7. Stoer, J.; Bulirsch, R. Introduction to Numerical Analysis; Springer-

Verlag: New York, 1980.

8. Talay, D. Simulation and numerical analysis of stochastic differential

systems: a review. In Probabilistic Methods in Applied Physics; Kree, P.,

Wedig, W., Eds.; Lecture Notes in Physics; Springer-Verlag: New York,

1995; Vol. 451, 63–106.

9. Talay, D.; Turbano, L. Expansion of the global error for numerical

schemes solving stochastic differential equations. Stoch. Anal. Appl.

1990, 8 (4), 483–509.

Arciniega and Allen300

MARCEL DEKKER, INC. • 270 MADISON AVENUE • NEW YORK, NY 10016

©2003 Marcel Dekker, Inc. All rights reserved. This material may not be used or reproduced in any form without the express written permission of Marcel Dekker, Inc.

Page 21: Rounding Error in Numerical Solution of Stochastic ...zeta.math.utsa.edu/~rga235/articles/stochastic1.pdf · 1. INTRODUCTION The study of stochastic differential equations plays a