Numerical Solution of Nonlinear Sine-Gordon Equation by Modified Cubic B-Spline Collocation Method
Modified cubic B-spline collocation method is discussed for the numerical solution of one-dimensional nonlinear sine-Gordon equation. The method is based on collocation of modified cubic B-splines over finite elements, so we have continuity of the dependent variable and its first two derivatives throughout the solution range. The given equation is decomposed into a system of equations and modified cubic B-spline basis functions have been used for spatial variable and its derivatives, which gives results in amenable system of ordinary differential equations. The resulting system of equation has subsequently been solved by SSP-RK54 scheme. The efficacy of the proposed approach has been confirmed with numerical experiments, which shows that the results obtained are acceptable and are in good agreement with earlier studies.
In this paper we consider the one-dimensional sine-Gordon equation with initial conditions The Dirichlet boundary conditions are given by The nonlinear sine-Gordon equation arises in many different applications such as propagation of fluxion in Josephson junctions , differential geometry, stability of fluid motion, nonlinear physics, and applied sciences . The sine-Gordon equation (1) is a particular case of Klein-Gordon equation, which plays a significant role in many scientific applications such as solid state physics, nonlinear optics and quantum field theory , given by where is a nonlinear force and is a constant.
In the literature several schemes have been developed for the numerical solution of sine-Gordon equation. Ben-Yu et al.  proposed two difference schemes; Bratsos and Twizell  used method of lines to transform the initial/boundary value problem associated with (1) into a first order nonlinear initial value problem. Mohebbi and Dehghan  presented a combination of a compact finite difference approximation of fourth order and a fourth-order A-stable DIRKN method. Kuang and Lu  proposed two classes of finite difference method for generalized sine-Gordon equation; Bratsos and Twizell  presented a family of finite difference method, in which time and space derivatives are replaced by finite-difference approximations and then the equation is converted into a linear algebraic system. Wei  used the discrete singular convolution algorithm for the integration of (1). A variational iteration method to obtain approximate analytical solution of the sine-Gordon equation without any discretization has been developed by Batiha et al. . Zheng  presented a numerical solution of sine-Gordon equation defined on the whole real axis. Bratsos  used a fourth-order rational approximation to the matrix exponential term in a three-time level recurrence relation for the numerical solution of (1). Dehghan and Shokri  solved the equation using collocation points and approximate the solution using radial basis functions; Dehghan and Mirzaei  used a boundary integral equation method; Rashidinia and Mohammadi  developed two implicit finite difference schemes, by using spline function approximations. Li-Min and Zong-Min  presented a meshless scheme by using a multiquadric quasi-interpolation without solving a large-scale linear system of equations, but a polynomial was needed to improve the accuracy of the scheme, while Jiang and Wang  proposed meshless approach by directly using high accuracy MQ quasi-interpolation without using any polynomial. A modified decomposition method for explicit and numerical solutions of the sine-Gordon equation in the form of convergent power series has been proposed by Kaya . Uddin et al.  proposed a meshfree approach based on radial basis function for numerical solution of (1).
The B-spline possesses several properties such as minimal compact support and smoothness, which makes them suitable for the numerical solution of linear and nonlinear partial differential equations. B-spline with collocation provides a very simple solution procedure of differential equations. They also produce a spline function which is useful to obtain the solution at any point of the domain, while in finite difference methods [4, 6–8, 15], we can find the solution only at the selected knots. In the present method, approximate solutions of sine-Gordon equation are obtained using a modified cubic B-spline collocation method (MCBCM) in space and strong stability preserving Runge-Kutta (SSP-RK54) scheme  in time. The equation is converted into a system of partial differential equations and then, using MCBCM, it reduces into a system of ordinary differential equations. Finally we use SSP-RK54 scheme to solve the obtained system of ODEs. Numerical solution of nonlinear sine-Gordon equation has been obtained without using any transformation or without linearizing the nonlinear term.
The paper is organized as follows. In Section 2, cubic B-spline collocation method is explained. In Section 3, modified cubic B-spline basis functions are introduced and how to find the solution of (1)–(3) using these basis functions is explained. Initial vectors have been computed in Section 4. Numerical experiments are conducted in Section 5, to demonstrate the viability and the efficiency of the proposed method computationally, and results are compared with some previous results. Finally, brief conclusions drawn from the present study are presented in Section 6.
2. Description of Method
The solution domain is partitioned into a mesh of uniform length , where , such that .
In the cubic B-spline collocation method the approximate solution can be written as the linear combination of cubic B-spline basis functions for the approximation space under consideration. Our numerical treatment for solving (1) using the collocation method with cubic B-Spline is to find an approximate solution to the exact solution in the form where are the time dependent quantities to be determined from boundary conditions and collocation from the differential equation.
The cubic B-spline at the knots is given by where the set of functions forms a basis for the function defined over the region with the obvious adjustment of the boundary base functions to avoid undefined knots. Each cubic B-spline covers four elements so that an element is covered by four cubic B-splines. The values of and its derivatives are tabulated in Table 1.
3. Numerical Scheme
We have used the following modified form of cubic B-spline basis functions  in the combination with collocation, to solve the sine-Gordon equation. Modified cubic B-spline basis functions have been used for handling the Dirichlet boundary conditions and finally we obtain a diagonally dominant system of differential equations. The procedure for modifying the basis functions is given as follows:
To find the numerical solution of sine-Gordon equation (1), first it is rewritten as a pair of coupled equations using the following transformation: Then (1) transforms into a coupled system of equations as
Now for solving the couple of (10), using collocation method with modified cubic B-spline basis functions, first we assume our solution as the linear combination of modified cubic B-spline basis functions:
Using the approximate solution (11), the approximate value of can be written as where is the derivative of with respect to time .
The systems (16) represent a system of first order differential equations and can be written as where
Once the vector has been determined at a specific time level, using (7), we can compute the approximate solution at the required knots. So first we solve system (17) for vector , by using Thomas algorithm only once at each time level . Then the obtained system with the system (18) will give first order ordinary differential equations and finally first order ordinary differential equations have been solved by SSP-RK54  scheme and consequently the approximate solution is computed.
4. Computation of Initial Vector
To find the solution at specific time level , we need the initial vectors and .
Using initial conditions (2), we have the following.
4.1. Initial Vector
4.2. Initial Vector
Using the initial condition we have which gives the initial vector .
5. Numerical Experiments
In this section, we consider four numerical examples to validate the proposed scheme. The accuracy of the scheme is verified by calculating , , and root mean square errors and results are also compared with some published work.
, , and RMS error norms are given by the following formulae:
Example 1. In this example the numerical solutions of (1) are obtained in the computational domain with the initial conditions The exact solution [6, 15, 16] is given as The boundary conditions (3) are obtained from the exact solution.
Case I (when ). First we solve the above example in the computational domain with and for space step sizes . In Table 2, we report the and errors and compare them with those given in Dehghan and Shokri . We see that our results are in good agreement with , when we take . For our results are better than the result of  in terms of error. In Table 3, absolute errors, are reported at , with . A graph comparing the exact and numerical solutions at with and is depicted in Figure 1.
Case II. In the domain , the solutions of Example 1 are obtained with and . In Table 4, we report the and RMS errors at different time levels and results are compared with those of Li-Min and Zong-Min . We noticed that our results are in good agreement with  in terms of error and in terms of RMS error our results are better than . Figure 2 depicts the comparison of exact and numerical solution at .
Example 2. In this example we consider (1) in the computational domain with the initial conditions
and the exact solution [6, 15] is given by
where is the velocity of solitary wave and .
The boundary conditions (3) can be obtained from the exact solution.
In Table 5, we report and errors, for different values of with and . We also compare our results with those of Dehghan and Shokri . From Table 5, it is clear that our scheme and that of  have approximately similar errors, for . For our results are better than  in terms of errors and approximately similar in terms of error norm. We also compute error norm for different values of with at and calculate order of convergence, which is shown in Table 7. The absolute errors, for , are also reported in Table 6. Figure 3 depicts the graph between exact and numerical solutions at .
Example 3. In this example we consider nonlinear sine-Gordon equation in the computational domain with the initial conditions The exact solution [12, 19] is given as where is the velocity of solitary wave and .
The boundary conditions (3) can be obtained from the exact solution.
We solve Example 3 with , , and . Computed and errors are reported in Table 8 and compared with Uddin et al.  and Bratsos . As we see from Table 8, our results are better. In Table 9, we report and error norms for different values of with at , and using them we compute the order of convergence. It is clear that the present method is of second order of convergence. In Figure 4, we show the space-time graph of approximate solution for with and .
Example 4. Now we consider (1) in the computational domain with the initial conditions The exact solution [12, 19] is given as where is the velocity of solitary wave and . The boundary conditions (3) can be obtained from the exact solution.
We solve Example 4 with , , and and results are reported in Table 10. We compare our results with those given in Uddin et al.  and Bratsos  in terms of errors and found them better. In Table 11, we report the and error norms for different values of , with at , and using them compute the order of convergence of the method. Figure 5 depicts the space-time graph of approximate solution for with and .
This paper investigates the application of B-spline collocation method to represent the solution of sine-Gordon equation with Dirichlet's boundary conditions, by reducing it into coupled system of equations. The combination of modified cubic B-spline basis function in space and SSP-RK54 in time successfully worked to give reliable and accurate solutions of sine-Gordon equation. The numerical approximate solutions have been computed without using any transformation and linearization process. To demonstrate the accuracy and usefulness of the present scheme, four numerical experiments are carried out and results are compared with some earlier work. It is observed that the proposed method produces good results in comparison to those available in the literature. From the order of convergence calculated in Tables 7, 9, and 11, the method is shown to have a second order of convergence. The results reveal that the present method is an applicable technique and approximates the solutions very well.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.