Next Article in Journal
Air–Water Two-Phase Flow Dynamics Analysis in Complex U-Bend Systems through Numerical Modeling
Next Article in Special Issue
Fractional-Order Degn–Harrison Reaction–Diffusion Model: Finite-Time Dynamics of Stability and Synchronization
Previous Article in Journal
Efficient Numerical Solutions for Fuzzy Time Fractional Diffusion Equations Using Two Explicit Compact Finite Difference Methods
Previous Article in Special Issue
Extension of Cubic B-Spline for Solving the Time-Fractional Allen–Cahn Equation in the Context of Mathematical Physics
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of an Extended Cubic B-Spline to Find the Numerical Solution of the Generalized Nonlinear Time-Fractional Klein–Gordon Equation in Mathematical Physics

1
School of Physical Sciences and Mathematics, Faculty of Exact and Natural Sciences, Pontifical Catholic University of Ecuador, Av. 12 de Octubre 1076 y Roca, Apartado, Quito 17-01-2184, Ecuador
2
Department of Mathematics, College of Science, Jazan University, P.O. Box. 114, Jazan 45142, Saudi Arabia
3
Department of Mathematics, University of Sargodha, Sargodha 40100, Pakistan
4
Department of Mathematics, Government College University, Faisalabad 38000, Pakistan
*
Authors to whom correspondence should be addressed.
Computation 2024, 12(4), 80; https://doi.org/10.3390/computation12040080
Submission received: 11 February 2024 / Revised: 30 March 2024 / Accepted: 2 April 2024 / Published: 11 April 2024

Abstract

:
A B-spline function is a series of flexible elements that are managed by a set of control points to produce smooth curves. By using a variety of points, these functions make it possible to build and maintain complicated shapes. Any spline function of a certain degree can be expressed as a linear combination of the B-spline basis of that degree. The flexibility, symmetry and high-order accuracy of the B-spline functions make it possible to tackle the best solutions. In this study, extended cubic B-spline (ECBS) functions are utilized for the numerical solutions of the generalized nonlinear time-fractional Klein–Gordon Equation (TFKGE). Initially, the Caputo time-fractional derivative (CTFD) is approximated using standard finite difference techniques, and the space derivatives are discretized by utilizing ECBS functions. The stability and convergence analysis are discussed for the given numerical scheme. The presented technique is tested on a variety of problems, and the approximate results are compared with the existing computational schemes.

1. Introduction

The Klein–Gordon equation was discovered by several authors, including Swedish physicists Oskar Klein (1894–1977) and Walter Gordon (1893–1939) in 1926. The Klein–Gordon nonlinear equation describes various mathematical problems in engineering and science. The fractional Klein–Gordon Equation (FKGE) has important applications in relativistic physics, quantum mechanics, plasma physics, quantum field theory, nonlinear optics, solid state physics, condensed matter physics, dispersive wave phenomena and solitons. Many techniques have been implemented for solving Klein/sine–Gordon equations effectively, such as the homotopy analysis, the Adomian decomposition and the variational iteration methods [1,2,3]. In this paper, a Crank–Nicolson scheme is formulated to obtain the numerical solutions of the TFKGE based on ECBS. The Caputo formula is employed for temporal discretization, while the spatial derivative is discretized using ECBS. The generalized nonlinear TFKGE is given as follows:
α z ( p , t ) t α + δ 1 z ( p , t ) + δ 2 h ( z ( p , t ) ) = 2 z ( p , t ) p 2 + q ( p , t ) , 1 < α 2 , a p b , t 0 ,
with the following initial conditions (ICs):
z ( p , 0 ) = ϕ 0 ( p ) , z ( p , 0 ) t = ϕ 1 ( p ) , a p b
and the following boundary conditions (BCs):
z ( a , t ) = ψ 0 ( t ) , z ( b , t ) = ψ 1 ( t ) , t 0 ,
where δ 1 , δ 2 are positive constants; h ( z ( p , t ) ) represents the nonlinear term; α z ( p , t ) t α denotes the α th order CTFD; and q ( p , t ) is the force term.
Several analytical and numerical schemes for the TFKGE are available in the literature. In order to calculate the solutions of FKGEs, Golmankhaneh et al. [4] employed the homotopy perturbation approach. By employing the variational iteration technique, Batiha et al. [5] proposed an approximate solution to the sine-Gordon Equation (SGE). Kurulay [6] presented the homotopy analysis technique to examine the nonlinear FKGEs. The Haar wavelets approach was utilized by Hariharan [7] to solve the FKGEs. Hepson et al. [8] proposed an exponential B-spline approach to calculate the solution of the KGE. Dehghan et al. [9] found mathematical solutions for the fractional SGE and KGE that are nonlinear by using an implicit radial basis functions (RBFs) meshless technique. For the formulation and solution of the TFKGE, Zhang [10] used the variational iteration approach. Chen et al. [11] established an effective numerical spectral methodology for the nonlinear FKGEs. Nagy [12] presented a sinc-Chebyshev collocation technique to calculate the solution of nonlinear FKGEs.
El-Sayed [13] employed the decomposition procedure to examine the KGE. The convergence of the technique described in [13] was examined by Kaya and El-Sayed [14]. Cui [15] used a compact fourth-order technique to determine the numerical solutions of the one-dimensional SGE. The homotopy analysis technique has been utilized by Jafari et al. [16] in order to solve the nonlinear KGE. Vong and Wang [17] provided a compact difference method for two-dimensional FKGEs involving Neumann boundaries. For the computational estimation of the Cahn–Hilliard equation and the KGE, Jafari et al. [18] employed a fractional sub-equation approach. Mohebbi et al. [19] used a high-order difference technique to study the linear TFKGEs. For nonlinear FKGEs, Vong and Wang [20] established a higher-order compact approach. Recently, Yaseen et al. [21] used the cubic trigonometric B-spline (CTBS) functions and approximated the solution of the nonlinear TFKGE. Kamran et al. [22] approximated the solution of time fractional Phi-four equation which is a special case of the TFKGE using CBS.
An iterative scheme was used by Fang et al. [23] to obtain the solution of the sine-Gordon and KGEs. Sweilam et al. [24] used the Legendre pseudo spectral technique to find the numerical solution of FKGEs. Abuteen et al. [25] proposed a numerical approach to obtain the solution of nonlinear TFKGEs by employing the reduced differential transform Scheme. To find the numerical solution of KGEs, the Taylor matrix technique was used by B u ¨ lb u ¨ l and Sezer [26]. Hesameddini and Fotros [27] presented the Adomian decomposition scheme to acquire the solution of the time-fractional coupled KG Schr o ¨ dinger equation. Abbasbandy [28] presented the numerical solutions of the nonlinear KGE and nonlinear PDE with power law nonlinearities using the variation iteration technique. Singh et al. [29] applied the homotopy perturbation technique to obtain the solution of linear and nonlinear KGEs.
The idea of splines was initially presented by Isaac Jacob Schoenberg in 1946. Carl de Boor became inspired, collaborated with Schoenberg and developed a spline recursive formula. The B-spline is widely used in engineering and mathematics. Polynomial splines are capable of approximating any continuous function over a finite interval with a high accuracy. The spline approximations were initially described by Schoenberg in [30]. B-spline interpolation is one of the numerical methods that numerous authors have developed in recent years to solve fractional partial differential Equations (FPDEs).
In order to find numerical estimations of time FPDEs, CBS collocation methods were employed by Shafiq et al. [31,32]. Hepson [33] generated the solution of the Kuramoto-Sivashinsky equation via CTBS. Yadav et al. [34] investigated the numerical schemes with the Atangana–Baleanu derivative in two different ways and used them to obtain the solution of the advection–diffusion equation. The CBS finite element scheme was used by Majeed et al. [35] to find the numerical solutions of time fractional fisher’s and Burgers’ equations. Mittal and Jain [36] proposed a collocation scheme based on modified CBS to obtain the solution of the nonlinear Burgers’ equation. Tamsir et al. [37] utilized the exponential modified CBS differential quadrature scheme to obtain the solutions of the nonlinear Burgers’ equation.
To solve FPDEs, there are several numerical approaches. One of the simplest numerical methods for estimating FPDE’s solutions at discrete points is the finite difference approach. Therefore, it has been the preference for many researchers. The fact that the problem’s solution is only determined at the selected points is a notable shortcoming in this methodology. The spline estimate approach, which yields an approximate solution in the form of an analytic curve up to a given smoothness, is used to address this limitation. As a result, approximations can be attained more accurately at any point in the domain than standard finite difference approaches. The main goal of this paper is to provide a numerical technique for the generalized nonlinear TFKGE based on ECBS. The suggested method discretizes the time-fractional derivative and the spatial derivatives using Caputo’s formula and ECBS functions, respectively. The stability of the presented scheme is established, as it is unconditionally stable. To ensure the accuracy of the scheme, a convergence analysis is discussed. To acquire the theoretical results, numerical tests are conducted and the results are compared with those that have already been provided in the literature. This technique provides more accurate results than previous studies [19,21,38,39,40]. Furthermore, the computational errors of the proposed problem are small when they compared to other techniques. The comparison shows that our method is precise and efficient. To the best of the authors’ knowledge, the proposed method is novel and has not been previously described in the literature.
The rest of this paper is organized as follows: basic concepts are given in Section 2. In Section 3, the numerical technique based on ECBS functions is expounded. In Section 4 and Section 5, the stability and convergence of the scheme are examined, respectively. In Section 6, our numerical findings are contrasted with those that were previously provided in [19,21,38,39,40]. The paper concludes with some intriguing remarks, which are expressed in Section 7.

