analysis of four numerical schemes for a nonlinear klein-gordon equation

34
Avbvcbfghfghfghfghfghgdhhnalysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation* Salvador Jim&e2 Courant Institute of Mathematical Sciences New York University 251 Mercer Street New York, New York 10012 and Luis VBzquez Departamento de F&a T&o&a Facultad de Ciencias Fisicas Universidad Cmpultense 28040-Madrid, Spain Transmitted by John Casti ABSTRACT We compare the properties of four explicit finite difference schemes used to integrate the nonlinear Klein-Gordon equation cpl,- cp,, + f(q) = 0. It turns out that the energy conserving scheme is the most suitable to study the long time behavior of the solutions. The same result is found for the special case of no spatial dependence. I. INTRODUCTION The purpose of this paper is to give a comparative analysis of four explicit finite difference schemes for the nonlinear Klein-Gordon equation %t - ‘p,, + f(V) = 0, 0) *Partially supported by the Comisi6n Interministerial de Ciencia e Investigacibn of Spain under P ant PB86-0005. On leave from Departamento de Fisica T&&a, Fact&ad de Ciencias Fisicas, Universidad Complutense, 28040_Madrid, Spain. APPLIED MATHEMATICS AND COMPUTATION 35:61-94 (1990) 0 Elsevier Science Publishing Co., Inc., 1990 61 655 Avenue of the Americas, New York, NY 10010 0096-3003/90/$03.50

Upload: salvador-jimenez

Post on 21-Jun-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Avbvcbfghfghfghfghfghgdhhnalysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation*

Salvador Jim&e2 ’

Courant Institute of Mathematical Sciences New York University 251 Mercer Street New York, New York 10012

and

Luis VBzquez

Departamento de F&a T&o&a Facultad de Ciencias Fisicas Universidad Cmpultense 28040-Madrid, Spain

Transmitted by John Casti

ABSTRACT

We compare the properties of four explicit finite difference schemes used to integrate the nonlinear Klein-Gordon equation cpl, - cp,, + f(q) = 0. It turns out that the energy conserving scheme is the most suitable to study the long time behavior of the solutions. The same result is found for the special case of no spatial dependence.

I. INTRODUCTION

The purpose of this paper is to give a comparative analysis of four explicit finite difference schemes for the nonlinear Klein-Gordon equation

%t - ‘p,, + f(V) = 0, 0)

*Partially supported by the Comisi6n Interministerial de Ciencia e Investigacibn of Spain under

P ant PB86-0005.

On leave from Departamento de Fisica T&&a, Fact&ad de Ciencias Fisicas, Universidad Complutense, 28040_Madrid, Spain.

APPLIED MATHEMATICS AND COMPUTATION 35:61-94 (1990)

0 Elsevier Science Publishing Co., Inc., 1990

61

655 Avenue of the Americas, New York, NY 10010 0096-3003/90/$03.50

Page 2: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

62 SALVADOR JIMkNEZ AND LUIS V6ZQUEZ

where f(q) = dF/dq. The schemes are the following:

A. This scheme is due to Strauss and Vazquez [l]:

‘p;+i - 2f#$ + cp;-’ cp;+,- ‘p;+‘p;-1 2

r2 - X2 +

FM+‘) - G-‘1 = 0

‘py+l- CPPY’ .

(2)

It is explicit in the sense that, on the highest time level, only the value of

cp;” is to be determined and no other point of the same level is involved. B. This is the simplest scheme for Equation (11 and has had wide use

[2,31:

‘p;+L 2q; + cp;-’ ‘p;+1-2~7+9%1

r2 - X2 +f(cp7)=0.

C. This scheme was proposed by Ablowitz, Kruskal, and Ladik

‘p;+i - 297; + $1 ‘p;+1-2Y;+cp;-, , pd+,+cp;-1)

(2)

]41:

r2 - X2 +_T

\ 2 I = 0. (3)

D. This scheme has been studied by Jimenez [5]:

qt;+i _ 2cp; + cp;-’

T2 -

‘p;+1- 2~; +97-i + E(cp;+,) - F(cp;-,)

X2 ‘p;+1- cp;-l =o. (4)

