Abstract
In the current work, a fast scheme combined with the Legendre spectral method was developed for solving a fractional Klein–Gordon equation (FKGE). The numerical scheme was provided by the Legendre spectral method in the spatial direction, and for the temporal direction, a scheme of order with a fast algorithm was taken into account. The fast algorithm could decrease the computational cost from to , where M denotes the number of time levels. In addition, correction terms could be employed to improve the convergence rate when the solutions have weak regularity. We proved theoretically that the scheme is unconditionally stable and obtained an error estimate. The numerical experiments demonstrated that our numerical scheme is accurate and efficient.
1. Introduction
Fractional differential equations (FDEs), as the evolution of integral differential equations, can more precisely describe phenomena with sophisticated dynamics [1,2,3,4]. In the past few decades, FDEs have been investigated by a number of scholars because they have practical applications in various fields, such as relativistic quantum mechanics [5], hydromechanics [6], neuroscience [7], and materials science [8]. Due to it being virtually impossible to obtain an analytic solution to an FDE in most cases, many numerical methods for solving FDEs have been developed rapidly. In particular, finite difference methods (FDMs) [9,10], finite element methods (FEMs) [11,12,13], spectral methods [14,15,16], and spectral element methods [17,18] have been extensively utilized.
In this article, we concentrate on the following FKGE:
When , (1) is a classical integer-order Klein–Gordon equation. is a fractional derivative with respect to t in the Caputo sense, which is defined as
If we set , then an FKGE can be obtained, and a fractional dissipative Klein–Gordon equation can be obtained for [19].
The application of FDEs has been extended to quantum mechanics, which has given rise to fractional quantum mechanics [20,21]. Klein–Gordon equations, which are some of the most fundamental equations in relativistic quantum mechanics, have been generalized to FKGEs [19,22]. As a matter of fact, quite a few scholars have investigated FKGEs. Vong et al. proposed a high-order finite difference scheme for a nonlinear FKGE, and the convergence order of the proposed scheme was [23], where h and are the spatial and temporal step sizes, respectively. Hashemizadeh et al. proposed an approach that relied on the sparse operational matrix of the derivative to solve an FKGE, leading to more efficient operation [19]. By combining the properties of Chebyshev approximations with the FDM, Khadera et al. developed a method that reduced an FKGE to a system of ODEs and then solved it using the FDM [24]. Recently, Saffarian et al. utilized the ADI spectral element method to solve a nonlinear FKGE with a convergent order of ) [25], where N is the polynomial degree and m represents the regularity of the solution. As far as the authors’ knowledge is concerned, there have been few reports on numerical methods utilizing fast algorithms for an FKGE. Motivated by the above considerations, our main aim was developing a stable and fast numerical method for FKGEs.
The structure of this paper is as follows: In Section 2, some crucial preliminaries are provided for the subsequent analysis. In Section 3, to obtain the fully discrete scheme, we introduce the scheme and the Legendre spectral method in the temporal and spatial directions, respectively. Meanwhile, correction terms are considered to improve the weak regularity of the solution. In Section 4, we attach importance to the stability analysis and the convergence analysis. To save on computational expenses for the fractional operators, a fast algorithm is implemented in Section 5. In Section 6, several numerical experiments are conducted to validate our theoretical analysis. In the final section, we present our conclusions.
2. Preliminaries
In this section, some lemmas and definitions that were necessary for the following analysis are presented.
The space corresponds to the set of polynomials defined in the domain , encompassing polynomials with a degree lower than N. Moreover, within , we have the subspace that fulfills the boundary condition for
Let us denote as the orthogonal projection operator from the Hilbert space to the subspace . For any and any , the orthogonal projection operator exhibits the following property:
Here, we make a crucial assumption that the solution to Equation (1) conforms to the following form [11,17]:
where ; ; and is a function that is sufficiently smooth with respect to both variables x and t. There exists for
We define as:
which describes the regularity of (2).
Lemma 1
([14,16]). Suppose ; then, we have
Lemma 2
([11,19]). Let be a continuous function with a fractional derivative of order α; then, we have
Lemma 3
([11]). Suppose for . Let with and . Then, we have
3. Fully Discrete Scheme
Let be a temporal step size and For the discretization of fractional operators () and the first-order derivative, we utilize the schemes as follows [11,12]:
where , . The following expression captures the relationship between the generating function and its expansion coefficients :
where , and the choice of does not affect the convergence rate. When , it simplifies to a fractional Crank–Nicolson scheme [26]. We apply the following formula to determine expansion coefficients :
where
The semi-discrete scheme of (7) is obtained in the temporal direction utilizing (8) as follows:
where , and is
The Legendre spectral method is applied for the discretization in the spatial direction and used to find for , such that
We see from the truncation errors in (8) that if , then the convergence order in the temporal direction is lower than . Generally, the solutions of FKGEs have weak regularity. To improve the convergence rate, correction terms are added to the approximation formulas as follows [17,27,28]:
where , , and are starting weights, and they can be derived by solving a linear system of equations. Take an example for calculating in (13). is exact for . Then, it can be solved through the following linear system:
4. Stability and Convergence Analysis
Lemma 4
Lemma 5
Theorem 1.
The scheme in (12) is unconditionally stable, and we have the following estimate:
Proof.
is the proper approximation of that satisfies and . Defining and considering (8), we can obtain
By substituting n with j and taking the summation of both sides for j ranging from 1 to M (M ), we can derive
Combining Lemmas 4 and 5, we derive the following inequality:
Let be the operator from into , such that
For a properly defined , it holds that thus, we have the following inequality:
For , let and in (20); then, we obtain
Similarly, for , we have the following inequality:
So, if , we can derive
By employing Grönwall’s inequality, we can deduce
where C represents a constant that does not depend on the variables n, , and N.
Finally, using the triangular inequality , we derive Theorem 1. □
Next, we discuss the convergence of (12).
Theorem 2.
Proof.
Defining and noting that , we integrate both sides of (7) with to obtain
Utilizing Lemmas 4 and 5, we obtain the following inequalities:
Combining this with (2), we derive
Thus, we know according to (4). Moreover, we have
Similarly, let and ; thus, we can easily obtain the following inequality:
We derive the following inequality using Grönwall’s inequality:
where C is independent of n and . is defined by
Finally, we can prove Theorem 2 by applying the triangle inequality and utilizing Equation (4). □
5. Fast Algorithm
The key to the fast algorithm is that we divide the time domain into a series of fast growing intervals,
where B is a basis chosen satisfying , and is overlapping.
In Equation (49), we select a Talbot contour as our chosen path of integration [31]. Then, we can obtain
where and are
To demonstrate the effectiveness of the approximation, we subtract (57) from (9) and obtain the absolute value, which represents the absolute approximation error. Setting , and and 30, we plot the absolute approximation error in Figure 1.
Figure 1.
(a) Absolute error for with , (b) absolute error for with .
Figure 1 shows that the approximate effect of the first few weights is poor, so in the calculation process, we calculate the first few weights by (9) and find that the approximate effect of is generally better than that of , which will be verified in Example 4. Referring to [32], we determine L and obtain .
Now, we rewrite (8) as
We define as
We notice that has a recursive structure, which can be utilized to enhance the computation speed:
The first few weights are not described well by (57) (refer to Figure 1). Thus, for , we calculate the weights according to (9), and for , we calculate the weights according to (57). Combining (59)–(61), we can obtain
Below are listed the steps for implementing the fast algorithm:
6. Numerical Examples
In this section, we provide four examples of solving an FKGE utilizing our proposed scheme, and the results verify our theoretical analysis and the effectiveness of our method. The basis function was chosen as for , where is the frequency coefficient. The codes were developed in MATLAB 2022a and executed on a Windows 10 operating system. The computer used for running these codes had a processor speed of 2.60 GHz and 8 GB of RAM.
Example 1.
Let in (1). We considered the following fractional dissipative Klein–Gordon equation with homogeneous initial condition :
Assuming that the exact solution of Equation (65) is , the corresponding forcing term is given by
For , the results are presented in Table 1, Table 2 and Table 3. It can be observed that our numerical scheme exhibited second-order convergence accuracy in the temporal direction, which aligned with the theoretical expectations.
Table 1.
The error and error at , , and .
Table 2.
Temporal convergence rates at , , and .
Table 3.
The error and error at , , and .
To analyze the spatial accuracy, we set to eliminate temporal direction errors. In Figure 2, it can be observed that when and the error exhibited an exponential decrease. This behavior confirmed the spectral accuracy of the method, which in turn confirmed the validity of our theoretical analysis.
Figure 2.
for Example 1 at .
Example 2.
Let in (1). We investigated the fractional linear Klein–Gordon equation with the non-homogeneous initial conditions
Assuming that the exact solution of Equation (66) is , the corresponding forcing term is
For , the results are illustrated in Table 4, Table 5 and Table 6. Notably, even when considering non-homogeneous initial conditions, it was evident that our numerical scheme remained applicable. The results indicated the adaptability and flexibility of our method.
Table 4.
The error and error at , , and .
Table 5.
The error and error at , , and .
Table 6.
The error and error at , , and .
Example 3.
Let in (1). The non-smooth solution was considered, with the corresponding forcing term
Assuming , it is worth mentioning that due to the weak regularity of the solution, it was not possible to achieve the optimal convergence rate of . Referring to Table 7, we can observe that the inclusion of correction terms led to an improved convergence rate. This result serves as evidence for the efficiency of our method.
Table 7.
Temporal convergence rates at .
Example 4.
We set and To simplify the notation, we denoted the approximation of Equation (57) with points as Fast. We had two sets of solutions: , which were obtained using the direct method, and , which was obtained using the fast algorithm. We set and defined the pointwise error as
According to Table 8, it is evident that the fast algorithm significantly accelerated the computation process. Moreover, our approach not only attained exceptional precision, but also effectively reduced the computational cost. For example, for the pointwise error was around , which was close to the machine accuracy. Figure 3a displays the exact solutions for Figure 3b shows the numerical solutions for the given parameters: , = 1.8, and . Furthermore, in order to obtain the error contour plot shown in Figure 4a, we subtracted the corresponding solutions from Figure 3a,b. In Figure 4b, it is evident that the computational complexity of the fast algorithm was , while the direct method had a computational complexity of . This result in Figure 4 aligned with the theoretical expectations and confirmed that the algorithms’ performances matched the expected efficiencies.
Table 8.
Pointwise error with .
Figure 3.
(a) Exact solution, (b) numerical solution.
Figure 4.
(a) Error contour, (b) computational complexity.
7. Conclusions
In this study, we developed a stable and efficient numerical method to solve an FKGE. A stability analysis and the convergence of the discrete scheme were provided in our method. Considering the weak regularity of the solutions, we improved the convergence order by incorporating correction terms into our approach. To optimize the computational complexity, we implemented a fast algorithm, which significantly reduced the runtime required for solving an FKGE. This allowed for quicker computations without sacrificing accuracy. We note the method can be extended to higher-dimensional cases.
Author Contributions
Methodology, Y.L. (Yanqin Liu); Formal analysis, Y.S.; Data curation, Y.X.; Writing—original draft, Y.L. (Yanan Li). All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the Natural science Foundation of Shandong Province (ZR2023MA062), the National Science Foundation of China (62103079), and the Open Research Fund Program of the Data Recovery Key Laboratory of Sichuan Province (DRN19020).
Data Availability Statement
All data reported are obtained by the numerical schemes designed in this paper.
Acknowledgments
We appreciated the support by the Natural science Foundation of Shandong Province (ZR2023MA062), the National Science Foundation of China (62103079), and the Open Research Fund Program of the Data Recovery Key Laboratory of Sichuan Province (DRN19020).
Conflicts of Interest
The authors declare that there were no conflict of interest regarding the publication of this paper.
References
- Akgul, A.; Partohaghighi, M. New fractional modelling and control analysis of the circumscribed self-excited spherical strange attractor. Chaos Solitons Fractals 2022, 158, 111956. [Google Scholar] [CrossRef]
- Nabi, K.N.; Kumar, P.; Erturk, V.S. Projections and fractional dynamics of covid-19 with optimal control strategies. Chaos Solitons Fractals 2021, 145, 110689. [Google Scholar] [CrossRef] [PubMed]
- de Sousa, F.B.; Babu, P.K.V.; Radmacher, M.; Oliveira, C.L.N.; de Sousa, J.S. Multiple power-law viscoelastic relaxation in time and frequency domains with atomic force microscopy. J. Phys. D Appl. Phys. 2021, 54, 335401. [Google Scholar] [CrossRef]
- Chen, Y.W.; Wen, G.G.; Rahmani, A.; Huang, T.W. Heterogeneous multiagent systems with different fractional order: An experience-based fusion controller. IEEE Trans. Circuits Syst. II Express Briefs 2022, 69, 3520–3524. [Google Scholar] [CrossRef]
- Dubey, V.P.; Kumar, D.; Singh, J.; Alshehri, A.M.; Dubey, S. Analysis of local fractional klein-gordon equations arising in relativistic fractal quantum mechanics. Waves Random Complex Media 2022, 32, 1–21. [Google Scholar] [CrossRef]
- Cheng, W.; Chen, R.P.; Yin, Z.Y.; Wang, H.L.; Meng, F.Y. A fractional-order two-surface plasticity model for over-consolidated clays and its application to deep gallery excavation. Comput. Geotech. 2023, 159, 105494. [Google Scholar] [CrossRef]
- Malik, S.A.; Mir, A.H. Fpga realization of fractional order neuron. Appl. Math. Model. 2020, 81, 372–385. [Google Scholar] [CrossRef]
- Gao, Y.F.; Yin, D.S.; Tang, M.; Zhao, B. A three-dimensional fractional visco-hyperelastic model for soft materials. J. Mech. Behav. Biomed. 2023, 137, 105564. [Google Scholar] [CrossRef]
- Feng, L.B.; Liu, F.W.; Turner, I.; Zheng, L.C. Novel numerical analysis of multi-term time fractional viscoelastic non-newtonian fluid models for simulating unsteady mhd couette flow of a generalized Oldroyd-B fluid. Fract. Calc. Appl. Anal. 2018, 21, 1073–1103. [Google Scholar] [CrossRef]
- Rekha, J.; Suma, S.P.; Shilpa, B.; Khan, U.; Hussain, S.M.; Zaibk, A.; Galal, A.M. Solute transport exponentially varies with time in an unsaturated zone using finite element and finite difference method. Int. J. Mod. Phys. B 2023, 37, 2350089. [Google Scholar] [CrossRef]
- Yin, B.L.; Liu, Y.; Li, H.; Zeng, F.H. A class of efficient time-stepping methods for multi-term time-fractional reaction-diffusion-wave equations. Appl. Numer. Math. 2021, 165, 56–82. [Google Scholar] [CrossRef]
- Liu, Y.; Du, Y.W.; Li, H.; Liu, F.W.; Wang, Y.J. Some second-order schemes combined with finite element method for nonlinear fractional cable equation. Numer. Algorithms 2019, 80, 533–555. [Google Scholar] [CrossRef]
- Yin, B.L.; Liu, Y.; Li, H.; Zhang, Z.M. Efficient shifted fractional trapezoidal rule for subdiffusion problems with nonsmooth solutions on uniform meshes. BIT Numer. Math. 2022, 62, 631–666. [Google Scholar] [CrossRef]
- Saffarian, M.; Mohebbi, A. Finite difference spectral element method for one and two dimensional Riesz space fractional advection dispersion equations. Math. Comput. Simulat. 2022, 193, 348–370. [Google Scholar] [CrossRef]
- Zheng, R.M.; Jiang, X.Y. Spectral methods for the time-fractional Navier-Stokes equation. Appl. Math. Lett. 2019, 91, 194–200. [Google Scholar] [CrossRef]
- Liu, Z.T.; Lu, S.J.; Liu, F.W. Fully discrete spectral methods for solving time fractional nonlinear sine-gordon equation with smooth and non-smooth solutions. Appl. Math. Comput. 2018, 333, 213–224. [Google Scholar] [CrossRef]
- Zeng, F.H.; Zhang, Z.Q.; Karniadakis, G.E. Second-order numerical methods for multi-term fractional differential equations: Smooth and non-smooth solutions. Comput. Methods Appl. Mech. Eng. 2017, 327, 478–502. [Google Scholar] [CrossRef]
- Dehghan, M.; Abbaszadeh, M. Spectral element technique for nonlinear fractional evolution equation, stability and convergence analysis. Appl. Numer. Math. 2017, 119, 51–66. [Google Scholar] [CrossRef]
- Hashemizadeh, E.; Ebrahimzadeh, A. An efficient numerical scheme to solve fractional diffusion-wave and fractional klein-gordon equations in fluid mechanics. Physica A 2018, 503, 1189–1203. [Google Scholar] [CrossRef]
- Zhang, X.; Yang, B.; Wei, C.Z.; Luo, M.K. Quantization method and Schrodinger equation of fractional time and their weak effects on Hamiltonian: Phase transitions of energy and wave functions. Commun. Nonlinear Sci. 2021, 93, 105531. [Google Scholar] [CrossRef]
- Dartora, C.A.; Zanella, F.; Cabrera, G.G. Emergence of fractional quantum mechanics in condensed matter physics. Phys. Lett. A 2021, 415, 127643. [Google Scholar] [CrossRef]
- Ghosh, U.; Banerjee, J.; Sarkar, S.; Das, S. Fractional Klein-Gordon equation composed of Jumarie fractional derivative and its interpretation by a smoothness parameter. Pramana 2018, 90, 74. [Google Scholar] [CrossRef]
- Vong, S.; Wang, Z.B. A high-order compact scheme for the nonlinear fractional klein-gordon equation. Numer. Methods Partial Differ. Equ. 2015, 31, 706–722. [Google Scholar] [CrossRef]
- Khader, M.M.; Kumar, S. An accurate numerical method for solving the linear fractional klein-gordon equation. Math. Methods Appl. Sci. 2014, 37, 2972–2979. [Google Scholar] [CrossRef]
- Saffarian, M.; Mohebbi, A. Numerical solution of two and three dimensional time fractional damped nonlinear klein-gordon equation using adi spectral element method. Appl. Math. Comput. 2021, 405, 126182. [Google Scholar] [CrossRef]
- Jin, B.; Li, B.; Zhou, Z. An analysis of the Crank-Nicolson method for subdiffusion. IMA J. Numer. Anal. 2018, 38, 518–541. [Google Scholar] [CrossRef]
- Zhang, H.; Jiang, X.Y.; Zeng, F.H. An H-1 convergence of the spectral method for the time-fractional non-linear diffusion equations. Adv. Comput. Math. 2021, 47, 63. [Google Scholar] [CrossRef]
- Zhang, H.; Zeng, F.H.; Jiang, X.Y.; Karniadakis, G.E. Convergence analysis of the time-stepping numerical methods for time-fractional nonlinear subdiffusion equations. Fract. Calc. Appl. Anal. 2022, 25, 453–487. [Google Scholar] [CrossRef]
- Zeng, F.H.; Turner, I.; Burrage, K. A stable fast time-stepping method for fractional integral and derivative operators. J. Sci. Comput. 2018, 77, 283–307. [Google Scholar] [CrossRef]
- Huang, Y.X.; Li, Q.G.; Li, R.X.; Zeng, F.H.; Guo, L. A unified fast memory-saving time-stepping method for fractional operators and its applications. Numer. Math. Theory Methods Appl. 2022, 5, 679–714. [Google Scholar] [CrossRef]
- Weideman, J. Optimizing Talbot’s contours for the inversion of the Laplace transform. SIAM J. Numer. Anal. 2006, 44, 2342–2362. [Google Scholar] [CrossRef]
- Schädle, A.; López-Fernández, M.; Lubich, C. Fast and oblivious convolution quadrature. SIAM J. Sci. Comput. 2006, 28, 421–438. [Google Scholar] [CrossRef]
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. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).