# Application of Hybrid Cubic B-Spline Collocation Approach for Solving a Generalized Nonlinear Klien-Gordon Equation

Authors: Shazalina Mat Zin; Ahmad Abd Majid; Ahmad Izani Md. Ismail; Muhammad Abbas
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The generalized nonlinear Klien-Gordon equation is important in quantum mechanics and related fields. In this paper, a semi-implicit approach based on hybrid cubic B-spline is presented for the approximate solution of the nonlinear Klien-Gordon equation. The usual finite difference approach is used to discretize the time derivative while hybrid cubic B-spline is applied as an interpolating function in the space dimension. The results of applications to several test problems indicate good agreement with known solutions.


---

## Body

## 1. Introduction

Consider a generalized nonlinear Klien-Gordon (KG) equation in the form of [1]
(1)
u
t
t
+
α
u
x
x
+
β
u
+
G
u
=
f
x
,
t
,
hhhhhhhh
a
≤
x
≤
b
,
0
≤
t
≤
T
,
subject to the initial conditions(2a)
u
x
,
0
=
ω
1
x
,
a
≤
x
≤
b
,
(2b)
u
t
x
,
0
=
ω
2
x
,
a
≤
x
≤
b
,
and the Dirichlet boundary conditions
(2c)
u
a
,
t
=
ϕ
1
t
,
0
≤
t
≤
T
,
(2d)
u
b
,
t
=
ϕ
2
t
,
0
≤
t
≤
T
,where u
(
x
,
t
) denotes the wave displacement at position x and time t, G
(
u
) is a nonlinear function in u, α and β are constants, andf
(
x
,
t
), ω
1
(
x
), ω
2
(
x
), ϕ
1
(
x
), and ϕ
2
(
x
) are known functions.In the last decade or so, spline functions have been utilized to solve differential equations. For example, Caglar et al. [2] have introduced a cubic B-spline interpolation method to solve two-point boundary value problems. The results obtained were compared to finite difference, finite element, and finite volume method. Caglar et al. [2] concluded that the B-spline interpolation is a better method to interpolate any smooth functions than others. Hamid et al. [3] have developed an alternative cubic trigonometric B-spline interpolation method for the same problem. They have found that the trigonometric B-spline gives better approximation compared to technique used by Caglar et al. Goh et al. [4] have presented a comparison between cubic B-spline and extended cubic B-spline collocation method for solving heat equation. It was concluded that the extended cubic B-spline gives better results. By using the same method, Abbas et al. [5] have solved coupled reaction diffusion system. They found that the B-spline function approximates the system very well and the results are in good agreement with known solutions.Great deals of research on solving KG equation have been carried out and the results can be found in [6–13]. Dehghan and Shokri [14] have approximated the numerical solution of the nonlinear KG equation using thin plate splines (TPS) radial basis functions. The implementation of the method has been claimed to be simple as the finite difference method and the numerical results obtained were more accurate than others in literature. Khuri and Sayfy [1] have solved the generalized nonlinear KG equation using a finite element collocation approach based on third degree B-spline polynomials. Six examples of nonlinear KG equation including Sine-Gordon equation have been analyzed. The proposed method gives compatible results and better approximation compared to Dehghan and Shokri’s method in [14]. Rashidinia et al. [15] have presented a cubic B-spline collocation method for solving linear KG equation. The results show the proposed scheme is effective and accurate.In this paper, a new approach by combining hybrid cubic B-spline function and central finite difference is proposed to solve the KG equation. The finite difference approach is used for the time derivative and the hybrid cubic collocation method is applied to interpolate the solutions at space dimension. The scheme obtained is analyzed by Von Neumann stability analysis. To show the feasibility and accuracy of the method, three problems are considered. Numerical solutions, absolute errors, maximum error, and order of convergence are calculated.


## 2. Temporal Discretization