In the four cases: the central second differences for the terms qtt and ‘p,, are used. The difference among the schemes is in the discretization of the nonlinear term f(q).

The motivation of the comparison of the above schemes is related to two main observations:

1. In the book by Dodd et al. [6] it is claimed that no detailed compari- son of schemes A and B has been made.

2. In the computations carried out in [2], unphysical behavior of the numerical solutions was observed for long-time calculations.

In this situation, our purpose is to get some insight into the differences of the four schemes by applying them to the case f(cp) = m2rp + gv3 with g > 0. For this nonlinearity the mathematical theory is well established [8].

Page 3: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 63

The paper is organized as follows. In Section II the features of the schemes are described; in Section III the numerical simulations are presented. Finally, the conclusions are discussed in Section IV, and the Appendix presents the results for the ODE case.

II. NUMERICAL SCHEMES

For a general nonlinearity f(cp) there are two conserved quantities associ- ated to the equation (1): the energy and the momentum,

E = /d+bd”+ sd”+ W)~

P= x.s$p,cp,. I

It must be remarked that if F(q) is positive definite, then

At the same time, the equation (1) is invariant under time and space inversion. The dynamics of the system is contained in such conservation laws and symmetries; for this reason, it is important to construct schemes which preserve the conservation laws and symmetries of the underlying continuous equation. In this framework, the comparison of the four schemes is consid- ered by analyzing the following properties:

1. Existence of Discrete Analogs of the Conserved Quantities and Symmetries of the Equation

All four schemes show time and space inversion symmetries. On the other hand, scheme A has a discrete conserved energy

Page 4: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

64 SALVADOR JIMkNEZ AND LUIS VAZQUEZ

and scheme D a conserved momentum

(6)

According to (5) in the case where F(q) is positive definite, there is a discrete momentum associated with scheme A that is bounded by the energy

“+l-v; 9$+1-&l p” = XXV’

1 7 2x .

On the contrary, for scheme D, the conserved momentum does not define either a conserved or a bounded energy. For schemes B and C we were not able to find a conserved energy or a momentum. According to the numerical computations it seems that they have no conserved energy. Nevertheless, discrete expressions for the energy and the momentum can be written for all the schemes [5], and their properties have been checked numerically in what follows.

2. The Behavior of the Jacobian of the Mapping Associated with every Finite Difference Scheme 19 - 1 O]

Any finite difference scheme can be understood as a discrete evolution mapping. More precisely, the above four schemes can be formally written as

(;.::) =T( ;:)y

where p”+’ = (x”+l- r”/r, X” = (cp;), and T represents the nonlinear mapping. The evolution of the underlying continuous system is canonical, and the volume in the phase space is preserved. At the discrete level a necessary condition for the canonical evolution is that the jacobian of the application T must be unity: J = a(~“+‘, p”+‘)/6J(x”, p”) = 1.

It turns out that J = 1 for schemes B, C, and D, while for scheme A with N spatial points,

I= ,frlh 03)

Page 5: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Curdon Equation

with

72

j,= ‘pl “+l- cp; - p’(cp’f)

.T2

65

(9) ‘p?+2- ‘p;+l + ;q ‘p;+2)

We must stress that a unit jacobian does not guarantee bounded numerical solutions even when the solutions of the underlying continuous equation are bounded; this is due to the fact that the phase space is not compact, and is well shown by the numerical computations.

3. The Relation between Numerical and Continuous Solutions According to [B], we know that for given smooth initial data the solution of

(1) is smooth and it does not show a blowup. We will check this property with the numerical computations.

4. The Local and Global Stability and Convergence The global stability and convergence have been established for scheme A

in [ll] for r < x. To our best knowledge, for schemes B, C [12], and D [5] only the local stability has been established. We must remark that the global stability analysis is deeply related to the existence of discrete conserved quantities.

III. NUMERICAL SIMULATIONS

We solve Equation (1) with the nonlinearity

fW = m2v + w3 (10)

in the space interval [0, L] with periodic boundary conditions and mesh spacing r = 0.01 and x = 0.02. We choose m2 E [O.l, lo], g = 1, and L = 1.28. We consider the initial data

Page 6: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Ml SALVADOR JIMkNEZ AND LUIS VtiZQUEZ

where the amplitude A is taken in [O.l, NO]. For these data, and due to the periodic boundary conditions, the continuous solutions remain always sym- metric with respect to the center of the spatial interval.

The relevant features of the computations are the following:

1. When the amplitude A is less than 1, the numerical solutions of the four schemes are similar up to very long times [Figure l(a)-(d)]. For intermediate amplitudes (A = 1) the four schemes start to show different results for long times [Figure 2(a)-(d)]. For larger amplitudes (A = 10) the solutions of schemes B, C, and D lose the spatial symmetry after a certain time, while the solution of scheme A remains symmetric [Figure 3(a)-(d)]. For large amplitudes (A > 1.5) the solutions obtained with schemes B, C, and D show a blowup, while the solution obtained with scheme A is bounded, as is the underlying continuous solution, and preserves the spatial symmetry [Figures 4(a)-(d) and 5.1

2. The discrete energy of scheme A is conserved with very good preci-

sion for all the initial data and parameter values (the relative error appears to

FIG. 1. For (a) scheme A, (b) scheme B, (c) scheme C, and (d) scheme D we plot the

computed solution cp(t, r) versus r and t for A = 0.1 and m2 = 1. The y-axis corresponds to cp, and the oblique axis to time. Ranging from time t = 0 to t = 1000, the curves are separated by a time interval At = 100.

Page 7: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 67

2.4 -

2.2 -

2.0 -

1.8 -

1.6 -

1.4 -

> 1.2 -

1.0 -

.8 -

Cc)

FIG. 1. Continued.

Page 8: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

I I I I I J

0 .2 .4 .6 .E 1.0 1.2 1.4 1.5 1.8

(4

FIG. 1. Continued.

22 -

20 -

18 -

I6 -

14 -

12 -

* -

10 -

8-

I I I I I I ,

0 .2 .4 .6 .8 1.0 1.2 1.4 1.6

FIG. 2. For (a) scheme A, (b) scheme B, (c) scheme C, (d) scheme D we plot the computed solution cp(t,r) versus x and t for A =l and m’=l. The y-axis corresponds to ‘p, and the

oblique axis to time. Ranging from time t = 0 to t = 1000, the curves are separated by a time

interval At = 100.

Page 9: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Co&n Equation 69

ii%,,,

0 .2 .4 .5 .8 1.0 1.2 1.4 1.6

22 r

r i ‘-------

f&k,,, 0 .2 .4 .6 .8 1.0 1.2 1.4 I.6

x

(4

FIG. 2. Continued

Page 10: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

0 .2 .4 .6 .6 1.0 1.2 1.4 1.6

320 -

300 -

260 -

260 -

240 -

220 -

200 -

160 -

> 160 -

140

120

100 :

x

(4

FIG. 2. Continued.

FIG. 3. For (a) scheme A, (b) scheme B, (c) scheme C, (d) scheme D we plot the computed

solution q(t, x) versus x and t for A = 10 and m2 = 1. The y-axis corresponds to ‘p. and the oblique axis to time. Ranging from time t = 0 to t = 200, the curves are separated by a time

interval At = 20.

Page 11: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 71

320 r

260 I-

240 -

220 -

200 -

180 -

0 .5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

(b)

320 -

300 -

280 -

260 -

240 -

220 -

200 -

130 -

* 160 -

140 -

0 .5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

FIG. 3. Continued.

Page 12: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

320 -

3w -

280 -

260 -

220 -

200 -

180 -

* 160 -

140 -

120 -

FIG. 3. Continued.

1600

1400 1200

I

1000 -

> 800 -

600 -

‘loo

200 1

x

(4

FIG. 4. (a) For scheme A we plot the computed solution cp(t, z) versus x and t for A = 15

and m2 = 1. The y-axis corresponds to q, and the oblique axis to time. Ranging from time t = 0

to t - 0.05, the curves are separated by a time interval At = 7 = 0.01. (b)-(d) as in (a) but for

schemes B-D respectively; at t = 0.06 the numerical solution blows up.

Page 13: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation

lml -

1600 -

1400 -

1200 -

loco -

s-

800 -

600 -

,~ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

x

@I

1800 r

14M t

73

FIG. 4. Continued.

Page 14: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

/

O~Jl”,“‘,‘,‘l’,“‘l’,‘,‘l ‘3’ 0 I2 3 4 5 6 7 a 9 10 11 12 13 14

X

Cd)

FIG. 4. Continued.

15m

iom

5m

0 0 .2 .4 .6 .8 1.0 1.2 1.4 1.6

X

FIG. 5. For scheme A we plot the computed solution cp(t, r) versus z and t for A = 100 and m2 - 1. The y-axis corresponds to ‘p, and the oblique axis to time. Ranging from time t = 0 to t = 8, the cmves are separated by a time interval At = 0.8.

Page 15: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Cordon Equation

.06690 -

.08666 -

.06666 -

.06664 -

.08682 -

- r .08680

B

x .08678 -

.08676 -

.08674 -

.06672 -

.06670 -

I I I1 I1 / I I / I 1

100 200 300 400 500 600 700 600 900 1000 0

.06690 r

.06688 t ,

r

.06666

.06664

i

.06662 +

t .06660 1

s b

6 .08678

5

t .08674 : ;i

.06672 t i

T

(a)

75

FIG. 6. For (a) scheme A, (b) scheme B, (c) scheme C, (d) scheme D we plot the energy versus t for A = 0.1 and m2 = 1.

Page 16: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

76 SALVADOR JIMkNEZ AND LUIS VziZQUEZ

.08690

08688

.08686 .086&l :

.08682 -

.08680 -

L g .08678

5 .08676

0

.08688

.08686 F

.08684 1

.08682 t

.08680 t

\

(4

FIG. 6. Continued.

Page 17: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 77

10.10 r IO.09

10.08

LO.07

IO.06

10.05

10.04

10.03

10.02

10.01

0

LO.11 r

10. IO

10.09

IO.06

10.07 & 6 5

10.06

IO.05

10.04

10.03

I I I I I I I I I I I I I I I I I I

100 200 300 400 500 600 700 800 900 1000

T

(4

I I I I I I IS I I3 I I! I8 I 0 IO0 200 300 400 500 600 700 800 900 ,000

(b)

FIG. 7. For (a) scheme A, (b) scheme B, (c) scheme C, (d) scheme D we plot the enerm versus t forA=land m2=1.

Page 18: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

78 SALVADOR JIMkNEZ AND LUIS VkZQUEZ

IO. IO

10.09

IO.08

10.07

L P lAJ 10.06 iI

10.05 - 1 I

10.04 -

10.03 i_

10.09

10.08

10.07

10.06

& 6 6

10.05

10.04

10.03

IO.02

(c)

10.10 r

I , I i , I / / 500 600 700 800 900 ,000

T

t II I I I

0 100 200 300 400

100 200 300 400 500 600 700 800 900 1000

1

Cd)

Flc. 7. Continued.

Page 19: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Id&do&n Equation

0 2 ‘0 40 60 60 IO0 120 140 160 160 200

15600

15400

15200

15000

p

& = 14600

x

14600

144oc

14200

14000 i 0

:

(b)

79

FIG. 8. For (a) scheme A, (b) scheme B, (c) scheme C, (d) scheme D we plot the enera versus t for A = 10 and m2 = 1.

Page 20: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

80 SALVADOR JIMkNEZ AND LUIS VAZQUEZ

14400 a ’ f ’ c ’ 8 ’ ’ ’ 1 ’ I ’ 1 ’ 1 ’ a ’ 0 20 40 60 80 LOO 120 140 160 130 200

(4

24000 r

23000

1 22000

21000

20000 i

(4

FIG. 8. Continued.

Page 21: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation

, .0004

I. 0003

1.0002 t

1.0001 t 7

s ; 1.0000

z 4

.9999

.9993

.9997

.9996

FIG. 9. For scheme A we plot the energy versus t for A = 100 and m2 = 1.

1.0005

0

81

FIG. 10. For scheme A we represent the jacobian versus t for (a) A = 0.1, (b) A = 1, (c) A = 10, (cl) A = 100; td = 1.

Page 22: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

82 SALVADOR JIMkNEZ AND LUIS VAZQUEZ

1.00030 r

1.12

1.10

1.08

L.06

1.04

-l 1.02

E P y 1.m 7

.98

.96

.94

.92

(b)

” (4

FIG. 10. Continued.

Page 23: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gvrdun Equation

2.0

1.6

1.6

1.4

1.2 7

5 E I.0

8 4

.8

.6

.4

.2

3 0’ ’ ’ ’ ’ a 0 1 2 3

Cd)

FIG. 10. Continued.

be less than lOPi for all the computations). For schemes B, C, and D the discrete energy is accurate for small amplitudes but shows strong fluctuations for intermediate amplitudes and diverges when the solutions diverge. This is represented in Figures 6 to 9.

3. The initial data (10) have zero momentum. Although only scheme D has an exactly conserved momentum, the computations indicate a zero value of the momentum for all the initial values considered and all four schemes, while the numerical solutions remain spatially symmetric, due to this prop- erty.

4. As we indicated before for scheme A, the jacobian J varies with the amplitude of the initial data. We have found that I oscillates around unity with increasing amplitude as A increases, but stays close to unity [Figure

W444.1

IV. CONCLUSIONS

As one would expect, all four numerical schemes give the same results for small amplitudes of the initial data, even for very long computations. For intermediate amplitudes we have found that the solutions of schemes B, C,

Page 24: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

84 SALVADOR JIMhNEZ AND LUIS V6ZQUEZ

and D do not represent accurately the energy conservation and the symme- tries of the continuous solution, and on considering higher amplitudes they show an unphysical blowup. On the other hand, for the same initial data, the solution of scheme A does not present this behavior and shows both the conservation of energy and the spatial symmetry. Moreover, the solution of scheme A can be computed far beyond the point of blowup of the other schemes. The existence of a conserved energy appears to be a fundamental property that makes scheme A very suitable for long time and large ampli- tude computations; on the other hand, the conservation of the volume of phase space does not seem to introduce a significant difference between the schemes. It must be remarked that even if there exists a conserved discrete energy for schemes B, C, and D, that does not guarantee the boundedness of the numerical solution when the underlying continuous solution is bounded. These results partly answer the open question established in [6].

On the basis of the numerical computations shown it turns out that we get a better representation of the properties of the underlying continuous system with the conservative scheme A, especially for long time and/or large amplitudes of the initial data. It is very interesting to consider that a similar result holds for the much simpler case of ODES, as the Appendix shows.

APPENDIX

In this Appendix we consider the case of the ODE derived from Equation (1) if we drop the spatial dependence. It corresponds to the one-dimensional motion of a particle under a conservative force. Its interests is twofold: On one hand we show that the unphysical behavior of schemes B, D, and C appears even when restricted to this much simpler case. On the other hand nonlinear dynamical systems are a topic on their own, and it is of interest to know suitable schemes for their numerical study.

The Appendix is organized as follows: In Section 1 we present the two numerical schemes and some of there relevant properties. In Section 2 we present and compare the numerical results obtained with the two schemes with regard to the shape of the trajectories and the jacobians of the associated mappings. In Section 3 we discuss the conclusions.

1. Introduction; Numerical Schemes The equation

d2x ,,z=fW (12)

Page 25: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Cordon Equation 85

describes the displacement x of a particle of unit mass under a conservative force f(x). If we consider the evolution of the system in the framework of the hamiltonian formalism, the evolution equation reads

dp ,,=f(4

so that the evolution

(13)

is governed by a canonical transformation whose generatrix function is the hamiltonian

H(x, p) = ;pz + v(x), (15)

where f( x ) = - U’( r ). The dynamics of the system are described by two main properties: the hamiltonian is a constant of the motion, and the volume of phase space is conserved. As for the PDE case, it is highly desirable that the discrete schemes preserve the conservation law and the symmetries of the underlying continuous equations; otherwise the numerical solutions may present unphysical properties [ 13- 151.

A. When applied to the ODE, scheme A becomes

x”+2-22x”+l+x” U( Xn+2 > -U(x”> 72 = - X”+2+Xn ’ (16)

and for the Hamilton equations (13) we can rewrite it as

x”+l - xn

= n P 9

7

P Il+1

- P” u( rn+l + Tp”+l) - v( x”) =-

7 TP ( “+l+PY . (17)

Page 26: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

86 SALVADOR JIMkNEZ AND LUIS V6ZQUEZ

The scheme is time reversible, and the conserved discrete energy is now

(18)

The conservation of E” guarantees the boundedness of the discrete solution when the solution of the underlying continuous equation is bounded. The jacobian of the discrete mapping is now

(19) J= 2p” - 7U’( xn+l- Tp”+l)

2P n+l+ ,qxn+l + Tpn+l) ’

I

I 000

)I

(a)

1 1000 2000

FIG. 11. For (a) scheme A, (b) scheme B of the Appendix, .T, is plotted against r with

initial conditions x(O) = 10.1 and x,(O) = 10 for the time interval [0,25], which corresponds to 33 period5.

Page 27: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 87

which corresponds to (9). Since the conservation of the discrete energy bounds the amplitude of the numerical solution, the fluctuation in J can be understood as the stretching of the initial phase space element along the trajectory. The mapping defined by scheme A is not canonical; this raises the natural question of comparing the numerical schemes on the basis of canoni- cal and noncanonical mappings [16]. This important problem will not be treated here.

B. All three schemes B, C, and D of the PDE case reduce to the same scheme for the ODE case [17] and the equation

xn+‘z _ 2x”+1 + xn

72 = f(xn+l), (20)

Page 28: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

88

or

SALVADOR JIMkNEZ AND LUIS V.iZQUEZ

x “+l_Xn

= ”

P 9

7

P n+l

-p” = f(,n+l>. (21) 7

This scheme B for the ODE is also time reversible, but does not show a

(4

FIG. 12. For (a) scheme A, (b) scheme B of the Appendix, X, is plotted against x with initial conditions x(O) = 100.1 and r,(O) = 10 for the time interval [0, MO], which corresponds to

1400 periods.

Page 29: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 89

discrete energy identically conserved. If we multiply (20) by (x”+’ - x”)/T and rearrange the terms, we obtain

(

Xn+2_X”+I 2 1 Xn+l_x” 2 1

ii 7

) -;( 7 ) =:j-~x~+l)~“+~-xn. (22)

From this we cannot express the change in the kinetic energy as the difference between two values of a potential (except for the linear case), and

-l&o 0.w l00.00 1oww

x

(b)

FIG. 12. Continued.

Page 30: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

90 SALVADOR JIMkNEZ AND LUIS VbZQUEZ

no expression for a discrete energy En is conserved. We must stress that even if we are able to obtain some identically conserved discrete energy, the boundedness of the amplitude of the numerical solution remains an open problem. In fact we have found for large initial amplitudes a blowup in the numerical solution that is not present in the underlying continuous equation.

As in the PDE case, the jacobian of the mapping is exactly unity, and since J = 1, a natural question arises: does a hamiltonian system exist such that the mapping defined by (21) is its Poincare map? The answer is yes, and the system is described by an impulsive hamiltonian which contains a periodic &function

H=;p2+U(~)A(t), (23)

+ P

FIG. 13. For scheme B of the Appendix, r, is plotted against r with initial conditions

r(O) = 100.458 and x,(O) = 10 for the time interval [0,7.67]. Each value is plotted separatedly by a cross. We have labeled the last nine values before the numerical solution blows up.

Page 31: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation

where

91

A(t) = E 8(t - k7); 6(0)=1, 6(WO)=O. (24) k=O

The equations of motion for this system are

i=p

fi= -U’(x)A(t)=f(x)A(t),

and it can be exactly represented by the difference equations (21).

(25)

FIG. 14. J is plotted against t for the same data as (a) Figure 11(a), (b) Figure 12(a) and the time interval [0,200].

Page 32: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

92

2. Numerical Results

SALVADOR JIMkNEZ AND LUIS ViiZQUEZ

We compare the numerical results of the two schemes A and B for the case

U(x)=~x2+~x4, (26)

which has only periodic trajectories. We have fixed T = 0.01 and p(O) = x,(O) = 10 through all the computations.

From the study of the trajectories for different initial values we obtain that for small and intermediate amplitudes the two schemes give the same results

5 11

d.00 t

(b)

m.00

FIG. 14. Continued.

Page 33: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

Analysis of a Nonlinear Klein-Gordon Equation 93

[Figure 11(a)-(b)], while for larger amplitudes the two schemes show very different behavior and the numerical solution obtained with scheme B blows up in finite time for initial amplitudes x(O) > 100.1 and r,(O) = 10 (Figures 12-13). This numerical behavior has nothing to do with the underlying continuous solution. Scheme A has not this unphysical behavior, and its jacobian is close enough to unity for all the computations [Figure 14(a)-(b)].

3. Conclusions From the numerical results, we see that the boundedness of its numerical

solutions due to the existence of the conserved discrete energy makes scheme A more suitable for large amplitude computations than scheme B. On the other hand it turns out that the numerical scheme B is associated with a time dependent impulsive hamiltonian whose dynamics, even if it conserves the volume of phase space, has nothing to do with the underlying continuous system for large amplitudes of the initial data. Finally, the area conserving character of scheme B does not imply better accuracy, since it cannot avoid the blowup of the numerical solution.

REFERENCES

1 W. A. Strauss and L. Vkquez, Numerical solution of a nonlinear Klein-Gordon equation, J. Comput. Phys. 28:271 (1978).

2 F. Fucito, F. Marchesoni, E. Marinari, G. Parisi, L. Peliti, S. Ruffo, and A. Vulpiani, Approach to equilibrium in a chain of nonlinear oscillators, J. Physique 43:707-713 (1982), and references therein.

3 G. Caravati, A. GiorgiIli, and L. Galgani, Leti. Nuouo Cimento 38(11):385-389 (1983).

4 M. J. Ablowitz, M. D. Kruskal, and J. F. Ladik, Solitary wave collisions, SIAM 1. Appl. Math. 36:428-437 (1979).

5 S. JimBnez, Comportamiento de Ciertas Cadenas de Osciladores No Lineales, Ph.D. Thesis, Univ. Complutense de Madrid, Spain, 1988.

6 R. K. Dodd, J. C. Eilbeck, J. D. Gibbon, and H. C. Morris, Solitons and Nonlinear Wave Equations, Academic, 1982.

7 F. Marchesoni, private communication. 8 H. Brezis, Vibrations for&es et image d’une somme d’op&rateurs non linbaires, in

Res. Notes Math. 46 (M. Atteia, D. Bancel, and I. Gumowski, Eds.), Pitman, 1981, pp. 3-12, and references therein.

9 Feng Kang, Wu Hua-Mao, Qin Meng-Zhao, and Wang Dao-Liu, Construction of canonical difference schemes for hamiltonian formalism via generating functions, in J. Comput. Math. to appear, and references therein.

10 P. J. ChannelI and J. C. Scovel, Symplectic integration of hamiltonian systems, Preprint, Los Alamos National Lab., 1988.

Page 34: Analysis of Four Numerical Schemes for a Nonlinear Klein-Gordon Equation

94 SALVADOR JIMkNEZ AND LUIS VAZQUEZ

11 K. Pen-Yu and L. Vkzquez, A numerical scheme for nonlinear Klein-Gordon equations, J. Appl. Sci. 1(1):25-32 (1983); Numerical solution of a nonlinear wave equation in polar coordinates, Appl. Math. Cornput. 14(4):313-329 (1984).

12 R. D. Richtmyer and K. W. Morton, Dij@rence Methods for Initial-Value Problems 2nd ed., Wiley, 1967.

13 J. M. Sanz-Sema, An explicit finite-difference scheme with exact conservation properties, I. Cutnput. Phys. 47(2):199-210 (1982) and references therein.

14 M. Yamaguti and S. Ushiki, Chaos in numerical analysis of ordinary differential equations, Phys. D 3D(3):618-626 (1981).

15 L. Vazquez, Long time behavior in numerical solutions of certain dynamical systems, An. Fis. 83A:254-260 (1987).

16 R. Vilela Mendes, Lett. Math. Phys. 11:289 (1986), and references therein. 17 D. Potter, Compututiunul Physics, Wiley, London, 1973.