2. Basic Definitions

Definition 1.
The Caputo time-fractional derivative of order α is defined as follows [41]:
α z ( p , t ) t α = 1 Γ ( s α ) 0 t s z ( p , r ) t s ( p r ) s α 1 d r , s 1 < α < s , s z ( p , t ) t s , s = α ,
where s is the smallest integer exceeding α.
Definition 2.
Let the interval [ 0 , T ] be partitioned into M equal sub-intervals of length Δ t = T M determined by the knots t m = m Δ t , m = 0 , 1 , , M . The CTFD α z ( p , t ) t α is discretized as follows [21]:
α t α z ( p , t m + 1 ) = β 0 u = 0 m λ u z ( p , t m + 1 u ) 2 z ( p , t m u ) + z ( p , t m 1 u ) + R τ m + 1 = β 0 u = 0 m λ u ( z m + 1 u 2 z m u + z m 1 u ) + R τ m + 1 ,
where z m = z ( p , t m ) , β 0 = 1 ( Δ t ) α Γ [ 3 α ] , λ u = ( u + 1 ) 2 α u 2 α and R τ m + 1 is the truncation error. Khader and Adel [42] showed that R τ m + 1 K z τ 3 α , where K z is a constant.
Lemma 1.
The coefficients λ u = ( u + 1 ) 2 α u 2 α in Equation (3) fulfill the following properties:
  • λ u > 0 and λ 0 = 1 , u = 1 : 1 : m ,
  • λ 0 > λ 1 > λ 2 > > λ m and λ m 0 as m ,
  • u = 0 m 1 ( λ u λ u + 1 ) + λ m = 1 .

3. Description of the Scheme

Suppose that [ a , b ] is partitioned into N uniform sub-intervals of size h = b a N with knots p j = p 0 + j h , j = 0 , 1 , 2 , , N . The ECBS functions are defined as follows [43]:
ϕ j ( p , ν ) = 1 24 h 4 4 h ( 1 ν ) ( p p j ) 3 + 3 ν ( p p j ) 4 , p [ p j , p j + 1 ) , ( 4 ν ) h 4 + 12 h 3 ( p p j + 1 ) + 6 h 2 ( 2 + ν ) ( p p j + 1 ) 2 12 h ( p p j + 1 ) 3 3 ν ( p p j + 1 ) 4 , p [ p j + 1 , p j + 2 ) , ( 4 ν ) h 4 + 12 h 3 ( p j + 3 p ) + 6 h 2 ( 2 + ν ) ( p j + 3 p ) 2 12 h ( p j + 3 p ) 3 3 ν ( p j + 3 p ) 4 , p [ p j + 2 , p j + 3 ) , 4 h ( 1 ν ) ( p j + 4 p ) 3 + 3 ν ( p j + 4 p ) 4 , p [ p j + 3 , p j + 4 ) , 0 , otherwise ,
where j = 1 : 1 : N + 1 , ν [ 8 , 1 ] , is serving as a free parameter and p is a variable taking real values. For ν [ 8 , 1 ] , similar characteristics, like convex hull, geometrical invariability and symmetry, are shared by the CBS and ECBS functions. The symmetry and convex hull features guarantee the numerical stability of these functions. For ν = 0 , the ECBS is reduced to the standard CBS. Let z ( p , t ) and Z ( p , t ) be the exact and numerical solutions of Equation (1), respectively. In terms of the above expression, the numerical solution Z ( p , t ) can be approximated as
Z ( p , t ) = j = 1 N + 1 ρ j m ( t ) ϕ j ( p , ν ) ,
where ρ j m ( t ) are the control points. Due to the local support property of the ECBS, only ϕ j 1 ( p ) , ϕ j ( p ) and ϕ j + 1 ( p ) survive, so that the approximation Z j m at the nodes ( p j , t m ) is given by
Z ( p j , t m ) = Z j m = u = j 1 j + 1 ρ u m ( t ) ϕ u ( p ) .
The initial and BCs are used to determine the time-dependent unknowns ρ u m ( t ) . The values of Z ( p , t ) , Z p ( p , t ) and Z p p ( p , t ) at the nodes are computed as follows:
Z ( p j , t m ) = Z j m = k 1 ρ j 1 m + k 2 ρ j m + k 1 ρ j + 1 m , Z p ( p j , t m ) = ( Z j m ) p = k 3 ρ j 1 m + k 3 ρ j + 1 m , Z p p ( p j , t m ) = ( Z j m ) p p = k 4 ρ j 1 m + k 5 ρ j m + k 4 ρ j + 1 m ,
where k 1 = 4 ν 24 , k 2 = 8 + ν 12 , k 3 = 1 2 h , k 4 = 2 + ν 2 h 2 and k 5 = 2 + ν h 2 .

Implementation of the Scheme

Using Equation (3) together with the Crank–Nicolson scheme, Equation (1) can be expressed in discretized form as
β 0 u = 0 m λ u ( z m + 1 u 2 z m u + z m 1 u ) + δ 1 z m + 1 + z m 2 + δ 2 h ( z m ) = ( z m + 1 ) p p + ( z m ) p p 2 + q m + 1 ,
which simplifies to
δ 1 2 z m + 1 1 2 ( z m + 1 ) p p = 1 2 ( z m ) p p δ 1 2 z m β 0 u = 0 m λ u ( z m + 1 u 2 z m u + z m 1 u ) δ 2 h ( z m ) + q m + 1 ,
where m = 0 , 1 , 2 , , M .
It is noticed that the term z 1 arises if m = 0 or u = m . To handle this term, IC is used to obtain
z t 0 = z 1 z 1 2 Δ t ,
which reduces to
z 1 = z 1 2 Δ t z t 0 or z 1 = z 1 2 Δ t ϕ 1 ( p ) .
The summation term on the right-hand side of Equation (9) can be written as
u = 0 m λ u ( z m + 1 u 2 z m u + z m 1 u ) = z m + 1 z m u = 0 m 1 ( λ u λ u + 1 ) ( z m u z m 1 u ) + λ m z 1 2 λ m Δ t ϕ 1 ( p ) λ m z 0 ,
Thus, Equation (9) becomes
δ 1 2 z m + 1 1 2 ( z m + 1 ) p p = 1 2 ( z m ) p p δ 1 2 z m β 0 ( z m + 1 z m u = 0 m 1 ( λ u λ u + 1 ) ( z m u z m 1 u ) + λ m z 1 2 λ m Δ t ϕ 1 ( p ) λ m z 0 ) δ 2 h ( z m ) + q m + 1 ,
β 0 + δ 1 2 z m + 1 1 2 ( z m + 1 ) p p = β 0 δ 1 2 z m + 1 2 ( z m ) p p + β 0 u = 0 m 1 ( λ u λ u + 1 ) ( z m u z m 1 u ) β 0 λ m z 1 + 2 β 0 λ m Δ t ϕ 1 ( p ) + β 0 λ m z 0 δ 2 h ( z m ) + q m + 1 .
For a full discretized form, we put the approximation Z j m and its necessary derivatives (7) into (9) to obtain
δ 1 2 ( k 1 ρ j 1 m + 1 + k 2 ρ j m + 1 + k 1 ρ j + 1 m + 1 ) 1 2 ( k 4 ρ j 1 m + 1 + k 5 ρ j m + 1 + k 4 ρ j + 1 m + 1 ) = 1 2 ( k 4 ρ j 1 m + k 5 ρ j m + k 4 ρ j + 1 m ) δ 1 2 ( k 1 ρ j 1 m + k 2 ρ j m + k 1 ρ j + 1 m ) β 0 u = 0 m λ u [ ( k 1 ρ j 1 m + 1 u + k 2 ρ j m + 1 u + k 1 ρ j + 1 m + 1 u ) 2 ( k 1 ρ j 1 m u + k 2 ρ j m u + k 1 ρ j + 1 m u ) + ( k 1 ρ j 1 m 1 u + k 2 ρ j m 1 u + k 1 ρ j + 1 m 1 u ) ] δ 2 h ( k 1 ρ j 1 m + k 2 ρ j m + k 1 ρ j + 1 m ) ,
After rearranging the above equation, it yields
δ 1 2 k 1 1 2 k 4 ρ j 1 m + 1 + δ 1 2 k 2 1 2 k 5 ρ j m + 1 + δ 1 2 k 1 1 2 k 4 ρ j + 1 m + 1 = δ 1 2 k 1 + 1 2 k 4 ρ j 1 m + δ 1 2 k 2 + 1 2 k 5 ρ j m + δ 1 2 k 1 + 1 2 k 4 ρ j + 1 m β 0 u = 0 m λ u [ k 1 ( ρ j 1 m + 1 u 2 ρ j 1 m u + ρ j 1 m 1 u ) + k 2 ( ρ j m + 1 u 2 ρ j m u + ρ j m 1 u ) + k 1 ( ρ j + 1 m + 1 u 2 ρ j + 1 m u + ρ j + 1 m 1 u ) ] δ 2 h ( k 1 ρ j 1 m + k 2 ρ j m + k 1 ρ j + 1 m ) ,
This is a linear system of N + 1 equations in N + 3 unknowns. We require two additional equations, which are deducible from the provided boundary conditions to arrive at a unique solution. Thus, we have a diagonal system of dimension ( N + 3 ) × ( N + 3 ) , which is distinctively solvable by any appropriate numerical approach.

4. The Stability Analysis

This section demonstrates the stability of the presented scheme (12). By utilizing the von Neumann approach, we first linearize the term h ( z ) by setting h ( z ) = k 0 z , where k 0 is a constant [44]. It is adequate to give the stability analysis of the suggested approach (12) for the force-free situation ( q = 0 ) as in [45]. The suggested scheme’s linearized form is then provided by
δ 1 2 k 1 1 2 k 4 ρ j 1 m + 1 + δ 1 2 k 2 1 2 k 5 ρ j m + 1 + δ 1 2 k 1 1 2 k 4 ρ j + 1 m + 1 = δ 1 2 k 1 + 1 2 k 4 ρ j 1 m + δ 1 2 k 2 + 1 2 k 5 ρ j m + δ 1 2 k 1 + 1 2 k 4 ρ j + 1 m β 0 u = 0 m λ u ( k 1 ( ρ j 1 m + 1 u 2 ρ j 1 m u + ρ j 1 m 1 u ) + k 2 ( ρ j m + 1 u 2 ρ j m u + ρ j m 1 u ) + k 1 ( ρ j + 1 m + 1 u 2 ρ j + 1 m u + ρ j + 1 m 1 u ) ) δ 2 k 0 ( k 1 ρ j 1 m + k 2 ρ j m + k 1 ρ j + 1 m ) ,
which reduces to
1 2 ( δ 1 k 1 k 4 ) ρ j 1 m + 1 + 1 2 ( δ 1 k 2 k 5 ) ρ j m + 1 + 1 2 ( δ 1 k 1 k 4 ) ρ j + 1 m + 1 = 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) ρ j 1 m + 1 2 ( δ 1 k 2 + k 5 2 δ 2 k 0 k 2 ) ρ j m + 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) ρ j + 1 m β 0 u = 0 m λ u ( k 1 ( ρ j 1 m + 1 u 2 ρ j 1 m u + ρ j 1 m 1 u ) + k 2 ( ρ j m + 1 u 2 ρ j m u + ρ j m 1 u ) + k 1 ( ρ j + 1 m + 1 u 2 ρ j + 1 m u + ρ j + 1 m 1 u ) ) .
In this study, the Fourier growth factor is assumed as ξ j m , with ξ ˜ j m serving as an approximation. Define Υ j m = ξ j m ξ ˜ j m , which, on substitution, leads to
1 2 ( δ 1 k 1 k 4 ) Υ j 1 m + 1 + 1 2 ( δ 1 k 2 k 5 ) Υ j m + 1 + 1 2 ( δ 1 k 1 k 4 ) Υ j + 1 m + 1 = 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) Υ j 1 m + 1 2 ( δ 1 k 2 + k 5 2 δ 2 k 0 k 2 ) Υ j m + ( 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) ) Υ j + 1 m β 0 u = 0 m λ u ( k 1 ( Υ j 1 m + 1 u 2 Υ j 1 m u + Υ j 1 m 1 u ) + k 2 ( Υ j m + 1 u 2 Υ j m u + Υ j m 1 u ) + k 1 ( Υ j + 1 m + 1 u 2 Υ j + 1 m u + Υ j + 1 m 1 u ) ) .
The ICs satisfied by the above error equation are as follows:
Υ j 0 = ϕ 1 ( p j ) , ( Υ t ) j 0 = ϕ 2 ( p j ) , j = 1 : 1 : N
and the boundary conditions are
Υ 0 m = ψ 1 ( t m ) , Υ N m = ψ 2 ( t m ) , m = 0 : 1 : M .
Define the grid function as
Υ m = Υ j m , p j h 2 < p p j + h 2 , j = 1 : 1 : N 1 , 0 , a p a + h 2 o r b h 2 p b .
The Fourier expansion for Υ m ( p ) can be expressed as
Υ m ( p ) = n = ζ m ( n ) e i 2 π n p ( b a ) , m = 0 ( 1 ) M ,
where
ζ m ( n ) = 1 b a a b Υ n ( p ) e i 2 π n p ( b a ) d p .
Let
Υ m = [ Υ 1 m , Υ 2 m , , Υ N 1 m ] T
and establish the norm
Υ m 2 = j = 1 N 1 h | Υ j m | 2 1 2 = a b | Υ m ( p ) | 2 d p 1 2 .
By Parseval’s equality, we have
a b | Υ m ( p ) | 2 d p = n = | ζ m ( n ) | 2 ,
which implies that
Υ m 2 2 = n = | ζ m ( n ) | 2 .
Assume that the solutions to Equations (15)–(17) are of the form
Υ j m = ϱ m e i σ j r , where σ [ π , π ] and i = 1 .
Equation (15) can be solved by substituting the above expression as
1 2 ( δ 1 k 1 k 4 ) ( e i σ ( j 1 ) r + e i σ ( j + 1 ) r ) ϱ m + 1 + 1 2 ( δ 1 k 2 k 5 ) ϱ m + 1 e i σ j r = 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) ( e i σ ( j 1 ) r + e i σ ( j + 1 ) r ) ϱ m + 1 2 ( δ 1 k 2 + k 5 2 δ 2 k 0 k 2 ) ϱ m e i σ j r β 0 u = 0 m λ u ( k 1 ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) e i σ ( j 1 ) r + k 2 ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) e i σ j r + k 1 ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) e i σ ( j + 1 ) r ) .
Now, dividing the above equation by e i σ j r , we obtain
( 1 2 ( δ 1 k 1 k 4 ) ) ( e i σ r + e i σ r ) + ( 1 2 ( δ 1 k 2 k 5 ) ) ϱ m + 1 = ( ( 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) ) ( e i σ r + e i σ r ) + ( 1 2 ( δ 1 k 2 + k 5 2 δ 2 k 0 k 2 ) ) ) ϱ m β 0 u = 0 m λ u ( k 1 ( e i σ r + e i σ r ) + k 2 ) ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) .
Using the relation e i σ r + e i σ r = 2 cos ( σ r ) , we obtain
( 1 2 ( δ 1 k 1 k 4 ) ) ( 2 cos σ r ) + ( 1 2 ( δ 1 k 2 k 5 ) ) ϱ m + 1 = ( 1 2 ( δ 1 k 1 + k 4 2 δ 2 k 0 k 1 ) ( 2 cos σ r ) + 1 2 ( δ 1 k 2 + k 5 2 δ 2 k 0 k 2 ) ) ϱ m β 0 u = 0 m λ u k 1 ( 2 cos σ r ) + k 2 ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) .
Dividing the above equation by δ 1 2 ( 2 k 1 cos σ r + k 2 ) and simplifying, we acquire
1 2 k 4 cos σ r + k 5 δ 1 4 ( 2 k 1 cos σ r + k 2 ) ϱ m + 1 = ( δ 1 2 δ 2 k 0 ) δ 1 2 + 2 k 4 cos σ r + k 5 δ 1 4 ( 2 k 1 cos σ r + k 2 ) ϱ m 2 δ 1 β 0 u = 0 m λ u ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) .
We can assume that σ = 0 without losing generality. Then, the previous expression becomes
1 2 k 4 + k 5 δ 1 4 ( 2 k 1 + k 2 ) ϱ m + 1 = ( δ 1 2 δ 2 k 0 ) δ 1 2 + 2 k 4 + k 5 δ 1 4 ( 2 k 1 + k 2 ) ϱ m 2 δ 1 β 0 u = 0 m λ u ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) ,
which can be written as
ς m + 1 = d ˜ ω ϱ m 2 δ 1 ω u = 0 m λ u ( ϱ m + 1 u 2 ϱ m u + ϱ m 1 u ) ,
where
d ˜ = ( δ 1 2 δ 2 k 0 ) δ 1 2 + 2 k 4 + k 5 δ 1 4 ( 2 k 1 + k 2 ) and ω = 1 2 k 4 + k 5 δ 1 4 ( 2 k 1 + k 2 ) .
Furthermore,
2 k 4 + k 5 δ 1 4 ( 2 k 1 + k 2 ) = 4 ( h + 2 ν ) δ 1 h 2 0 ; thus , ω 1 .
Theorem 1.
If ϱ m ( m = 0 , 1 , , M ) are the solutions of Equation (20), then | ϱ m | D ˜ | ϱ 0 | , where D ˜ = | d ˜ | 2 .
Proof. 
To complete the proof, we apply mathematical induction. For m = 0 , Equation (20) becomes
| ϱ 1 | | d ˜ | ω | ϱ 0 | | d ˜ | | ϱ 0 | | d ˜ | 2 | ϱ 0 | = D ˜ | ϱ 0 | ,
with ω 1 . Now, consider | ϱ j | d ˜ | ϱ 0 | D ˜ | ϱ 0 | , j = 1 , 2 , , m . Then, from Equation (20) and using the inequality | | y | | z | | | y z | , for y , z R , we acquire
| ϱ m + 1 | | d ˜ | ω | ϱ m | | 2 δ 1 | ω u = 0 m λ u ( | ϱ m + 1 u | 2 | ϱ m u | + | ϱ m 1 u | ) | d ˜ | | ϱ m | 2 δ 1 u = 0 m λ u ( | ϱ m + 1 u | 2 | ϱ m u | + | ϱ m 1 u | ) | d ˜ | 2 | ϱ 0 | 2 δ 1 | d ˜ | u = 0 m λ u ( | ϱ 0 | 2 | ϱ 0 | + | ϱ 0 | ) = | d ˜ | 2 | ϱ 0 | = | D ˜ | | ϱ 0 | .
Hence, we have
| ϱ m | D ˜ | ϱ 0 | , for m = 0 , 1 , 2 , , M .
Theorem 2.
The collocation technique (12) is unconditionally stable.
Proof. 
Employing Theorem 1 and expression (18), it follows that
Υ m 2 2 D ˜ Υ 0 2 2 , m = 0 , 1 , 2 , , M ,
which confirms that the scheme is unconditionally stable. □