Consider a uniform meshΩ with grid points (
x
j
,
t
k
) to discretize the grid region Δ
=
[
a
,
b
]
×
[
0
,
T
] with x
j
=
a
+
j
h and t
k
=
k
Δ
t, where j
=
0,1
,
2
,
…
,
n and k
=
0,1
,
2,3
,
…
,
N. The values of h and Δ
t denote mesh space size and time step size, respectively. The Klien-Gordon equation is approximated at t
k
+
1
th time level as follows [16]:
(3)
u
j
k
+
1
-
2
u
j
k
+
u
j
k
-
1
Δ
t
2
+
1
-
θ
g
j
k
+
θ
g
j
k
+
1
+
G
u
j
k
=
f
j
k
,
where g
j
k
=
α
(
u
x
x
)
j
k
+
β
(
u
)
j
k
,
g
j
k
+
1
=
α
(
u
x
x
)
j
k
+
1
+
β
(
u
)
j
k
+
1
,
0
≤
θ
≤
1, and the subscripts k and k
+
1 are successive time levels. Central difference approach has been used to discretize the time derivative. In order to produce Crank-Nicolson scheme, θ is chosen to be 0.5. Hence, the scheme becomes
(4)
u
j
k
+
1
+
0.5
Δ
t
2
g
j
k
+
1
=
2
u
j
k
-
0.5
Δ
t
2
g
j
k
+
Δ
t
2
f
j
k
-
G
u
j
k
-
u
j
k
-
1
.
At k
=
0, there is term, u
j
-
1, that is outside of domain. Therefore, initial condition (2b) is approximated by the following central difference approach. Thus,
(5)
u
j
-
1
=
u
j
1
-
2
Δ
t
ω
2
x
.
The whole scheme is solved numerically by substituting hybrid cubic B-spline function discussed in next section for j
=
0,1
,
…
,
n at each time level k.


## 3. Hybrid Cubic B-Spline Collocation Method

Through this section, hybrid cubic B-spline (HCuBS) is used to solve nonlinear KG equation. The approximate solution,u
(
x
,
t
), to the analytical solution, u
-
(
x
,
t
), is considered as
(6)
u
x
,
t
=
∑
j
=
-
3
n
-
1
C
j
t
H
4
,
j
x
,
where C
j
(
t
) are time-dependent unknowns to be determined and H
4
,
j
(
x
) is hybrid cubic B-spline basis function of order 4 as
(7)
H
4
,
j
x
=
γ
B
4
,
j
x
+
1
-
γ
T
4
,
j
x
,
where B
4
,
j
(
x
) is cubic B-spline basis function given as
(8)
B
4
,
j
x
=
1
6
h
3
x
-
x
j
3
,
x
j
,
x
j
+
1
,
h
3
+
3
h
2
x
-
x
j
+
1
+
3
h
x
-
x
j
+
1
2
-
3
x
-
x
j
+
1
3
,
x
j
+
1
,
x
j
+
2
,
h
3
+
3
h
2
x
j
+
3
-
x
+
3
h
x
j
+
3
-
x
2
-
3
x
j
+
3
-
x
3
,
x
j
+
2
,
x
j
+
3
,
x
j
+
4
-
x
3
,
x
j
+
3
,
x
j
+
4
,
and T
4
,
j
(
x
) is cubic trigonometric B-spline basis function [18, 19] given as
(9)
T
4
,
j
(
x
)
=
1
κ
p
3
x
j
,
x
∈
x
j
,
x
j
+
1
,
p
(
x
j
)
p
(
x
j
)
q
(
x
j
+
2
)
+
q
(
x
j
+
3
)
p
(
x
j
+
1
)
+
q
x
j
+
4
p
2
x
j
+
1
,
x
∈
x
j
+
1
,
x
j
+
2
,
q
(
x
j
+
4
)
p
(
x
j
+
1
)
q
(
x
j
+
3
)
+
q
(
x
j
+
4
)
p
(
x
j
+
2
)
+
p
x
j
q
2
x
j
+
3
,
x
∈
x
j
+
2
,
x
j
+
3
,
q
3
x
j
+
4
,
x
∈
x
j
+
3
,
x
j
+
4
,
with p
(
x
j
)
=
sin
(
(
x
-
x
j
)
/
2
), q
(
x
j
)
=
sin
(
(
x
j
-
x
)
/
2
), and κ
=
sin
(
h
/
2
)
sin
(
h
)
sin
(
3
h
/
2
). The value of γ plays an important role in the hybrid cubic basis function. If γ
=
0, the basis function is equal to cubic trigonometric B-spline basis function and if γ
=
1, the basis function is equal to cubic B-spline basis function. Hence, this work just considers the value of 0
<
γ
<
1.Due to local support properties of B-spline basis function, there are only three nonzero basis functions; namely,H
4
,
j
-
3
(
x
j
), H
4
,
j
-
2
(
x
j
), and H
4
,
j
-
1
(
x
j
) are included over subinterval [
x
j
,
x
j
+
1
]. Thus, the approximate solution and its derivatives with respect to x at (
x
j
,
t
k
) are
(10)
u
j
k
=
A
1
C
j
-
3
k
+
A
2
C
j
-
2
k
+
A
1
C
j
-
1
k
,
u
x
j
k
=
A
3
C
j
-
3
k
-
A
3
C
j
-
1
k
,
u
x
x
j
k
=
A
4
C
j
-
3
k
t
k
+
A
5
C
j
-
2
k
t
k
+
A
4
C
j
-
1
k
t
k
,
where
(11)
A
i
=
γ
σ
i
+
1
-
γ
η
i
,
for
i
=
1,2
,
…
,
5
,
with
(12)
σ
1
=
1
6
,
σ
2
=
4
6
,
σ
3
=
-
1
2
h
,
σ
4
=
1
h
2
,
σ
5
=
-
2
h
2
,
η
1
=
κ
1
2
κ
2
κ
3
,
η
2
=
2
κ
1
κ
3
,
η
3
=
-
3
4
κ
3
,
η
4
=
3
κ
1
-
2
κ
1
3
+
κ
3
8
κ
1
κ
2
κ
3
,
η
5
=
-
3
κ
4
+
2
κ
1
2
κ
2
4
κ
1
κ
2
κ
3
,
where
(13)
κ
1
=
sin
h
2
,
κ
2
=
sin
h
,
κ
3
=
sin
3
h
2
,
κ
4
=
sin
2
h
.
These approximations are substituted into (4) to produce the matrix system of order (
n
+
1
) with (
n
+
3
) unknown. In order to generate a unique solution, two additional equations are needed in the system. Hence, boundary conditions (2c) and (2d) are approximated as follows:
(14)
u
a
,
t
k
+
1
=
A
1
C
-
3
k
+
1
+
A
2
C
-
2
k
+
1
+
A
1
C
-
1
k
+
1
=
ϕ
1
t
k
+
1
,
u
b
,
t
k
+
1
=
A
1
C
n
-
3
k
+
1
+
A
2
C
n
-
2
k
+
1
+
A
1
C
n
-
1
k
+
1
=
ϕ
2
t
k
+
1
.
Thus, the resulting system can be written as
(15)
M
C
k
+
1
=
N
C
k
-
P
C
k
-
1
+
Q
,
where
(16)
M
=
A
1
A
2
A
1
0
⋯
0
0
0
0
m
1
m
2
m
1
0
0
0
m
1
m
2
m
1
0
⋮
⋱
⋮
0
m
1
m
2
m
1
0
0
0
m
1
m
2
m
1
0
0
0
0
⋯
0
A
1
A
2
A
1
,
N
=
0
0
0
0
⋯
0
0
0
0
n
1
n
2
n
1
0
0
0
n
1
n
2
n
1
0
⋮
⋱
⋮
0
n
1
n
2
n
1
0
0
0
n
1
n
2
n
1
0
0
0
0
⋯
0
0
0
0
,
P
=
0
0
0
0
⋯
0
0
0
0
A
1
A
2
A
1
0
0
0
A
1
A
2
A
1
0
⋮
⋱
⋮
0
A
1
A
2
A
1
0
0
0
A
1
A
2
A
1
0
0
0
0
⋯
0
0
0
0
,
Q
=
ϕ
1
t
k
+
1
Δ
t
2
f
0
k
-
G
u
0
k
⋮
Δ
t
2
f
n
k
-
G
u
n
k
ϕ
2
t
k
+
1
,
with m
1
=
A
1
+
0.5
(
Δ
t
)
2
[
α
(
A
4
)
+
β
(
A
1
)
]
,
m
2
=
A
2
+
0.5
(
Δ
t
)
2
[
α
(
A
5
)
+
β
(
A
2
)
], n
1
=
2
A
1
-
0.5
(
Δ
t
)
2
[
α
(
A
4
)
+
β
(
A
1
)
], and n
2
=
2
A
2
-
0.5
(
Δ
t
)
2
[
α
(
A
5
)
+
β
(
A
2
)
].This tridiagonal matrix system can be solved using Thomas Algorithm repeatedly fork
=
0,1
,
…
N.


## 4. Initial State,C
0

The initial vector,C
0, is obtained from initial condition (2a) and boundary values of the derivatives of the initial condition as follows [2, 16]:(i)
(
u
x
)
j
0
=
ω
1
′
(
x
j
) for j
=
0,
(ii)
u
j
0
=
ω
1
(
x
j
) for j
=
0,1
,
2
,
…
,
n,
(iii)
(
u
x
)
j
0
=
ω
1
′
(
x
j
) for j
=
n.This operation yields(
n
+
3
)
×
(
n
+
3
) matrix system:
(17)
A
C
0
=
B
,
A
3
0
-
A
3
0
⋯
0
0
0
0
A
1
A
2
A
1
0
0
0
A
1
A
2
A
1
0
⋮
⋱
⋮
0
A
1
A
2
A
1
0
0
0
A
1
A
2
A
1
0
0
0
0
⋯
0
A
3
0
-
A
3
×
C
-
3
0
C
-
2
0
C
-
1
0
⋮
C
n
-
3
0
C
n
-
2
0
C
n
-
1
0
=
ω
1
′
x
0
ω
1
x
0
⋮
ω
1
x
n
ω
1
′
x
n
.
The solution of the tridiagonal system is obtained by using the Thomas Algorithm [20].


## 5. Von Neumann Stability Analysis

The growth of error in single Fourier mode is considered as(18)
C
j
k
=
δ
k
e
i
η
j
h
,
where i
=
-
1 and η is the mode number. It is known that this method is applicable to linear scheme. Hence, (1) is linearized by assuming all nonlinear terms equal zero [15]. The following equation is obtained after substituting (10) into the linear scheme:
(19)
p
1
C
j
-
3
k
+
1
+
p
2
C
j
-
2
k
+
1
+
p
1
C
j
-
1
k
+
1
=
p
3
C
j
-
3
k
+
p
4
C
j
-
2
k
+
p
3
C
j
-
1
k
-
A
1
C
j
-
3
k
-
1
-
A
2
C
j
-
2
k
-
1
-
A
1
C
j
-
1
k
-
1
,
where
(20)
p
1
=
A
1
+
θ
Δ
t
2
α
A
4
+
β
A
1
,
p
2
=
A
2
+
θ
Δ
t
2
α
A
5
+
β
A
2
,
p
3
=
2
A
1
-
(
1
-
θ
)
Δ
t
2
α
A
4
+
β
A
1
,
p
4
=
2
A
2
-
(
1
-
θ
)
Δ
t
2
α
A
5
+
β
A
2
.
By substituting (18) into (19), the following characteristic equation is generated:
(21)
A
δ
2
-
B
δ
+
C
=
0
,
where A
=
p
1
[
2
cos
⁡
⁡
(
η
h
)
]
+
p
2
,
B
=
p
3
[
2
cos
⁡
⁡
(
η
h
)
]
+
p
4, and C
=
A
1
[
2
cos
⁡
⁡
(
η
h
)
]
+
A
2. Based on Routh-Hurwitz criterion, the transformation, δ
=
(
1
+
v
)
/
(
1
-
v
), is applied to the characteristic equation [15, 21]. Then, the equation becomes
(22)
A
+
B
+
C
v
2
+
2
A
-
C
v
+
A
-
B
+
C
=
0
.
The necessary and sufficient conditions for |
δ
|
≤
1 are A
+
B
+
C
≥
0, A
-
C
≥
0 and A
-
B
+
C
≥
0. Thus, the following terms have been proved:
(23)
2
A
1
cos
⁡
η
h
+
A
2
≥
0
,
2
A
1
β
+
A
4
α
cos
⁡
η
h
+
A
2
β
+
A
5
α
≥
0
.
Hence, this scheme is concluded to be unconditionally stable.


## 6. Numerical Results and Discussions

In this section, two problems involving KG equation with initial conditions and Dirichlet boundary conditions are tested. In order to measure the accuracy of the method, absolute errors and maximum error are calculated using [22]
(24)
Absolute
error
=
u
-
i
-
u
i
,
Maximum
error
=
L
∞
=
max
⁡
i
u
-
i
-
u
i
,
where u
-
i and u
i are analytical solution and approximate solution, respectively. The numerical order of convergence, p, is obtained by using [1]
(25)
p
=
Log
L
∞
n
-
Log
L
∞
2
n
Log
T
/
n
-
Log
T
/
2
n
,
where L
∞
(
n
) and L
∞
(
2
n
) are the L
∞ at number of partitions n and 2
n, respectively.Problem 1.
Consider the following nonlinear Klien-Gordon equation as [1, 14]
(26)
u
t
t
-
u
x
x
+
u
2
=
-
x
cos
⁡
t
+
x
2
cos
⁡
2
t
,
hhhhhhhihh
0
≤
x
≤
1
,
0
≤
t
≤
5
,
subject to the initial conditions
(27)
u
x
,
0
=
x
u
t
x
,
0
=
0
and boundary conditions
(28)
u
0
,
t
=
0
u
1
,
t
=
cos
⁡
t
.
The analytical solution is given by u
-
(
x
,
t
)
=
x
cos
⁡
t. Figure 1 shows the space-time plot for this analytical solution.Figure 1
Space-time graph for analytical solution of Problem1.Initially, this problem is tested byh
=
0.1 and Δ
t
=
0.005. Numerical solutions of this problem at t
=
5 are listed in Table 1. The absolute errors of this problem at the same point are tabulated in Table 2. The absolute errors at t
=
5 with γ
=
0.1, γ
=
0.5, and γ
=
0.9 are also depicted in Figure 2. It can be seen numerically and graphically that HCuBS with γ
=
0.9 is capable of giving better results. This observation is established by comparing the maximum error obtained with the maximum error obtained by Khuri and Sayfy [1], Dehghan and Shokri [14], and Mat Zin et al. [17]. Table 3 tabulates the comparison value of maximum errors at different time levels.Table 1
Numerical solution of Problem1 at t
=
5 with h
=
0.1 and Δ
t
=
0.005.
x
Analytical solution
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
0.2
0.0567
0.0567
0.0567
0.0567
0.4
0.1135
0.1134
0.1134
0.1135
0.6
0.1702
0.1702
0.1702
0.1702
0.8
0.2269
0.2269
0.2269
0.2269
1.0
0.2837
0.2837
0.2837
0.2837Table 2
Absolute error of Problem1 at t = 5 with h = 0.1 and Δ
t = 0.005.
x
Mat Zin et al. [17]
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
0.2
2.473 × 10−5
2.227 × 10−5
1.242 × 10−5
2.571 × 10−6
0.4
3.810 × 10−5
3.432 × 10−5
1.916 × 10−5
3.969 × 10−6
0.6
3.559 × 10−5
3.206 × 10−5
1.791 × 10−5
3.714 × 10−6
0.8
2.152 × 10−5
1.938 × 10−5
1.082 × 10−5
2.243 × 10−6Table 3
Maximum error of Problem1 compared to Khuri and Sayfy [1], Dehghan and Shokri [14], and Mat Zin et al. [17].
t
1
2
3
4
5
For (h = 0.02, Δ
t = 0.0001)
Dehghan and Shokri [14]
1.254 × 10−5
—
1.555 × 10−5
—
3.379 × 10−5
For (h = 0.1, Δ
t = 0.005)
Khuri and Sayfy [1]
2.838 × 10−4
3.299 × 10−4
7.055 × 10−5
3.018 × 10−4
3.249 × 10−4
Mat Zin et al. [17]
4.552 × 10−5
4.358 × 10−5
1.359 × 10−5
5.353 × 10−5
3.868 × 10−5
HCuBS (γ = 0.1)
4.100 × 10−5
3.925 × 10−5
1.224 × 10−5
4.821 × 10−5
3.484 × 10−5
HCuBS (γ = 0.5)
2.288 × 10−5
2.190 × 10−5
6.826 × 10−6
2.691 × 10−5
1.946 × 10−5
HCuBS (γ = 0.9)
4.739 × 10−6
4.536 × 10−6
1.414 × 10−6
5.575 × 10−6
4.033 × 10−6Figure 2
Absolute error of Problem1 with h
=
0.1 and Δ
t
=
0.005.Then, this problem is tested byh
=
0.04 and Δ
t
=
0.001. Tables 4 and 5 illustrate the numerical solutions and absolute errors of this problem at t
=
5, respectively. Graphically, the absolute error of this problem at t
=
5 with γ
=
0.1, γ
=
0.5, and γ
=
0.9 is plotted in Figure 3. The comparison of maximum error obtained from present method with Khuri and Sayfy [1], Dehghan and Shokri [14], and Mat Zin et al. [17] methods is shown in Table 6. Clearly from the tables and figures, HCuBS with γ
=
0.9 approximates this problem very well compared to Khuri and Sayfy [1], Dehghan and Shokri [14], and Mat Zin et al. [17].Table 4
Numerical solution of Problem1 at t = 5 with h = 0.04 and Δ
t = 0.001.
x
Analytical solution
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
0.2
0.0567
0.0567
0.0567
0.0567
0.4
0.1135
0.1135
0.1135
0.1135
0.6
0.1702
0.1702
0.1702
0.1702
0.8
0.2269
0.2269
0.2269
0.2269
1.0
0.2837
0.2837
0.2837
0.2837Table 5
Absolute error of Problem1 at t = 5 with h = 0.04 and Δ
t = 0.001.
x
Mat Zin et al. [17]
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
0.2
4.404 × 10−6
3.964 × 10−6
2.205 × 10−6
4.450 × 10−7
0.4
6.172 × 10−6
5.556 × 10−6
3.090 × 10−6
6.237 × 10−7
0.6
5.745 × 10−6
5.171 × 10−6
2.876 × 10−6
5.805 × 10−7
0.8
3.524 × 10−6
3.172 × 10−6
1.764 × 10−6
5.560 × 10−7Table 6
Maximum error of Problem1 compared to Khuri and Sayfy [1], Dehghan and Shokri [14], and Mat Zin et al. [17].
t
1
2
3
4
5
For (h = 0.02, Δ
t = 0.0001)
Dehghan and Shokri [14]
1.254 × 10−5
—
1.555 × 10−5
—
3.379 × 10−5
For (h = 0.04, Δ
t = 0.001)
Khuri and Sayfy [1]
4.599 × 10−5
8.053 × 10−5
1.276 × 10−5
7.292 × 10−5
5.128 × 10−5
Mat Zin et al. [17]
7.316 × 10−6
6.986 × 10−6
2.089 × 10−6
8.596 × 10−6
6.245 × 10−6
HCuBS (γ = 0.1)
6.585 × 10−6
6.288 × 10−6
1.880 × 10−6
7.738 × 10−6
5.622 × 10−6
HCuBS (γ = 0.5)
3.662 × 10−6
3.497 × 10−6
1.046 × 10−6
4.304 × 10−6
3.127 × 10−6
HCuBS (γ = 0.9)
7.390 × 10−7
7.057 × 10−7
2.110 × 10−7
8.645 × 10−7
6.311 × 10−7Figure 3
Absolute error of Problem1 with h
=
0.04 and Δ
t
=
0.001.The order of convergence of the present problem is tabulated in Table7. An examination of this table indicates that the method has a nearly second order of convergence.Table 7
The maximum error and order of convergence of Problem1 at t = 5.
Δ
t = 0.005
Δ
t = 0.001
n
L
∞
p
n
L
∞
p
5
1.538 × 10−5
—
25
6.311 × 10−7
—
10
4.033 × 10−6
1.932
50
1.633 × 10−7
1.886
20
1.116 × 10−7
1.853
100
4.603 × 10−8
1.827Problem 2.
The nonlinear Klien-Gordon equation is considered as [14]
(29)
u
t
t
-
5
2
u
x
x
+
u
+
3
2
u
3
=
0
,
hhii
0
≤
x
≤
1
,
0
≤
t
≤
4
,
with the initial and boundary conditions
(30)
u
x
,
0
=
B
tan
K
x
,
u
t
x
,
0
=
c
B
K
sec
2
K
x
,
u
0
,
t
=
B
tan
K
c
t
,
u
1
,
t
=
B
tan
K
1
+
c
t
,
where B
=
2
/
3, K
=
-
1
/
(
-
5
+
c
2
), and c
=
0.5. The analytical solution is known to be u
-
(
x
,
t
)
=
B
tan
[
K
(
x
+
c
t
)
]. Space-time plot for this analytical solution is shown in Figure 4.Figure 4
Space-time graph for analytical solution of Problem2.This problem is solved numerically usingh
=
0.01 and Δ
t
=
0.001. Tables 8 and 9 list approximate solutions and absolute errors at t
=
4, respectively. The graphical plot of absolute errors at t
=
4 with three different values of γ is shown in Figure 5. The maximum error of this problem is compared with Dehghan and Shokri [14] work which is listed in Table 10. The tables indicate that HCuBS with γ
=
0.1 gives better results to this problem.Table 8
Numerical solution of Problem2 at t = 4 with h = 0.01 and Δ
t = 0.001.
x
Analytical solution
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
0.1
1.2439
1.2440
1.2440
1.2440
0.2
1.3818
1.3819
1.3819
1.3819
0.3
1.5435
1.5438
1.5438
1.5438
0.4
1.7369
1.7373
1.7373
1.7373
0.5
1.9735
1.9739
1.9739
1.9739
0.6
2.2710
2.2715
2.2715
2.2715
0.7
2.6583
2.6588
2.6588
2.6588
0.8
3.1862
3.1867
3.1868
3.1868
0.9
3.9523
3.9527
3.9528
3.9528
1.0
5.1718
5.1718
5.1718
5.1718Table 9
Absolute error of Problem2 at t = 4 with h = 0.01 and Δ
t = 0.001.
x
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
0.1
8.706 × 10−5
8.825 × 10−5
8.944 × 10−5
0.2
1.699 × 10−4
1.721 × 10−4
1.744 × 10−4
0.3
2.501 × 10−4
2.533 × 10−4
2.564 × 10−4
0.4
3.289 × 10−4
3.328 × 10−4
3.368 × 10−4
0.5
4.065 × 10−4
4.112 × 10−4
4.158 × 10−4
0.6
4.810 × 10−4
4.861 × 10−4
4.913 × 10−4
0.7
5.439 × 10−4
5.493 × 10−4
5.547 × 10−4
0.8
5.695 × 10−4
5.746 × 10−4
5.798 × 10−4
0.9
4.783 × 10−4
4.822 × 10−4
4.861 × 10−4Table 10
Maximum error of Problem2 compared to Dehghan and Shokri [14] with h = 0.01 and Δ
t = 0.001.
t
1
2
3
4
Dehghan and Shokri [14]
5.996 × 10−6
2.197 × 10−5
9.089 × 10−5
8.295 × 10−4
HCuBS (γ = 0.1)
4.878 × 10−6
1.871 × 10−5
7.613 × 10−5
5.701 × 10−4
HCuBS (γ = 0.5)
5.189 × 10−6
1.947 × 10−5
7.775 × 10−5
5.753 × 10−4
HCuBS (γ = 0.9)
5.500 × 10−6
2.024 × 10−5
7.938 × 10−5
5.805 × 10−4Figure 5
Absolute error of Problem2 with h
=
0.01 and Δ
t
=
0.001.Problem 3.
Let the nonlinear Klien-Gordon equation be considered as [1]
(31)
u
t
t
-
u
x
x
+
sin
u
=
0
,
0
≤
x
≤
ln
⁡
2
,
0
≤
t
≤
1
.
This equation is also known as Sine-Gordon equation. The initial and boundary conditions are given by
(32)
u
x
,
0
=
0
,
u
t
x
,
0
=
4
sech
⁡
x
,
u
0
,
t
=
4
tan
-
1
t
,
u
ln
⁡
2
,
t
=
4
tan
-
1
4
t
5
.
The analytical solution of this problem is given as u
-
(
x
,
t
)
=
4
tan
-
1
(
t
sech
⁡
x
). Figure 6 presents the space-time graph of this analytical solution.Figure 6
Space-time graph for analytical solution of Problem3.HCuBS collocation method is used to solve this problem numerically with parametersh
=
(
ln
⁡
2
)
/
5 and Δ
t
=
0.01. Table 11 tabulates the approximate solutions of this problem at t
=
1 and Table 12 tabulates the absolute errors of this problem also at t
=
1. The graphical comparison of the absolute errors with different value of γ at t
=
1 is depicted in Figure 7. The maximum errors of this problem are compared with Khuri and Sayfy [1] and Mat Zin et al. [17] work (Table 13). The table shows that Mat Zin et al. produce better results which are the errors just slightly better than HCuBS with γ
=
0.1.Table 11
Numerical solution of Problem3 at t = 1 with h = (
ln
⁡
2
)
/
5 and Δ
t = 0.01.
x
Analytical solution
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
(
ln
⁡
2
)
/
5
3.1224
3.1221
3.1220
3.1219
2
(
ln
⁡
2
)
/
5
3.0657
3.0653
3.0650
3.0650
3
(
ln
⁡
2
)
/
5
2.9736
2.9732
2.9731
2.9729
4
(
ln
⁡
2
)
/
5
2.8497
2.8495
2.8494
2.8493
ln
⁡
2
2.6690
2.6690
2.6690
2.6990Table 12
Absolute error of Problem3 at t = 1 with h = (
ln
⁡
2
)
/
5 and Δ
t = 0.01.
x
Mat Zin et al. [17]
HCuBS (γ = 0.1)
HCuBS (γ = 0.5)
HCuBS (γ = 0.9)
(
ln
⁡
2
)
/
5
2.686 × 10−4
2.950 × 10−4
4.006 × 10−4
5.064 × 10−4
2
(
ln
⁡
2
)
/
5
3.534 × 10−4
3.929 × 10−4
5.511 × 10−4
7.097 × 10−4
3
(
ln
⁡
2
)
/
5
3.072 × 10−4
3.453 × 10−4
4.980 × 10−4
6.509 × 10−4
4
(
ln
⁡
2
)
/
5
1.942 × 10−4
2.179 × 10−4
3.125 × 10−4
4.072 × 10−4Table 13
Maximum error of Problem3 compared to Khuri and Sayfy [1] and Mat Zin et al. [17] with h = (
ln
⁡
2
)
/
5 and Δ
t = 0.01.
t
0.01
0.02
0.10
0.50
1.00
Khuri and Sayfy [1]
1.3 × 10−6
6.6 × 10−6
3.8 × 10−4
4.8 × 10−3
2.2 × 10−3
Mat Zin et al. [17]
5.566 × 10−7
1.618 × 10−6
9.851 × 10−5
1.323 × 10−3
3.534 × 10−4
HCuBS (γ = 0.1)
5.565 × 10−7
1.621 × 10−6
9.876 × 10−5
1.323 × 10−3
3.929 × 10−4
HCuBS (γ = 0.5)
5.560 × 10−7
1.632 × 10−6
9.978 × 10−5
1.422 × 10−3
5.511 × 10−4
HCuBS (γ = 0.9)
5.554 × 10−7
1.644 × 10−6
1.008 × 10−4
1.464 × 10−3
7.097 × 10−4Figure 7
Absolute error of Problem3 with h
=
(
ln
⁡
2
)
/
5 and Δ
t
=
0.01.


## 7. Conclusion

In this work, the generalized Klien-Gordon equation was successfully solved using HCuBS collocation method. Specifically, the central difference approach has been applied to discretize the time derivative and hybrid cubic B-spline function had been used to interpolate the solution in space dimension. Three problems have been tested using the proposed method and the solutions obtained were in good agreement with the analytical solution. Through this method, an accurate solution at an intermediate point can be easily calculated.



---

*Source: 108560-2014-12-30.xml*