2_1_Atanasova_Georgiev_23_30

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

International Scientific Conference IMEA’2023

NUMERICAL SOLVING
OF THE SINE-GORDON EQUATION

Pavlina Atanasova, Valentin Georgiev

Abstract. The sine-Gordon equation is a nonlinear partial differential


equation, describing a multitude of physical phenomena. In this paper, the
(1+1)-dimensional sine-Gordon equation is numerically solved, utilizing
the Crank-Nicolson method and tridiagonal sweep. The results are verified
by comparison with analytical solutions. An error estimate is presented.

Key words: Partial differential equation, Nonlinearity, Sine-Gordon equa-


tion, Crank-Nicolson.
Mathematics Subject Classification: 65M06, 65N06.

1. Introduction

The sine-Gordon equation

uxx − utt = sin (u) (1)

is an important nonlinear partial differential equation, first appearing in


differential geometry [1]. Its name comes from its linearization, known in
quantum mechanics as the Klein-Gordon equation uxx − utt = u.
Among its many applications, some are the description of self-induced
transparency [2], the dynamics in long Josephson junctions [3], the de-
scription of magnetic domain wall dynamics [4], the classical model of
one-dimensional dislocation theory [1].
In [5] a classification of some analytical solutions is presented. The
main feature of most solutions of (1) is the form of the partial derivative
with respect to x, it being a soliton – a localized disturbance or pulse that
retains its shape after interacting with other solitons [1].
A couple of the solutions have been used as a source of initial and
boundary conditions:
23
29 Nov – 01 Dec 2023, Pamporovo, Bulgaria

1. Travelling wave solution


  
x ± vt
u(x, t) = ±4 arctan c exp √ , (2)
1 − v2

2
where v = ss−1 , c and s2 > 1 are constants and all sign combina-
tions are possible.
2. Two-soliton solution
"√ #
s2−1 sinh(sx + c1 )
u(x, t) = ±4 arctan √ , (3)
s cosh( s2 − 1 · t + c2 )

where s2 > 1 and c1 , c2 are constants of integration.


3. Soliton-Antisoliton solution
" √ #
s 2
sinh( s − 1 · t + c2 )
u(x, t) = −4 arctan √ , (4)
s2 − 1 cosh(sx + c1 )

where s2 > 1 and c1 , c2 are constants of integration.


4. Breather solution
" √ #
s sin( 1 − s2 · t + c2 )
u(x, t) = −4 arctan √ , (5)
1 − s2 cosh(sx + c1 )

where s2 < 1 and c1 , c2 are constants of integration.


In this paper we have considered equation (1) with the initial condi-
tions

u(x, 0) = ϕ(x), x ∈ [a, b]


ut (x, 0) = ψ(x), x ∈ [a, b]

and the boundary conditions

u(a, t) = µL (t), t ∈ [0, T ]


u(b, t) = µR (t), t ∈ [0, T ].
24
International Scientific Conference IMEA’2023

2. Numerical Approach

The method used in this paper is a variation on the Crank-Nicolson


method [6, 7], which is a second order accuracy finite difference method.
It can be shown that in diffusion equations (and many others) it is uncon-
ditionally stable [8]. It is classically used in problems involving ut as the
highest derivative of u in terms of t. Let us instead consider the equation
utt = F (u, x, t, ux , uxx )
on the intervals x ∈ [a, b], t ∈ [0, T ] and let us create a uniform mesh
with steps h = b−a T
n for x and τ = m for t, m, n ∈ N. Using the notation
xi = a + ih, tj = jτ , u(xi , tj ) = uji and Fij = F evaluated for xi , tj and
uji (i = 0, n, j = 0, m) we get

uj+1
i − 2uji + uj−1
i 1 h j+1 j−1
i
= F + Fi .
τ2 2 i
This is an implicit method – it leads to a system of algebraic equations for
the layer t = (j + 1)τ , which in general is nonlinear. If F is linear, then
the system will be tridiagonal, allowing to be solved efficiently by using a
tridiagonal sweep [9].
Our approach of providing the scheme is to separate F = uxx −sin(u)
into a linear (uxx ) and a nonlinear part (− sin(u)) and employ linear in-
terpolation on uxx . If L2 (xi , t) denotes the Lagrange interpolation polyno-
mial of uxx on the interval t ∈ [tj−1 , tj+1 ] with nodes (xi , tj−1 , uxx j−1
i ) and
j+1
(xi , tj+1 , uxx i ) we get the following estimate
M3
|uxx − L2 (xi , t)| ≤ |(t − tj−1 )(t − tj+1 )| = O(τ 2 )
3!
where M3 = max {uxxttt |x=xi ,t }. The advantage to this approach is
t∈[tj−1 ,tj+1 ]
removing the necessity of solving a nonlinear system of equations, while
keeping the implicit nature of the method.
Let us consider the discretization of equation (1)
 