5. The Convergence Analysis

The convergence analysis of the system (11) is provided in this section. Expressing (11) in linearized homogeneous form, we have
β 0 + δ 1 2 z m + 1 1 2 ( z m + 1 ) p p = β 0 δ 1 2 z m + 1 2 ( z m ) p p + β 0 u = 0 m 1 ( λ u λ u + 1 ) ( z m u z m 1 u ) β 0 λ m z 1 + 2 β 0 λ m Δ t ϕ 1 ( p ) + β 0 λ m z 0 δ 2 k 0 ( z m ) .
Theorem 3.
Let { z ( p , t m ) } m = 0 M 1 denote the exact solution of Equation (1) with ICs and BCs, and let { z m } m = 0 M 1 be the time discrete solution of Equation (22); then, the estimated error is
e ^ m + 1 K + K z τ 3 α ,
where e ^ m + 1 = z ( p , t m + 1 ) z m + 1 and K is a constant.
Proof. 
The exact solution z satisfies the semidiscrete scheme (22); thus,
β 0 + δ 1 2 z ( p , t m + 1 ) 1 2 ( z ( p , t m + 1 ) ) p p = β 0 δ 1 2 δ 2 k 0 z ( p , t m ) + 1 2 ( z ( p , t m ) ) p p + β 0 u = 0 m 1 ( λ u λ u + 1 ) z ( p , t m u ) z ( p , t m 1 u ) β 0 λ m z ( p , t 1 ) + 2 β 0 λ m Δ t ϕ 1 ( p j ) + β 0 λ m z ( p , t 0 ) + r ˜ τ m + 1 .
Subtracting Equation (22) from Equation (24), we acquire
β 0 + δ 1 2 e ^ m + 1 1 2 ( e ^ m + 1 ) p p = β 0 δ 1 2 δ 2 k 0 e ^ m + 1 2 ( e ^ m ) p p + β 0 u = 0 m 1 ( λ u λ u + 1 ) × e ^ m u e ^ m 1 u β 0 λ m e ^ 1 + β 0 λ m e ^ 0 + r ˜ τ m + 1 .
Using e ^ 0 = 0 and applying inner product with e ^ m + 1 on both sides of Equation (25) provides the following:
β 0 + δ 1 2 < e ^ m + 1 , e ^ m + 1 > = 1 2 < ( e ^ m + 1 ) p p , e ^ m + 1 > + β 0 δ 1 2 δ 2 k 0 < e ^ m , e ^ m + 1 > + 1 2 < ( e ^ m ) p p , e ^ m + 1 > + β 0 u = 0 m 1 ( λ u λ u + 1 ) ( < e ^ m u , e ^ m + 1 > < e ^ m 1 u , e ^ m + 1 > ) β 0 λ m < e ^ 1 , e ^ m + 1 > + < r ˜ τ m + 1 , e ^ m + 1 > .
Now, using the relation < z p p , z > = < z p , z p > , < z , z > = z 2 ; the fact that z 2 0 ; and by utilizing the Cauchy-Schwarz inequality < p , q > p q , we obtain
β 0 + δ 1 2 e ^ m + 1 2 β 0 δ 1 2 δ 2 k 0 e ^ m e ^ m + 1 + β 0 u = 0 m 1 ( λ u λ u + 1 ) ( e ^ m u e ^ m + 1 e ^ m 1 u e ^ m + 1 ) β 0 λ m e ^ 1 e ^ m + 1 + r ˜ τ m + 1 e ^ m + 1 ,
which reduces to
β 0 + δ 1 2 e ^ m + 1 β 0 δ 1 2 δ 2 k 0 e ^ m + β 0 u = 0 m 1 ( λ u λ u + 1 ) ( e ^ m u e ^ m 1 u ) β 0 λ m e ^ 1 + r ˜ τ m + 1 .
Let G m = max 0 j m e ^ j and H m = max 0 j m 1 { e ^ m j e ^ m 1 j } . Then, the above inequality becomes
β 0 + δ 1 2 e ^ m + 1 β 0 δ 1 2 δ 2 k 0 G m + H m β 0 u = 0 m 1 ( λ u λ u + 1 ) β 0 λ m e ^ 1 + r ˜ τ m + 1 .
Let G = max 0 j m G j and H = max 0 j m 1 H j . Then, using the fact that u = 0 m 1 ( λ u λ u + 1 ) = 1 λ u and λ u < 1 , we obtain
β 0 + δ 1 2 e ^ m + 1 β 0 δ 1 2 δ 2 k 0 G + H β 0 u = 0 m 1 ( λ u λ u + 1 ) β 0 e ^ 1 + r ˜ τ m + 1 β 0 δ 1 2 δ 2 k 0 G + H β 0 β 0 e ^ 1 + r ˜ τ m + 1 ,
which implies that
e ^ m + 1 β 0 δ 1 2 δ 2 k 0 G + H β 0 β 0 e ^ 1 β 0 + δ 1 2 + 1 β 0 + δ 1 2 r ˜ τ m + 1 = K + 1 β 0 + δ 1 2 r ˜ τ m + 1 K + K z τ 3 α ,
where
K = β 0 δ 1 2 δ 2 k 0 G + H β 0 β 0 e ^ 1 β 0 + δ 1 2 .

6. Numerical Results

In this section, an approximate solution to the TFKGE (1) is obtained by solving numerical problems. The error norms L and L 2 are used to evaluate the scheme’s accuracy as follows:
L = z ( p j , t ) Z ( p j , t ) max 0 j N | z ( p j , t ) Z ( p j , t ) |
and
L 2 = h j = 0 N | z ( p j , t ) Z ( p j , t ) | 2 .
Numerical computations were carried out by utilizing Mathematica 12 on an Intel(R) Core(TM) i5-3437U CPU @ 1.90 GHz (2.40 GHz Turbo), 12.0 GB RAM, an SSD, HP and a 64-bit operating system (Windows 10 Pro 10).
Example 1
([12]). Consider the nonlinear TFKGE (1) with δ 1 = 1 , δ 2 = 3 2 , 0 p 1 , ϕ 0 ( p ) = ϕ 1 ( p ) = ψ 0 ( t ) = ψ 1 ( t ) = 0 and the force term
q ( p , t ) = Γ ( 3 + α ) 2 sin ( π p ) t 2 + ( 1 + π 2 ) sin ( π p ) t 2 + α + 3 2 h ( z ( p , t ) ) ,
where h ( z ( p , t ) ) = ( z ( p , t ) ) 3 , and z ( p , t ) = sin ( π p ) t 2 + α is the exact solution of the given problem.
The proposed approach (12) was used to attain the numerical solution of the problem mentioned above. Figure 1 provides a comparison of the exact and approximate solutions at various time points with h = 1 80 , Δ t = 1 100 and α = 1.5 . Figure 2 shows a three-dimensional (3D) comparison of the approximate (right) and exact (left) solutions. For various α values with a range of 1 α 2 , the absolute errors are determined and compared with the results presented in [21] in Table 1, Table 2 and Table 3. For α = 1.6 , the absolute errors are determined and compared with the results presented in [38] in Table 4. In Table 5, for different values of α , the approximate solutions are listed.
Example 2
([46]). Consider the linear inhomogeneous TFKGE (1) when δ 1 = 1 , δ 2 = 0 , 0 p 1 , t > 0 , ϕ 0 ( p ) = ϕ 1 ( p ) = 0 , ψ 0 ( t ) = 0 and
ψ 1 ( t ) 6 t α + 1 Γ ( α + 2 ) 30 t α + 3 Γ ( α + 4 ) + ( α + 1 ) 6 t α + 1 Γ ( α + 2 ) 30 t α + 3 Γ ( α + 4 ) + ( α 1 ) 2 30 t 2 α + 1 Γ ( 2 α + 2 ) + 66 t 2 α + 3 Γ ( 2 α + 4 ) .
The force term is
q ( p , t ) = 6 p 3 t + ( p 3 6 p ) t 3 .
The exact solution of the problem is z ( p , t ) = p 3 t 3 . Using the scheme (12), the approximate solutions are attained for a variety of α values, and the results are shown in Table 6. The approximate solutions for various α values of Example 2 are displayed in Figure 3. Figure 4 provides a three-dimensional (3D) comparison of exact (left) and approximate (right) solutions.
Example 3
([38]). Consider the nonlinear TFKGE (1) with δ 1 = 0 , δ 2 = 1 , 0 p 1 , ϕ 0 ( p ) = ϕ 1 ( p ) = 0 , ψ 0 ( t ) = t 3 2 , ψ 1 ( t ) = 0 , and the force term
q ( p , t ) = Γ 5 2 Γ 5 2 α ( 1 p ) 5 2 t 3 2 α 15 4 ( 1 p ) 1 2 t 3 2 + h ( z ( p , t ) ) ,
where h ( z ( p , t ) ) = ( z ( p , t ) ) 2 , and z ( p , t ) = ( 1 p ) 5 2 t 3 2 is the exact solution of the given problem. Using Scheme (12), the approximate solutions were obtained, and the results are shown in Table 7. In Table 8, the comparison of error norms with [38] is listed. For α = 1.6 , the absolute errors are determined and compared with the results presented in [38] in Table 9. Figure 5 provides a comparison of the exact and approximate solutions at various time points with h = 1 25 , Δ t = 1 200 and α = 1.5 . Figure 6 shows a three-dimensional (3D) comparison of the approximate (right) and exact (left) solutions.
Example 4
([19,39]). Consider the linear TFKGE (1) with δ 1 = 1 , δ 2 = 0 , 0 p 1 , ϕ 0 ( p ) = ϕ 1 ( p ) = 0 , ψ 0 ( t ) = ψ 1 ( t ) = 0 , and the force term
q ( p , t ) = 2 t 2 α ( 2 α ) Γ ( 2 α ) ( e e p ) sin ( p ) + t 2 ( 2 e e p ) sin ( p ) + 2 t 2 e p cos ( p ) ,
where z ( p , t ) = t 2 ( e e p ) sin ( p ) is the exact solution of the given problem. The approximate solutions are demonstrated in Table 10. In Table 11, the comparison of error norms with [19,39] is expressed. Table 12 displays the analysis of error norms in the spatial direction. Figure 7 expounds the comparison of the exact and approximate solutions at various time stages with h = 1 45 , Δ t = 1 400 and α = 1.5 . Figure 8 shows a three-dimensional (3D) comparison of the approximate (right) and exact (left) solutions.
Example 5
([40]). Consider the nonlinear TFKGE (1) with δ 1 = 0 , δ 2 = 2.5 exp ( p ) , 0 p 1 , ϕ 0 ( p ) = ϕ 1 ( p ) = 0 , ψ 0 ( t ) = ψ 1 ( t ) = 0 , and the force term
q ( p , t ) = Γ ( 3 + α ) 2 p 3 ( 1 p ) 3 t 2 + ( 30 p 4 60 p 3 + 36 p 2 6 p ) t 2 + α + 2.5 exp ( p ) h ( z ( p , t ) ) ,
where h ( z ( p , t ) ) = ( z ( p , t ) ) 3 2 , and z ( p , t ) = p 3 ( 1 p ) 3 t 2 + α is the exact solution of the given problem. The approximate solutions are expressed in Table 13. In Table 14 and Table 15, the comparison of error norms with [40] is demonstrated. Figure 9 represents the comparison of the exact and approximate solutions at various time stages with h = 1 100 , Δ t = 1 500 and α = 1.5 . Figure 10 expounds a three-dimensional (3D) comparison of the approximate (right) and exact (left) solutions.

7. Concluding Remarks

In this paper, we provide an ECBS-based numerical technique for the generalized nonlinear TFKGE. The standard finite difference techniques are used in this algorithm to estimate the CTFD, and the ECBS functions are employed to approximate the derivative in space. The convergence and stability of the scheme are also included in our research. The numerical scheme’s accuracy is demonstrated by contrasting the attained results with those provided in [19,21,38,39,40]. Comparing our technique numerically and graphically shows that it is more appropriate and computationally very effective. Therefore, with some modifications, our technique can be utilized to solve other classes of nonlinear FPDEs.

Author Contributions

Conceptualization: M.J.H., M.K., M.S. and M.A.; Methodology: M.V.-C., M.J.H., M.K., M.S., M.A. and M.K.I.; Formal analysis: M.K. and M.S.; Investigation: M.V.-C., M.J.H. and M.K.I.; Writing—original draft: M.J.H., M.K., M.S. and M.A.; Visualization: M.V.-C., M.S. and M.K.I.; Supervision: M.A.; Funding acquisition: M.V.-C. and M.J.H.; Writing—review and editing: M.V.-C. and M.K.I. All authors have read and agreed to the published version of the manuscript.

Funding

The authors received no external funding for this study.

Data Availability Statement

There are no data sets that need to be accessed.

Acknowledgments

The authors are grateful to the anonymous referees for their valuable suggestions, which significantly improved this manuscript.

Conflicts of Interest

The authors declare that they have no conflicts of interest to report regarding the present study.

References

  1. Yousif, M.A.; Mahmood, B.A. Approximate solutions for solving the Klein-Gordon and sine-Gordon equations. J. Assoc. Arab. Univ. Basic Appl. Sci. 2017, 22, 83–90. [Google Scholar] [CrossRef]
  2. Yusufoğlu, E. The variational iteration method for studying the Klein-Gordon equation. Appl. Math. Lett. 2008, 21, 669–674. [Google Scholar] [CrossRef]
  3. Odibat, Z.; Momani, S. The variational iteration method: An efficient scheme for handling fractional partial differential equations in fluid mechanics. Comput. Math. Appl. 2009, 58, 2199–2208. [Google Scholar] [CrossRef]
  4. Golmankhaneh, A.K.; Baleanu, D. On nonlinear fractional Klein-Gordon equation. Signal Process. 2011, 91, 446–451. [Google Scholar] [CrossRef]
  5. Batiha, B.; Noorani, M.S.M.; Hashim, I. Numerical solution of sine-Gordon equation by variational iteration method. Phys. Lett. A 2007, 370, 437–440. [Google Scholar] [CrossRef]
  6. Kurulay, M. Solving the fractional nonlinear Klein-Gordon equation by means of the homotopy analysis method. Adv. Differ. Equ. 2012, 2012, 187. [Google Scholar] [CrossRef]
  7. Hariharan, G. Wavelet method for a class of fractional Klein-Gordon equations. J. Comput. Nonlinear Dyn. 2013, 8, 021008. [Google Scholar] [CrossRef]
  8. Hepson, O.E.; Korkmaz, A.; Dag, I. On the numerical solution of Klein-Gordon equation by exponential B-spline collocation method. Commun. Fac. Sci. Univ.-Ank.-Ser. Math. Stat. 2019, 68, 412–421. [Google Scholar] [CrossRef]
  9. Dehghan, M.; Abbaszadeh, M.; Mohebbi, A. An implicit RBF meshless approach for solving the time fractional nonlinear sine-Gordon and Klein-Gordon equations. Eng. Anal. Bound. Elem. 2015, 50, 412–434. [Google Scholar] [CrossRef]
  10. Zhang, Y. Time-fractional Klein-Gordon equation: Formulation and solution using variational methods. WSEAS Trans. Math. 2016, 15, 206–214. [Google Scholar]
  11. Chen, H.; Lü, S.; Chen, W. A fully discrete spectral method for the non-linear time fractional Klein-Gordon equation. Taiwan. J. Math. 2017, 21, 231–251. [Google Scholar] [CrossRef]
  12. Nagy, A.M. Numerical solution of time fractional nonlinear Klein-Gordon equation using Sinc-Chebyshev collocation method. Appl. Math. Comput. 2017, 310, 139–148. [Google Scholar] [CrossRef]
  13. El-Sayed, S.M. The decomposition method for studying the Klein-Gordon equation. Chaos Solitons Fractals 2003, 18, 1025–1030. [Google Scholar] [CrossRef]
  14. Kaya, D.; El-Sayed, S.M. A numerical solution of the Klein-Gordon equation and convergence of the decomposition method. Appl. Math. Comput. 2004, 156, 341–353. [Google Scholar] [CrossRef]
  15. Cui, M. Fourth-order compact scheme for the one-dimensional sine-Gordon equation. Numer. Methods Partial. Differ. Equ. Int. J. 2009, 25, 685–711. [Google Scholar] [CrossRef]
  16. Jafari, H.; Saeidy, M.; Firoozjaee, M.A. Solving nonlinear Klein-Gordon equation with a quadratic nonlinear term using homotopy analysis method. Iran. J. Optim. 2010, 2, 130–138. [Google Scholar]
  17. Vong, S.; Wang, Z. A compact difference scheme for a two dimensional fractional Klein-Gordon equation with Neumann boundary conditions. J. Comput. Phys. 2014, 274, 268–282. [Google Scholar] [CrossRef]
  18. Jafari, H.; Tajadodi, H.; Kadkhoda, N.; Baleanu, D. Fractional subequation method for Cahn-Hilliard and Klein-Gordon equations. Abstr. Appl. Anal. 2013, 2013, 587179. [Google Scholar] [CrossRef]
  19. Mohebbi, A.; Abbaszadeh, M.; Dehghan, M. High-order difference scheme for the solution of linear time fractional Klein-Gordon equations. Numer. Methods Partial. Differ. Equ. 2014, 30, 1234–1253. [Google Scholar] [CrossRef]
  20. Vong, S.; Wang, Z. A high-order compact scheme for the nonlinear fractional Klein-Gordon equation. Numer. Methods Partial. Differ. Equ. 2015, 31, 706–722. [Google Scholar] [CrossRef]
  21. Yaseen, M.; Abbas, M.; Ahmad, B. Numerical simulation of the nonlinear generalized time-fractional Klein-Gordon equation using cubic trigonometric B-spline functions. Math. Methods Appl. Sci. 2021, 44, 901–916. [Google Scholar] [CrossRef]
  22. Kamran, M.; Majeed, A.; Li, J. On numerical simulations of time fractional Phi-four equation using Caputo derivative. Comput. Appl. Math. 2021, 40, 257. [Google Scholar] [CrossRef]
  23. Fang, J.; Nadeem, M.; Habib, M.; Karim, S.; Wahash, H.A. A new iterative method for the approximate solution of Klein-Gordon and sine-Gordon equations. J. Funct. Spaces 2022, 2022, 5365810. [Google Scholar] [CrossRef]
  24. Sweilam, N.H.; Khader, M.M.; Mahdy, A.M.S. On the numerical solution for the linear fractional Klein-Gordon equation using Legendre pseudospectral method. Int. J. Math. Comput. Appl. Res. 2012, 2, 1–10. [Google Scholar]
  25. Abuteen, E.; Freihat, A.; Al-Smadi, M.; Khalil, H.; Khan, R.A. Approximate series solution of nonlinear, fractional Klein-Gordon equations using fractional reduced differential transform method. J. Math. Stat. 2016, 12, 23–33. [Google Scholar] [CrossRef]
  26. Bülbül, B.; Sezer, M. A new approach to numerical solution of nonlinear Klein-Gordon equation. Math. Probl. Eng. 2013, 2013, 869749. [Google Scholar]
  27. Hesameddini, E.; Fotros, F. Solution for time-fractional coupled Klein-Gordon Schrödinger equation using decomposition method. Int. Math. Forum 2012, 7, 1047–1056. [Google Scholar]
  28. Abbasbandy, S. Numerical solution of non-linear Klein-Gordon equations by variational iteration method. Int. J. Numer. Methods Eng. 2007, 70, 876–881. [Google Scholar] [CrossRef]
  29. Singh, J.; Kumar, D.; Rathore, S. Application of homotopy perturbation transform method for solving linear and nonlinear Klein-Gordon equations. J. Inf. Comput. Sci. 2012, 7, 131–139. [Google Scholar]
  30. Schoenberg, I.J. Contributions to the problem of approximation of equidistant data by analytic functions. part B. on the problem of osculatory interpolation. a second class of analytic approximation formulae. Q. Appl. Math. 1946, 4, 112–141. [Google Scholar] [CrossRef]
  31. Shafiq, M.; Abdullah, F.A.; Abbas, M.; Alzaidi, A.S.M.; Riaz, M.B. Memory effect analysis using piecewise cubic B-spline of time fractional diffusion equation. Fractals 2022, 30, 2240270. [Google Scholar] [CrossRef]
  32. Shafiq, M.; Abbas, M.; El-Shewy, E.K.; Abdelrahman, M.A.E.; Abdo, N.F.; El-Rahman, A.A. Numerical investigation of the fractional diffusion wave equation with the Mittag–Leffler function. Fractal Fract. 2024, 8, 18. [Google Scholar] [CrossRef]
  33. Hepson, O.E. Generation of the trigonometric cubic B-spline collocation solutions for the Kuramoto-Sivashinsky (KS) equation. In AIP Conference Proceedings; AIP Publishing: Huntington, NY, USA, 2018; Volume 1978, pp. 1–5. [Google Scholar]
  34. Yadav, S.; Pandey, R.K.; Shukla, A.K. Numerical approximations of Atangana-Baleanu Caputo derivative and its application. Chaos Solitons Fractals 2019, 118, 58–64. [Google Scholar] [CrossRef]
  35. Majeed, A.; Kamran, M.; Iqbal, M.K.; Baleanu, D. Solving time fractional Burgers’ and Fisher’s equations using cubic B-spline approximation method. Adv. Differ. Equ. 2020, 2020, 175. [Google Scholar] [CrossRef]
  36. Mittal, R.C.; Jain, R. Numerical solutions of nonlinear Burgers’ equation with modified cubic B-splines collocation method. Appl. Math. Comput. 2012, 218, 7839–7855. [Google Scholar] [CrossRef]
  37. Tamsir, M.; Srivastava, V.K.; Jiwari, R. An algorithm based on exponential modified cubic B-spline differential quadrature method for nonlinear Burgers’ equation. Appl. Math. Comput. 2016, 290, 111–124. [Google Scholar] [CrossRef]
  38. Amin, M.; Abbas, M.; Iqbal, M.K.; Baleanu, D. Numerical treatment of time-fractional Klein-Gordon equation using redefined extended cubic B-spline functions. Front. Phys. 2020, 8, 288. [Google Scholar] [CrossRef]
  39. Soori, Z.; Aminataei, A. High-order difference scheme for the solution of linear time fractional Klein-Gordon equation. In Proceedings of the 47th Annual Iranian Mathematics Conference, Kharazmi University, Karaj, Iran, 28–31 August 2016. [Google Scholar]
  40. Karaagac, B.; Yusuf, U.C.A.R.; Yagmurlu, N.M.; Alaattin, E.S.E.N. A new perspective on the numerical solution for fractional klein gordon equation. J. Polytech. 2019, 22, 443–451. [Google Scholar] [CrossRef]
  41. Podlubny, I. Fractional Differential Equations; Academic Press: San Diego, CA, USA, 1999. [Google Scholar]
  42. Khader, M.M.; Adel, M.H. Numerical solutions of fractional wave equations using an efficient class of FDM based on the Hermite formula. Adv. Differ. Equ. 2016, 2016, 34. [Google Scholar] [CrossRef]
  43. Umer, A.; Abbas, M.; Shafiq, M.; Abdullah, F.A.; De la Sen, M.; Abdeljawad, T. Numerical solutions of Atangana-Baleanu time-fractional advection diffusion equation via an extended cubic B-spline technique. Alex. Eng. J. 2023, 74, 285–300. [Google Scholar] [CrossRef]
  44. Shafiq, M.; Abbas, M.; Abdullah, F.A.; Majeed, A.; Abdeljawad, T.; Alqudah, M.A. Numerical solutions of time fractional Burgers’ equation involving Atangana-Baleanu derivative via cubic B-spline functions. Results Phys. 2022, 34, 105244. [Google Scholar] [CrossRef]
  45. Shafiq, M.; Abbas, M.; Abualnaja, K.M.; Huntul, M.J.; Majeed, A.; Nazir, T. An efficient technique based on cubic B-spline functions for solving time-fractional advection diffusion equation involving Atangana-Baleanu derivative. Eng. Comput. 2022, 38, 901–917. [Google Scholar] [CrossRef] [PubMed]
  46. Turut, V.; Güzel, N. On solving partial differential equations of fractional order by using variational iteration method and multivariate Padé approximations. Eur. J. Pure Appl. Math. 2013, 6, 147–171. [Google Scholar]
Figure 1. The numerical (circles) and exact (solid lines) solutions for various points in time when h = 1 80 , Δ t = 1 100 , t = 1 and α = 1.5 for Example 1.
Figure 1. The numerical (circles) and exact (solid lines) solutions for various points in time when h = 1 80 , Δ t = 1 100 , t = 1 and α = 1.5 for Example 1.
Computation 12 00080 g001
Figure 2. Three-dimensional plot for exact and approximate solutions, when h = 1 80 , Δ t = 1 100 , t = 1 and α = 1.5 for Example 1. (a) Exact solution; (b) Numerical solution.
Figure 2. Three-dimensional plot for exact and approximate solutions, when h = 1 80 , Δ t = 1 100 , t = 1 and α = 1.5 for Example 1. (a) Exact solution; (b) Numerical solution.
Computation 12 00080 g002
Figure 3. Approximate solution for various α values when h = 1 40 , Δ t = 1 100 and t = 1 for Example 2.
Figure 3. Approximate solution for various α values when h = 1 40 , Δ t = 1 100 and t = 1 for Example 2.
Computation 12 00080 g003
Figure 4. Three-dimensional plot for exact and approximate solutions, when h = 1 40 , Δ t = 1 100 , t = 1 and α = 1.5 for Example 2. (a) Exact solution; (b) Numerical solution.
Figure 4. Three-dimensional plot for exact and approximate solutions, when h = 1 40 , Δ t = 1 100 , t = 1 and α = 1.5 for Example 2. (a) Exact solution; (b) Numerical solution.
Computation 12 00080 g004
Figure 5. Exact results (circles) and approximate solutions (solid lines) at various temporal stages for Example 3.
Figure 5. Exact results (circles) and approximate solutions (solid lines) at various temporal stages for Example 3.
Computation 12 00080 g005
Figure 6. Three-dimensional plot for exact and approximate solutions, when h = 1 16 , Δ t = 1 1000 , t = 1 and α = 1.5 for Example 3. (a) Exact solution; (b) Numerical solution.
Figure 6. Three-dimensional plot for exact and approximate solutions, when h = 1 16 , Δ t = 1 1000 , t = 1 and α = 1.5 for Example 3. (a) Exact solution; (b) Numerical solution.
Computation 12 00080 g006
Figure 7. Exact results (circles) and approximate solutions (solid lines) at various temporal stages for Example 4.
Figure 7. Exact results (circles) and approximate solutions (solid lines) at various temporal stages for Example 4.
Computation 12 00080 g007
Figure 8. Three-dimensional plot for exact and approximate solutions, when h = 1 100 , Δ t = 1 1000 , t = 1 and α = 1.5 for Example 4. (a) Exact solution; (b) Numerical solution.
Figure 8. Three-dimensional plot for exact and approximate solutions, when h = 1 100 , Δ t = 1 1000 , t = 1 and α = 1.5 for Example 4. (a) Exact solution; (b) Numerical solution.
Computation 12 00080 g008
Figure 9. Exact results (circles) and approximate solutions (solid lines) at various temporal stages for Example 5.
Figure 9. Exact results (circles) and approximate solutions (solid lines) at various temporal stages for Example 5.
Computation 12 00080 g009
Figure 10. Three-dimensional plot for exact and approximate solutions, when h = 1 60 , Δ t = 1 500 , t = 1 and α = 1.3 for Example 5. (a) Exact solution; (b) Numerical solution.
Figure 10. Three-dimensional plot for exact and approximate solutions, when h = 1 60 , Δ t = 1 500 , t = 1 and α = 1.3 for Example 5. (a) Exact solution; (b) Numerical solution.
Computation 12 00080 g010
Table 1. Absolute errors with α = 1.5 for Example 1.
Table 1. Absolute errors with α = 1.5 for Example 1.
CTBS [21]Presented Method
CPU Time(s)
3484.98
CPU Time(s)
353.6875
p h = 1 80 , Δ t = 0.001 h = 1 80 , Δ t = 0.001
0.1 2.2437 × 10 4 3.7667 × 10 5
0.2 4.4180 × 10 4 7.0999 × 10 5
0.3 6.3346 × 10 4 9.6627 × 10 5
0.4 7.6861 × 10 4 1.1255 × 10 4
0.5 8.1773 × 10 4 1.1793 × 10 4
0.6 7.6861 × 10 4 1.1255 × 10 4
0.7 6.3346 × 10 4 9.6627 × 10 5
0.8 4.4180 × 10 4 7.0999 × 10 5
0.9 2.2437 × 10 4 3.7667 × 10 5
Table 2. Absolute errors with α = 1.7 for Example 1.
Table 2. Absolute errors with α = 1.7 for Example 1.
CTBS [21]Presented Method
CPU Time(s)
3503.70
CPU Time(s)
358.2656
p h = 1 80 , Δ t = 0.001 h = 1 80 , Δ t = 0.001
0.1 2.8566 × 10 4 1.2052 × 10 5
0.2 5.5578 × 10 4 2.2820 × 10 5
0.3 7.8594 × 10 4 3.1232 × 10 5
0.4 9.4376 × 10 4 3.6548 × 10 5
0.5 1.0003 × 10 3 3.8361 × 10 5
0.6 9.4376 × 10 4 3.6548 × 10 5
0.7 7.8594 × 10 4 3.1232 × 10 5
0.8 5.5578 × 10 4 2.2820 × 10 5
0.9 2.8566 × 10 4 1.2052 × 10 5
Table 3. Absolute errors with α = 1.9 for Example 1.
Table 3. Absolute errors with α = 1.9 for Example 1.
CTBS [21]Presented Method
CPU Time(s)
3489.45
CPU Time(s)
254.8750
p h = 1 80 , Δ t = 0.001 h = 1 80 , Δ t = 0.001
0.1 4.8172 × 10 4 1.7910 × 10 5
0.2 9.2384 × 10 4 3.3370 × 10 5
0.3 1.2844 × 10 3 4.4751 × 10 5
0.4 1.5211 × 10 3 5.1494 × 10 5
0.5 1.6051 × 10 3 5.3699 × 10 5
0.6 1.5211 × 10 3 5.1494 × 10 5
0.7 1.2844 × 10 3 4.4751 × 10 5
0.8 9.2384 × 10 4 3.3370 × 10 5
0.9 4.8172 × 10 4 1.7910 × 10 5
Table 4. Comparison of absolute errors for Example 1 with α = 1.6 , Δ t = 0.001 and N = 100 .
Table 4. Comparison of absolute errors for Example 1 with α = 1.6 , Δ t = 0.001 and N = 100 .
RECBS [38]Proposed Method
t p
0.4 1.1769 × 10 7 2.0024 × 10 8
0.4 0.6 1.0126 × 10 6 5.3950 × 10 7
0.8 7.2740 × 10 6 3.3133 × 10 7
Table 5. Approximate solution for several α values, where h = 1 40 , t = 1 , Δ t = 0.01 , ν = 0.0000009 for Example 1.
Table 5. Approximate solution for several α values, where h = 1 40 , t = 1 , Δ t = 0.01 , ν = 0.0000009 for Example 1.
p α = 1.6 α = 1.8 α = 1.9 α = 1.95 α = 1.99 α = 1.999
0.1 0.309102 0.309832 0.310767 0.311496 0.312251 0.312446
0.2 0.587949 0.589326 0.591093 0.592473 0.593903 0.594272
0.3 0.809245 0.811122 0.813536 0.815423 0.817381 0.817886
0.4 0.951327 0.953516 0.956337 0.958543 0.960835 0.961426
0.5 1.000290 1.002580 1.007850 1.007850 1.010260 1.010880
0.6 0.951327 0.953516 0.956337 0.958543 0.960835 0.961426
0.7 0.809245 0.811122 0.813536 0.815423 0.817381 0.817886
0.8 0.587949 0.589326 0.591093 0.592473 0.593903 0.594272
0.9 0.309102 0.309832 0.310767 0.311496 0.3122514 0.312446
Table 6. Approximate solutions for several α values where h = 1 40 , t = 1 , Δ t = 0.01 and ν = 0.0007 for Example 2.
Table 6. Approximate solutions for several α values where h = 1 40 , t = 1 , Δ t = 0.01 and ν = 0.0007 for Example 2.
p α = 1.6 α = 1.8 α = 1.9 α = 1.95 α = 1.99 α = 1.999
0.1 0.003111 0.002671 0.004456 0.003045 0.001653 0.001315
0.2 0.011775 0.010599 0.014395 0.011648 0.009028 0.008397
0.3 0.031589 0.029174 0.035478 0.031602 0.028040 0.027188
0.4 0.068255 0.064053 0.073604 0.068899 0.064699 0.063703
0.5 0.127654 0.121295 0.134813 0.129604 0.125065 0.123999
0.6 0.215937 0.207469 0.225172 0.219817 0.215252 0.214190
0.7 0.339672 0.329778 0.350752 0.345687 0.341452 0.340477
0.8 0.506032 0.496257 0.517642 0.513432 0.509970 0.509181
0.9 0.723055 0.716078 0.731981 0.729376 0.727265 0.726788
Table 7. Absolute errors at t = 1 , α = 1.5 , N = 20 and Δ t = 0.01 for Example 3.
Table 7. Absolute errors at t = 1 , α = 1.5 , N = 20 and Δ t = 0.01 for Example 3.
pExact SolutionApproximate SolutionAbsolute Errors
0.1 0.768433 0.768433 1.1797 × 10 9
0.2 0.572433 0.572318 1.1557 × 10 4
0.3 0.409963 0.409708 2.5557 × 10 4
0.4 0.278855 0.278489 3.6557 × 10 4
0.5 0.176777 0.176360 4.1671 × 10 4
0.6 0.101193 0.100795 3.9818 × 10 4
0.7 0.049295 0.048983 3.1229 × 10 4
0.8 0.017889 0.017716 1.7206 × 10 4
0.9 0.003162 0.003158 3.9026 × 10 6
Table 8. Comparison of error norms for Example 3 with α = 1.3 and Δ t = 0.001 .
Table 8. Comparison of error norms for Example 3 with α = 1.3 and Δ t = 0.001 .
RECBS [38]Proposed Method
N L L 2 L L 2
10 3.1950 × 10 2 2.9355 × 10 2 1.7841 × 10 3 1.39087 × 10 3
20 9.0451 × 10 3 8.7109 × 10 3 1.7788 × 10 4 1.0508 × 10 4
40 2.4778 × 10 3 2.2128 × 10 3 3.3796 × 10 5 2.1677 × 10 5
80 6.3842 × 10 4 5.9376 × 10 4 1.5214 × 10 5 8.4009 × 10 6
Table 9. Comparison of absolute errors for Example 3 with α = 1.6 , Δ t = 0.001 and N = 100 .
Table 9. Comparison of absolute errors for Example 3 with α = 1.6 , Δ t = 0.001 and N = 100 .
RECBS [38]Proposed Method
t p
0.4 1.6174 × 10 5 6.7324 × 10 6
0.4 0.6 6.3939 × 10 6 3.2045 × 10 6
0.8 5.1612 × 10 6 4.4024 × 10 7
0.4 2.4030 × 10 5 1.7690 × 10 6
0.8 0.6 6.7766 × 10 6 6.7009 × 10 7
0.8 3.5003 × 10 6 8.4648 × 10 8
Table 10. Absolute errors at t = 1 , α = 1.6 , N = 50 and Δ t = 0.01 for Example 4.
Table 10. Absolute errors at t = 1 , α = 1.6 , N = 50 and Δ t = 0.01 for Example 4.
pExact SolutionApproximate SolutionAbsolute Errors
0.1 0.161042 0.161075 3.3088 × 10 5
0.2 0.297384 0.297481 9.7460 × 10 5
0.3 0.404397 0.404553 1.5594 × 10 4
0.4 0.477605 0.477788 1.8283 × 10 4
0.5 0.512775 0.512940 1.6518 × 10 4
0.6 0.506012 0.506116 1.0407 × 10 4
0.7 0.453870 0.453886 1.5793 × 10 5
0.8 0.353471 0.353404 6.7097 × 10 5
0.9 0.202630 0.202535 9.4895 × 10 5
Table 11. Comparison of error norm for Example 4 with α = 1.75 and h = 1 20 .
Table 11. Comparison of error norm for Example 4 with α = 1.75 and h = 1 20 .
Fourth-Order CFD [19]Sixth-Order CFD [39]Proposed Method
Δ t L L L L 2
1 10 3.7014 × 10 3 3.7014 × 10 3 1.2528 × 10 3 8.0189 × 10 4
1 20 1.5270 × 10 3 1.5270 × 10 3 7.4684 × 10 4 4.7374 × 10 4
1 40 6.2904 × 10 4 6.2903 × 10 4 4.0106 × 10 4 2.3141 × 10 4
1 80 2.5916 × 10 4 2.5916 × 10 4 1.9319 × 10 4 1.3117 × 10 4
1 160 1.0715 × 10 4 1.0714 × 10 4 1.0350 × 10 4 7.0761 × 10 5
Table 12. Error norms for Example 4 with α = 1.3 and Δ t = 0.01 .
Table 12. Error norms for Example 4 with α = 1.3 and Δ t = 0.01 .
N L L 2
10 4.7454 × 10 4 3.1201 × 10 4
20 3.9127 × 10 4 2.5294 × 10 4
40 2.7539 × 10 4 1.7101 × 10 4
80 1.1576 × 10 4 7.4440 × 10 5
Table 13. Absolute errors at t = 1 , α = 1.7 , N = 50 and Δ t = 0.005 for Example 5.
Table 13. Absolute errors at t = 1 , α = 1.7 , N = 50 and Δ t = 0.005 for Example 5.
pExact SolutionApproximate SolutionAbsolute Errors
0.1 0.000729 0.000765 3.5848 × 10 5
0.2 0.004096 0.004140 4.4264 × 10 5
0.3 0.009261 0.009296 3.5240 × 10 5
0.4 0.013824 0.013847 2.2700 × 10 5
0.5 0.015625 0.015642 1.7253 × 10 5
0.6 0.013824 0.013847 2.2741 × 10 5
0.7 0.009261 0.009296 3.5287 × 10 5
0.8 0.004096 0.004140 4.4293 × 10 5
0.9 0.000729 0.000765 3.5860 × 10 5
Table 14. Comparison of error norms for Example 5 with α = 1.5 , t = 1 and Δ t = 0.01 .
Table 14. Comparison of error norms for Example 5 with α = 1.5 , t = 1 and Δ t = 0.01 .
CBS FEM [40]Proposed Method
h L L 2 L L 2
1 4 1.2132 × 10 3 9.3311 × 10 4 1.0187 × 10 3 8.8201 × 10 4
1 8 4.0649 × 10 4 2.8192 × 10 4 4.3799 × 10 4 3.0777 × 10 4
1 10 2.8491 × 10 4 1.8780 × 10 4 2.7494 × 10 4 1.7921 × 10 4
1 20 1.1357 × 10 4 6.3206 × 10 5 9.0879 × 10 5 6.0401 × 10 5
1 40 6.6852 × 10 5 3.8371 × 10 5 5.7708 × 10 5 3.6271 × 10 5
1 80 5.5051 × 10 5 3.4415 × 10 5 4.7187 × 10 5 2.9298 × 10 5
1 100 4.6700 × 10 6 2.5900 × 10 6 3.5269 × 10 6 2.2255 × 10 6
Table 15. Comparison of error norms for Example 5 with α = 1.3 , t = 1 and Δ t = 0.005 .
Table 15. Comparison of error norms for Example 5 with α = 1.3 , t = 1 and Δ t = 0.005 .
CBS FEM [40]Proposed Method
h L L 2 L L 2
1 4 1.1779 × 10 3 9.1627 × 10 4 1.0512 × 10 3 8.9937 × 10 4
1 8 4.1643 × 10 4 2.7159 × 10 4 4.0370 × 10 4 1.9420 × 10 4
1 10 2.5651 × 10 4 1.7561 × 10 4 2.3485 × 10 4 1.4865 × 10 4
1 20 6.2482 × 10 5 4.4332 × 10 5 5.3501 × 10 5 3.7964 × 10 5
1 40 1.5783 × 10 5 1.1106 × 10 5 1.5305 × 10 5 1.0374 × 10 5
1 80 4.0630 × 10 6 2.7840 × 10 6 1.8171 × 10 6 1.1495 × 10 6
1 100 2.6600 × 10 6 1.7880 × 10 6 1.2686 × 10 6 8.3680 × 10 7
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Vivas-Cortez, M.; Huntul, M.J.; Khalid, M.; Shafiq, M.; Abbas, M.; Iqbal, M.K. Application of an Extended Cubic B-Spline to Find the Numerical Solution of the Generalized Nonlinear Time-Fractional Klein–Gordon Equation in Mathematical Physics. Computation 2024, 12, 80. https://doi.org/10.3390/computation12040080

AMA Style

Vivas-Cortez M, Huntul MJ, Khalid M, Shafiq M, Abbas M, Iqbal MK. Application of an Extended Cubic B-Spline to Find the Numerical Solution of the Generalized Nonlinear Time-Fractional Klein–Gordon Equation in Mathematical Physics. Computation. 2024; 12(4):80. https://doi.org/10.3390/computation12040080

Chicago/Turabian Style

Vivas-Cortez, Miguel, M. J. Huntul, Maria Khalid, Madiha Shafiq, Muhammad Abbas, and Muhammad Kashif Iqbal. 2024. "Application of an Extended Cubic B-Spline to Find the Numerical Solution of the Generalized Nonlinear Time-Fractional Klein–Gordon Equation in Mathematical Physics" Computation 12, no. 4: 80. https://doi.org/10.3390/computation12040080

APA Style

Vivas-Cortez, M., Huntul, M. J., Khalid, M., Shafiq, M., Abbas, M., & Iqbal, M. K. (2024). Application of an Extended Cubic B-Spline to Find the Numerical Solution of the Generalized Nonlinear Time-Fractional Klein–Gordon Equation in Mathematical Physics. Computation, 12(4), 80. https://doi.org/10.3390/computation12040080

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop