Abstract

A numerical method based on collocation points is developed to solve the nonlinear Klein-Gordon equations by using the Taylor matrix method. The method is applied to some test examples and the numerical results are compared with the exact solutions. The results reveal that the method is very effective, simple, and convenient. In addition, an error estimation of proposed method is presented.

1. Introduction

Nonlinear phenomena, that occurs in many areas of scientific such as solid state physics, plasma physics, fluid dynamics, mathematical biology and chemical kinematics, can be modeled by partial differential equations. The Klein-Gordon equation is an important class of partial differential equations and arises in relativistic quantum mechanics and field theory, which is great importance for the high energy physicist [1], and is used to model many different phenomena, including the propagation of dislocations in crystals and the behavior of elementary particles. On the other hand, the one-dimensional Klein-Gordon equation is given by partial differential equation [2]

In the present work we are dealing with the numerical approximation of the following nonlinear Klein-Gordon equation: subject to initial conditions where , are physical constants and is the time varying external input. Specially a non-zero right-hand side in the KGE naturally arises in the context when including for instance quantum gravitational effects into the model.

KGE and the various other forms of the nonlinear KGE are all well studied in various papers. The equation has attracted much attention in studying solitons and soliton perturbation theory [36]. Biswas et al. studied the adiabatic dynamics of topological as well as the non-topological solitons in presence of perturbation terms [710]. In order to obtain the exact and numerical solutions of the nonlinear KGEs, a number of methods have been proposed such as the modified decomposition method [11], the symplectic finite difference approximations method [12], the numerical scheme based on the collocation method [2], the variational iteration method [13, 14], the finite element method [15], the cubic B-spline collocation method [16], the finite difference method [17], the decomposition method [18], Exp-function method [19, 20], the homotopy perturbation method [21], the tanh method [22] and the Jacobi elliptic function method [23], the Soliton solution [2428], the stationary solutions [29] and the traveling wave solutions [30].

Since the beginning of 1994, Taylor matrix and collocation methods have been to solve linear and nonlinear ordinary differential equations, and difference equations used by Sezer et al. [7, 3136]. In this work, the mentioned Taylor methods are developed and applied to Klein-Gordon equation (2) with the initial conditions (3), and the solution is expressed in the truncated double Taylor series where , for are the coefficients to be determined. In this study we use the collocation points defined by

2. Fundamental Relations

In the numerical solution of (2) with the presented Taylor method, it is necessary to evaluate the Taylor coefficients of the unknown function. For convenience, the relation (4) can be written in the matrix form where and are and matrices, respectively, and defined as follows: so that where On the other hand, the relation between the matrix and its derivatives is where where is the identity matrix. Using the relations (6) and (10) we have

3. Method of Solution

The technique is to assume that the unknown function has an expansion in the form (4), and to attempt to determine values for the coefficients such that the required differential equation and other conditions are satisfied. To obtain numerical approximation to Klein-Gordon equation under the given conditions, we can reduce (2) and (3) to the matrix equations as follows: or briefly where By substituting the collocation points defined by (5) into (14) we have or in the compact form where

We can use the following formulas to construct the matrix representation of initial conditions (3): where

The matrix representations of nonhomogeneous terms of (3) can be written in the forms By substituting relations (21) into (3) and then simplifying the result, we get the matrix forms of conditions as To obtain the solution under the conditions, we get By solving the following nonlinear system: the unknown Taylor coefficients are determined and substituted in (4); thus we get the Taylor polynomial solution

4. Accuracy of Solution and Error Analysis

We can easily check the accuracy of the solution. Since the truncated Taylor series (4) is an approximate solution of (2), when the function and its derivatives are substituted in (2), the resulting equation must be satisfied approximately; that is, for ,  , where If max ( positive integer) is prescribed, then the truncation limit is increased until difference at each of the points becomes smaller than the prescribed . On the other hand we use different error norms for measuring errors. These error norms are defined as follows:(1),(2),(3), where (); also and are the exact and approximate solutions of the problem, respectively, and is an arbitrary time in .

5. Illustrative Examples

In this section, several numerical examples are given to illustrate the properties of the method and all of them were performed on the computer using a program written in Maple v9.

Example 1. Consider the nonlinear Klein-Gordon equation [13] with initial conditions Following the procedures in Section 2 and by substituting the obtained coefficients in equation, the solution becomes which is the exact solution.

Example 2. We next consider the nonlinear linear Klein-Gordon equation [2] with initial conditions In Table 1, the , errors and RMS of errors are obtained for different values of . The graph of analytical and numerical functions for and the absolute error graph are given in Figure 1. It is seen that the linear terms in right hand side of (28) and (31) are forced terms. By adding these terms to the homogen equations, we are trying to find the effect of the force terms on homogen solution such a way that either they are in solution forms or other types of solutions.

Example 3. In this example, we consider the nonlinear Klein-Gordon Equation (3) with cubic nonlinearity with constants , , and in the interval . The initial conditions are given by and the exact solution by (3) is where The numerical solution for Example 3 is recorded for different time levels by utilizing the proposed method. At each given time level, absolute error is shown in Table 2.

Example 4. We finally close our analysis by studying the Klein-Gordon equation [14] with initial conditions Here the exact solution of equation is (see [21]) The solution of this nonlinear system is obtained for . For numerical results, see Table 3 and Figure 2.

6. Conclusion

In this paper, a very simple but effective Taylor matrix method was proposed for the numerical solution nonlinear Klein-Gordon equation. One of the advantages of this method that the solution is expressed as a truncated Taylor series, then can be easily evaluated for arbitrary values of and by using the computer program without any computational effort. From the given illustrative examples, it can be seen that the Taylor series approach can obtain very accurate and satisfactory results. An interesting feature of this method is that the analytical solution is obtained as demonstrated in Example 1 when the exact solution is polynomial. This method can be improved with new strategies to solve the other nonlinear equations.