utt i = uxx i − sin uji
j j
(6)

and then, applying midpoint second order accuracy finite differences and
the linear interpolation of uxx at the point (xi , tj ), the left hand side (LHS)
25
29 Nov – 01 Dec 2023, Pamporovo, Bulgaria

and right hand side (RHS) become


uj+1
i − 2uji + uj−1
i
LHS = 2
τ
" #
j+1 j+1 j+1 j−1 j−1 j−1
1 ui+1 − 2ui + ui−1 ui+1 − 2ui + ui−1  
RHS = 2
+ 2
− sin uji .
2 h h

After some algebraic transformations we are left with


τ 2 j+1 τ2 τ 2 j+1
 
j+1
u − 1 + 2 ui + 2 ui+1 =
2h2 i−1 h 2h
(7)
τ 2 j−1
= uj−1
i − 2uj
i − 2
(ui−1 − 2uj−1
i + uj−1 2 j
i+1 ) + τ sin (ui )
2h
for i = 1, n − 1, j = 1, m − 1. The stencil is shown on Figure 1.

Figure 1. Stencil for the Crank-Nicolson method

For simplicity, let us denote the RHS of (7) as zij+1 . Then we can
express the scheme as a system of linear algebraic equations
Auj+1 = z j+1 ,
where

   
τ2 τ
− 1+ 0

 τ2
h2 
− 1+
2h2
τ2

τ
··· 0 

 2h2 h2 2h2 

A = .. ... .. 
,
 .  . 
τ2 τ2
τ
− 1+
 

 0 ···
2h2

0 τ2
h2 
− 1+
2h2
τ2


2h2 h2
26
International Scientific Conference IMEA’2023

uj+1 = (uj+1 j+1 j+1 j+1 T


1 , u2 , . . . un−2 , un−1 ) ,
 2 2
T
τ τ
z j+1 = z1j+1 − 2 µL (tj+1 ), z2j+1 , . . . zn−2
j+1 j+1
, zn−1 − 2 µR (tj+1 ) ,
2h 2h
solving which will give us the layer of values {uj+1 n−1
i }i=1 .
Since we need two layers – uj and uj−1 to find uj+1 , we cannot
use this procedure to find u1 . In that case we proceed thus – we assume
that u(x, t) is differentiable on the interval t ∈ [−τ, 0] and use the initial
condition
u1i − u−1
ψ(xi ) = ut (xi , 0) = i
+ O(τ 2 ), i = 0, n

−1
to express ui . Then we substitute it into (6) and, noting that u0i = ϕ(xi ),
we get
τ2 τ2 τ2
 
1
ui = 2 (ϕ(xi+1 ) + ϕ(xi−1 )) + 1 − 2 ϕ(xi ) + τ ψ(xi ) − sin(ϕ(xi )),
2h h 2
through which we can find u1 explicitly and move on to the implicit scheme.
3. Numerical Results

Equations (2–5) have been used as a source of initial and boundary


conditions.
In order to verify the method, we have analyzed the approximation
error. Measuring the error is done by either comparing the results with
the original solution or by substituting the found results in the partial
differential equation, using finite differences as approximations. We will
use the notation eji for the error at the point (xi , tj ).
The errors are presented by the maximum recorded error
max |eji |
i=0,n,j=0,m

and by applying the root mean square error (RMSE)


v
u m X n
1 X 2
(eji ) .
u
t
(n + 1)(m + 1) j=0 i=0

The parameters for the initial and boundary conditions are chosen
thus:
27
29 Nov – 01 Dec 2023, Pamporovo, Bulgaria

1. Travelling wave – s = 2, c = 2,
2. Two-soliton – s = 2, c1 = c2 = 0,
3. Soliton-antisoliton – s = 2, c1 = c2 = 0,
4. Breather – s = 0.5, c1 = c2 = 0.
A summary of the results can be found in Table 1.

Case 1
a = −5, b = 5, T = 5, n = 200, m = 400
h2 + τ 2 = 2.66e−3
Solution PDE
Max RMSE Max RMSE
Travelling wave 1.21e−2 2.32e−3 4.42e−3 1.02e−3
Two-soliton 1.21e−2 2.32e−3 4.42e−3 1.02e−3
Soliton-Antisoliton 1.12e−2 2.17e−3 3.67e−3 1.08e−3
Breather 2.54e−4 6.97e−5 3.27e−5 1.01e−5
Case 2
a = −5, b = 5, T = 5, n = 2000, m = 4000
h2 + τ 2 = 2.66e−5
Max RMSE Max RMSE
Travelling wave 1.16e−4 1.62e−5 2.86e−5 7.21e−6
Two-soliton 1.21e−4 2.32e−5 4.47e−5 9.97e−6
Soliton-Antisoliton 1.1e−4 2.17e−5 3.73e−5 1.06e−5
Breather 2.54e−6 6.99e−7 3.36e−7 1.02e−7
Table 1. Numerical results

Plots of some of the found solutions in case 2 and their corresponding


errors are presented in Figures 2–5.

Figure 2. Soliton-antisoliton solution Figure 3. PDE error


28
International Scientific Conference IMEA’2023

Figure 4. Breather solution Figure 5. Solution error

As can be seen from Table 1 and Figures 2–5, the method performs
according to the predicted order of accuracy, that is, second order in both
x and t.
4. Conclusion

In this paper, we have utilized the Crank-Nicolson method to numer-


ically solve the sine-Gordon equation. We have modified the classic scheme
by considering an equation involving utt and by separating the linear and
nonlinear parts and applying a linear interpolation on uxx . As a results, we
keep the implicit nature of the method, while removing the need to solve a
nonlinear algebraic system of equations, instead solving a linear tridiagonal
one using tridiagonal sweep.
As verification of the method, we have presented results from two
cases with different step sizes and four sets of initial and boundary condi-
tions. Two types of errors are utilized. Graphics of solutions and errors
are presented.
Acknowledgements

This study is financed by the European Union-NextGenerationEU,


through the National Recovery and Resilience Plan of the Republic of
Bulgaria, project DUECOS BG-RRP-2.004-0001-C01.
References

[1] G. Lamb, Elements of Soliton Theory, 1980, John Wiley & Sons, Inc.,
ISBN: 0471045594.
[2] G. Lamb, Analytical Descriptions of Ultrashort Optical Pulse Propa-
gation in a Resonant Medium, Reviews of Modern Physics, 1971, Vol.
29
29 Nov – 01 Dec 2023, Pamporovo, Bulgaria

43, No. 2, 99–124, doi: 10.1103/RevModPhys.43.99, ISSN: 0034-6861


(print), 1539-0756 (online).
[3] J. Mazo, A. Ustinov, The sine-Gordon Equation in Josephson-
Junction Arrays, The sine-Gordon Model and its Applications, 2014,
Vol. 10, 155–175, doi: 10.1007/978-3-319-06722-3 7, ISBN: 978-3-319-
06721-6.
[4] E. Feldtkeller, Magnetic Domain Wall Dynamics, Phys. Status So-
lidi B, 1968, Vol. 27, No. 1, 161–s170, doi:10.1002/pssb.19680270117,
ISSN: 0370-1972 (print), 1521-3951 (online).
[5] V. Georgiev, P. Atanasova, On the Analytic Solutions of the Sine-
Gordon Equation, Scientific researches of the Union of Scientists in
Bulgaria-Plovdiv, Vol. 24, ISSN: 1311-9192 (print), 2534-9376 (online),
(in print).
[6] J. Crank, P. Nicolson, A practical method for numerical evalua-
tion of solutions of partial differential equations of the heat conduc-
tion type, Proc. Camb. Phil. Soc., 1947, Vol. 43, No. 1, 50–67, doi:
10.1017/S0305004100023197, ISSN: 0305-0041 (print), 1469-8064 (on-
line).
[7] P. Wilmott, S. Howison, J. Dewynne, The Mathematics of Financial
Derivatives: A Student Introduction, Cambridge Univ. Press, 1995,
ISBN: 0-521-49789-2.
[8] J. Thomas, Numerical Partial Differential Equations: Finite Differ-
ence Methods, Springer New York, 1995, ISBN: 978-0-387-97999-1.
[9] Yu. Zavyalov, B. Kvasov, V. Miroshnichenko, Methods of Spline Func-
tions, Moscow-Nauka, 1981.

Pavlina Atanasova1 , Valentin Georgiev2


1, 2
Paisii Hilendarski University of Plovdiv,
Faculty of Mathematics and Informatics,
236 Bulgaria Blvd., 4003 Plovdiv, Bulgaria
Corresponding author: atanasova@uni-plovdiv.bg

30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy