Abstract
The main aim of this paper is to apply the polynomial wavelets for the numerical solution of nonlinear Klein-Gordon equation. Polynomial scaling and wavelet functions are rarely used in the contexts of numerical computation. A numerical technique for the solution of nonlinear Klein-Gordon equation is presented. Our approach consists of finite difference formula combined with the collocation method, which uses the polynomial wavelets. Using the operational matrix of derivative, we reduce the problem to a set of algebraic equations by expanding the approximate solution in terms of polynomial wavelets with unknown coefficients. An estimation of error bound for this method is investigated. Some illustrative examples are included to demonstrate the validity and applicability of the approach.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
1 Introduction
In this work, we are dealing with the numerical solutions of the following nonlinear partial differential equation, namely a Nonlinear Klein-Gordon equation:
subject to the initial conditions
and Dirichlet boundary condition
where \(\alpha \), \(\beta \) and \(\gamma \) are nonzero real constants and f is a known analytic function. Nonlinear phenomena occur in a wide variety of scientific applications such as plasma physics, solid state physics, fluid dynamics and chemical kinetics [1]. The nonlinear Klein-Gordon equation is one of the important models in quantum mechanics and mathematical physics. The equation has received considerable attention in studying solitons and condensed matter physics, in investigating the interaction of solitons in collisionless plasma, the recurrence of initial states, and in examining the nonlinear wave equations [2].
There are a lot of studies on the numerical solution of initial and initial-boundary problems of the linear or nonlinear Klein-Gordon equation. For instance, Chowdhury and Hashim [3] employed the homotopy-perturbation method to obtain approximate solutions of the Klein-Gordon and sine-Gordon equations. Four finite difference schemes for approximating the solution of nonlinear Klein-Gordon equation were discussed in [4]. Deeba and Khuri [5] presented a decomposition scheme for obtaining numerical solutions of the Eq. (1). In [6], a spline collocation approach for the numerical solution of a generalized nonlinear Klein-Gordon equation was investigated. Dehghan and Shokri [7] proposed a numerical scheme to solve the one-dimensional nonlinear Klein-Gordon equation with quadratic and cubic nonlinearity using the collocation points and approximating the solution by Thin Plate Splines radial basis functions. Authors in [8] considered a numerical method based on the cubic B-splines collocation technique on the uniform mesh points. Lakestani and Dehghan [9] presented two numerical techniques. The first one is Mixed Finite Difference in time and Collocation Methods using cubic B-spline functions in space (MFDCM) and the second one is fully Collocation Method (CM) which approximates the solution in both space and time variables using cubic B-spline functions. A fully implicit and discrete energy conserving finite difference scheme for the solution of an initial-boundary value problem of the nonlinear Klein-Gordon equation derived by Wong et al. [10]. A three-level spline-difference scheme to solve the one dimensional Klein-Gordon equation which is based on using the finite difference approximation for the time derivative and the spline approximation for the second-order spatial derivative was derived by authors in [11]. Most recently, authors in [12] proposed a spectral method using Legendre wavelets.
In this article we study the application of polynomial scaling functions and wavelets for computation of numerical solution of nonlinear Klein-Gordon equation. A numerical technique based on the finite difference and Collocation methods is presented. At the first stage, our method is based on the discretization of the time variable by means of the Crank-Nicolson method and freezing the coefficients of the resulting ordinary differential equation at each time step. At the second stage, we use the Wavelet-Collocation method on the yield linear ordinary differential equations at each time step resulting from the time semidiscretization. Considering this basis being wavelet functions, our method is essentially a spectral method.
Polynomial scaling and wavelet functions are rarely used in the contexts of numerical computation [13]. One of the advantages of using polynomial scaling function as expansion functions is the good representation of smooth functions by finite Chebyshev expansion. The Crank-Nicolson method is an unconditionally stable, implicit numerical scheme with second-order accuracy in both time and space. Our approach consists of reducing the Klein-Gordon equation to a set of algebraic equations by expanding the approximate solution in terms of wavelet functions with unknown coefficients. The operational matrix of derivative is presented. This matrix together with the Collocation method are then utilized to evaluate the unknown coefficients of the solution at each time step. Finally, the convergence analysis of the proposed method for the Eq. (1) is developed.
The organization of this paper is as follows. In Sect. 2, we describe the polynomial scaling and wavelet functions on \(\left[ -1,1\right] \) and some basic properties. In Sect. 3, the proposed method is used to approximate the solution of the problem. As a result, a set of algebraic equations is formed and a solution of the considered problem is introduced at each time step. In Sect. 4, the error bounds of the method based on the Crank-Nicolson and polynomial wavelets are presented. In Sect. 5, we discuss the accuracy and efficiency of the employed method by applying to several test problems. A brief conclusion is given at the end of the paper in Sect. 6.
2 Preliminary
In this section, we shall give a brief introduction of the polynomial wavelets on \([-1,1]\) and their basic properties [14]. Also the construction of the operational matrix of the derivative and some approximation results [15] are presented.
2.1 Polynomial Wavelets
Suppose that \(T_{n}\) and \(U_{n}\) be the following Chebyshev polynomials of the first and second kind respectively,
here to introduce polynomial scaling function we need \(\omega _{j}\) which is defined as:
The zeros of \(\omega _j(x)\) are \(x_k=\cos (\frac{k\pi }{2^j})\) for \( k=0,1,\ldots ,2^j\) and it should be pointed out that the zeros of \(\omega _j\) are also zeros of \(\omega _{j+1}\).
Let
for any \(j\in \mathbb {N}_{0}=\mathbb {N}\cup \{0\}\), the polynomial scaling functions are defined as:
Given \(j\in \mathbb {N}_{0}\), the space of polynomial scaling functions on \( [-1,1]\) is defined by \(V_{j}=\text {span}\{\phi _{j,l}:l=0,1,\ldots ,2^{j}\}\).
It is easy to see that the spaces \(V_{j}=\Pi _{2^{j}}\) where \(\Pi _{n}\) denotes the set of all polynomials of degree at most n. The interpolatory property of this functions which helps to accelerate the computations is:
The wavelet spaces are defined by \(W_{j}=\text {span}\{\psi _{j,l}:l=0,1,\ldots ,2^{j}-1\}\), where
The same interpolating property holds with the zeros of \(\omega _{j+1}\) as:
We note that \(\mathrm {dim}W_{j}=2^{j}\) and \(\mathrm {dim}V_{j}=2^{j+1}\), also for all \(j\in \mathbb {N}_{0}\) we have \(V_{j+1}=V_{j}\oplus W_{j}\) and by denoting \(W_{-1}\) as \(V_{0}\) we obtain
2.2 Function Approximation
For any \(j\in \mathbb {N}_{0}\), the operator \(L_{j}\) mapping any real-valued function f(x) on \([-1,1]\) into the space \(V_{j}\) by the Lagrange formula
where U and \(\varPhi _{j}\) are vectors with \(2^{j}+1\) components as:
Considering (6) it follows that
where \(\phi _{0,k}(x)\) and \(\psi _{l,i}(x)\) are scaling and wavelet functions, respectively, and C and \(\varPsi _{j-1}\) are vectors with \(2^{j}+1\) components as:
The vector C can be obtained by considering,
where \(\mathbf {G}\) is a \((2^{j}+1)\times (2^{j}+1)\) matrix, which can be determined as follows. Using the two scale relations and decomposition between polynomial scaling and wavelet functions represented in [14, pp. 100 ], we have
where \(\lambda _{j-1}\) is a \((2^{j-1}+1)\times (2^{j}+1)\) matrix and \(\mu _{j-1}\) is a \((2^{j-1})\times (2^{j}+1)\) matrix. Following [16] and by using Eqs. (13) and (14), we obtain
By using Eqs. (13) and (7), we get
so that we have \(C^{T}=U^{T}\mathbf {G}^{-1}\).
Interpolation properties of polynomial scaling functions could help to obtaining the coefficients very fast, because it just needs to replacing the variable of function by the zeros of \(\omega _{j}(x)\) and no need of integration. In the rest of the paper for simplicity and abbreviation we denote \(\varPhi _{j}(x)\) and \(\varPsi _{j-1}(x)\) by \(\varPhi (x)\) and \(\varPsi (x)\), respectively.
2.3 Operational Matrix of Derivative
Polynomial scaling functions operational matrix of derivative was derived in [15]. Here, we just list the theorem and a corollary as follows.
Theorem 1
The differentiation of vector \(\varPhi (x)\) in (9) can be expressed as:
where \(D_{\phi }\) is \((2^{j}+1)\times (2^{j}+1)\) and the entries of operational matrix of derivative for polynomial scaling functions \(D_{\phi }\) are:
Proof
See [15].
Corollary 2
Using matrix \(\mathbf {G}\) the operational matrix of derivative for polynomial wavelets can be represented as:
3 The Polynomial Wavelet Method (PWM)
In this section, we solve nonlinear partial differential equation (1) on a bounded domain. For this end, we use finite difference method for one variable to reduce these equations to a system of ordinary differential equations, then we solve this system and find the solution of the given Klein-Gordon equation at the points \(t_n=n\delta t\) for \(\delta t=\frac{T-0}{ N}\), \(n=0, 1, \ldots , N\).
In order to perform temporal discretization, we discretize (1) according to the following \(\theta \)-weighted type scheme
where \(\delta t\) is the time step size and \(u^{n+1}\) is used to show \( u(x,t+\delta t)\). By choosing \(\theta =\frac{1}{2}\) (Crank-Nicolson scheme) and rearranging Eq. (17) we obtain
Using Eq. (7), the approximate solution for \(u^{n}(x)\) via scaling functions is represented by formula
where vectors \(\mathbf {U}_{n}\) and \(\varPhi (x)\) are defined as (8) and (9) respectively.
For the derivatives of \(u^{n}(x)\) by using (15) we can write the following relations,
Replacing Eqs. (19) and (21) in Eq. (18) we obtain
Substituting Eq. (13) into Eq. (22), we change current base to the polynomial wavelets bases
By collocating Eq. (23) in the points \(x_{k}=\cos (\frac{k\pi }{2^{j}} ),\ k=0,1,\ldots ,2^{j},\) we get,
which represents a system of \((2^{j}+1)\times (2^{j}+1)\) equations.
Because the rank of matrix \(D_{\phi }\) is \(2^{j}\) and the rank of \(D_{\phi }^{2}\) is \(2^{j}-1\) we replace Eqs. (25)–(26) instead of first and last equations of the system (24), so we finally obtain a following matrix form of equations,
where \(\mathscr {A}_{n}\) is a matrix with dimension \((2^{j}+1)\times (2^{j}+1) \) as,
and
with
Using the first initial condition of Eq. (2), we have
By using the second initial condition of Eq. (2), one can get
Equation (29) can be rewritten as
Equation (27) using Eqs. (28) and (30) as the starting points, gives the system of equations with \(2^{j}+1\) unknowns and equations, which can be solved to find \(\mathbf {U}_{n+1}\) in any step \(n=1,2,\ldots \). So the unknown functions \(u(x,t_{n})\) in any time \(t=t_{n},n=0,1,2,\ldots \) can be found.
4 Error Bounds
Here we give the error analysis of the method presented in the previous section for the Nonlinear Klein-Gordon equation. Suppose that BV be the set of real valued functions \(\mathscr {P}:\mathbb {R}\longrightarrow \mathbb {R }\) with bounded variation on \([-1,1]\). The value \(V(\mathscr {P}(x))\) is defined as total variation of \(\mathscr {P}(x)\) on \([-1\ 1]\). Let for the given weight function \(w(x)=\frac{1}{\sqrt{1-x^{2}}}\), and for \(2\le p<\infty \), we define
Here we need to recall two corollaries from [17].
Corollary 3
Let \(p\ge 2\), \(\mathscr {P}^{(s)} \in BV\) and \(0\le s\le 2^j\) then,
Corollary 4
Let \(p\ge 2\), \(0\le l\le s\) and \(\mathscr {P}^{(s)} \in BV\), then for the interpolatory polynomial based on the zeros of the Jacobi polynomial we have,
In the above corollaries \(\xi \) is constant depends on s.
We consider Eq. (18) as an operator equation in the form
where \(\mathscr {I}\) is an identity operator and
For the operator equation (33) the approximate equation is
System (34) may be solved numerically to yield an approximate solution equation (1) at each level of time given by the expression \( u^{n+1}_{j}=\mathbf {U}_{n+1}^T\varPhi (x)\). Next Lemma will give the approximation results of the differential operator, and then the total error bound for \(||E^{n+1}_j||_p=|| u^{n+1}-u^{n+1}_j ||_p\) will be presented.
Lemma 5
If \(\left( u^{n+1}\right) ^{(s)}\in BV\), \(s\ge 0\) then for the operator \(\mathscr {D}\) we have
Proof
Using (32) by considering \(l=2\) we have
Theorem 6
If \(u^{n+1}\) and \(u_{j}^{n+1}\) be the exact and approximate solution of (1) at each level of time \(n+1\) respectively, also assume that the operator \(\mathscr {H}=(1+\frac{\beta (\delta t)^{2}}{2}) \mathscr {I}+\frac{\alpha (\delta t)^{2}}{2}\mathscr {D}\) has bounded inverse and \(\left( u^{n+1}\right) ^{(s)},F^{(s)}\in BV\), \(s\ge 0\), then
where
so for \(s\ge 4\) we ensure the convergence when j goes to the infinity.
Proof
Subtracting Eq. (34) form (1) yields
provided that \(\mathscr {H}^{-1}\) exists and bounded, we obtain the error bound
where \(\Vert (L_{j}\mathscr {H})^{-1}\Vert _{p}=\Vert \left( (1+\frac{\beta (\delta t)^{2}}{2})I+\frac{\alpha (\delta t)^{2}}{2}D_{\phi }^{2}\right) ^{-1}\Vert _{p}.\)
Furthermore, by using Lemma 5 and relation (31), we have
and
Substituting Eqs. (40)–(41) in (36), we have
By choosing \(C=max\left\{ C_{1}|\frac{\alpha (\delta t)^{2}}{2}|,C_{2}|1+ \frac{\beta (\delta t)^{2}}{2}|,C_{3}\right\} \) finally we can obtain
Remark 7
We know that the order of accuracy for the Crank-Nicolson method is \( O(\delta t^{2})\). Therefore total error bound can be represented as
5 Numerical Examples
In this section, we give some computational results of numerical experiments with method based on applying the technique discussed in Sect. 3 to find numerical solution of nonlinear Klein-Gordon equation and compare our results with exact solutions and those already available in literature [7, 12]. In order to test the accuracy of the presented method we use the error norms \(L_{2}\), \(L_{\infty }\) and Root-Mean-Square (RMS) through the examples. The numerical computations have been done by the software Matlab.
Example 8
As the first test problem, we consider the nonlinear Klein-Gordon equation (1) with quadratic nonlinearity as
The provided parameters are \(\alpha =-1\), \(\beta =0\) and \(\gamma =1\) in the interval \([-1,1]\) and the initial conditions are given by
with the Dirichlet boundary condition
The analytical solution is given in [7] as \(u(x,t)=x\cos (t).\) The prescribed Dirichlet boundary function h(x, t) can be extracted from the exact solution. The \(L_{2}\), \(L_{\infty }\) and RMS errors by applying method discussed in Sect. 3 for \(j=3\), in different times and \(\delta t=0.0001\) are presented in Table 1 and compared with the RBFs method proposed in [7]. As it can be shown from Table 1, our method (PWM) is more accurate than RBFs method while PWM uses much less number of grid points (9 grid points) in comparison with RBFs which uses 100 grid points. Figure 1, shows the graph of errors in the computed solution and approximate solution for \(\delta t=0.0001\) and \(j=3\). The graph of errors in the computed solution for different values of time and \(\delta t=0.0001\), \(j=3\) are plotted in Fig. 2.
Example 9
This illustrated example presents the nonlinear Klein-Gordon equation (1) and cubic nonlinearity as
The provided parameters are \(\alpha =-1\), \(\beta =1\) and \(\gamma =1\) in the interval \([-1,1]\) with the initial conditions are given by
with the Dirichlet boundary condition
The analytical solution is given in [7, 12] as \(u(x,t)=x^{2}\cosh (x+t)\). We extract the boundary function h(x, t) from the exact solution. The \(L_{2}\), \(L_{\infty }\) and RMS errors by applying method discussed in Sect. 3 for \(j=3\), in different times and \(\delta t=0.0001\) are presented in Table 2 and compared with the Legendre wavelets spectral collocation method (LWSCM) [12]. As it can be seen from Table 2, our method is accurate than LWSCM while PWM uses 9 number of Polynomial wavelet basis functions in comparison with LWSCM which uses 24 number of Legendre wavelet basis. On the other hand, the accuracy of our results remains consistent when the time increases, which is the advantage of using PWM, but in the case of LWSCM the accuracy decreases fastly. Figure 3, shows the graph of errors in the computed solution for different values of time and \(\delta t=0.0001\), \(j=3\). The graph of errors in the computed solution and approximate solution for \(\delta t=0.0001\) and \(j=3\) are plotted in Fig. 4.
6 Conclusion
A numerical method was employed successfully for the Nonlinear Klein-Gordon equation. This approach is based on the Crank-Nicolson method for temporal discretization and the Wavelet-Collocation method in the spatial direction. After temporal discretization, the operational matrix of derivative along with a collocation method, is used to reduce the considered problem to the corresponding systems of algebraic equations at each time steps. One of the advantages of using polynomial wavelets is that the effort required to implement the method is very low, while the accuracy is high. The convergence analysis is developed. The method is computationally attractive and applications are demonstrated through illustrative examples.
References
Ablowitz, M.J., Clarkson, P.A.: Solitons, Nonlinear Evolution Equations and Inverse Scattering. Cambridge University Press, Cambridge (1990)
Dodd, R.K., Eilbeck, J.C., Gibbon, J.D., Morris, H.C.: Solitons and Nonlinear Wave Equations. Academic, London (1982)
Chowdhury, M.S.H., Hashim, I.: Application of homotopy-perturbation method to Klein-Gordon and sine-Gordon equations. Chaos, Solitons Fractals 39(4), 1928–1935 (2009)
Jiminez, S., Vazquez, L.: Analysis of four numerical schemes for a nonlinear Klein-Gordon equation. Appl. Math. Comput. 35, 61–94 (1990)
Deeba, E., Khuri, S.A.: A decomposition method for solving the nonlinear Klein-Gordon equation. J. Comput. Phys. 124, 442–448 (1996)
Khuri, S.A., Sayfy, A.: A spline collocation approach for the numerical solution of a generalized nonlinear Klein-Gordon equation. Appl. Math. Comput. 216, 1047–1056 (2010)
Dehghan, M., Shokri, A.: Numerical solution of the nonlinear Klein-Gordon equation using radial basis functions. J. Comput. Appl. Math. 230, 400–410 (2009)
Rashidinia, J., Ghasemi, M., Jalilian, R.: Numerical solution of the nonlinear Klein-Gordon equation. J. Comput. Appl. Math. 233, 1866–1878 (2010)
Lakestani, M., Dehghan, M.: Collocation and finite difference-collocation methods for the solution of nonlinear Klein-Gordon equation. Comput. Phys. Commun. 181, 1392–1401 (2010)
Wong, Y.S., Chang, Q., Gong, L.: An initial-boundary value problem of a nonlinear Klein-Gordon equation. Appl. Math. Comput. 84, 77–93 (1997)
Rashidinia, J., Mohammadi, R.: Tension spline approach for the numerical solution of nonlinear Klein-Gordon equation. Comput. Phys. Commun. 181, 78–91 (2010)
Yin, F., Tian, T., Song, J., Zhu, M.: Spectral methods using Legendre wavelets for nonlinear Klein/Sine-Gordon equations. J. Comput. Appl. Math. 275, 321–334 (2015)
Maleknejad, K., Khademi, A.: Filter matrix based on interpolation wavelets for solving Fredholm integral equations. Commun. Nonlinear. Sci. Numer. Simulat. 16, 4197–4207 (2011)
Kilgore, T., Prestin, J.: Polynomial wavelets on the interval. Constr. Approx. 12, 95–110 (1996)
Rashidinia, J., Jokar, M.: Application of polynomial scaling functions for numerical solution of telegraph equation. Appl. Anal. (2015). doi:10.1080/00036811.2014.998654
Lakestani, M., Razzaghi, M., Dehghan, M.: Semiorthogonal spline wavelets approximation for Fredholm integro-differential equations. Math. Probl. Eng. 1–12 (2006)
Prestin, J.: Mean convergence of Lagrange interpolation. Seminar Analysis, Operator Equation and Numerical Analysis 1988/89, pp. 75–86. Karl-WeierstraB-Institut für Mathematik, Berlin (1989)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Rashidinia, J., Jokar, M. (2016). Numerical Solution of Nonlinear Klein-Gordon Equation Using Polynomial Wavelets. In: Anastassiou, G., Duman, O. (eds) Intelligent Mathematics II: Applied Mathematics and Approximation Theory. Advances in Intelligent Systems and Computing, vol 441. Springer, Cham. https://doi.org/10.1007/978-3-319-30322-2_14
Download citation
DOI: https://doi.org/10.1007/978-3-319-30322-2_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-30320-8
Online ISBN: 978-3-319-30322-2
eBook Packages: EngineeringEngineering (R0)