Numerical Solution of Duffing Equation by Using an Improved Taylor Matrix Method

We have suggested a numerical approach, which is based on an improved Taylor matrix method, for solving Duffing differential equations. The method is based on the approximation by the truncated Taylor series about center zero. Duffing equation and conditions are transformed into the matrix equations, which corresponds to a system of nonlinear algebraic equations with the unknown coefficients, via collocation points. Combining these matrix equations and then solving the system yield the unknown coefficients of the solution function. Numerical examples are included to demonstrate the validity and the applicability of the technique. The results show the efficiency and the accuracy of the present work. Also, the method can be easily applied to engineering and science problems.


Introduction
Nonlinear ordinary differential equations are frequently used to model a wide class of problems in many areas of scientific fields: chemical reactions, spring-mass systems bending of beams, resistor-capacitor-inductance circuits, pendulums, the motion of a rotating mass around another body, and so forth [1,2].Also, nonlinear equations which can be modeled by the oscillator equations are of crucial importance in all areas of engineering sciences [3][4][5][6][7].Thus, methods of solution for these equations are of great importance to engineers and scientists.Many new techniques have appeared in the open literature such as homotopy perturbation transform method [8], variational iteration method [9], energy balance method [10], Hamiltonian approach [11], coupled homotopy-variational formulation [12], variational approach [13], and amplitude-frequency formulation [14].
In this paper, a new method is introduced for the following model of nonlinear problems:   () +   () +  1  () +  2  3 () =  () , (1) with the initial conditions where ,  1 ,  2 , , and  are real constants.Equation (1) has been discussed in many works [15][16][17][18][19][20][21], for different systems arising in various scientific fields such as physics, engineering, biology, and communication theory.Recently Wang [19] presented the quasi-two-step method for the nonlinear undamped Duffing equation.Donnagáin and Rasskazov [15] studied a modification of the Duffing equation describing a periodically driven iron pendulum in nonuniform magnetic field.Feng [16] illustrated a connection between the Duffing equation and Hirota equation and obtained two periodic wave solutions in terms of elliptic functions of the Hirota equation, by using the exact solution of Duffing equation.A direct method to find the exact solution to the damped Duffing equation and traveling wave solutions to the reaction-diffusion equation was used by Feng [17].In addition, the solution of the Duffing equation in nonlinear vibration problem by using target function method was investigated by Chen [18].The Laplace decomposition method for numerical solution of Duffing equation has been introduced by Yusufoglu [20] and Khuri [21].On the other hand, Duffing differential equations have also been effectively dealt in many works [22][23][24][25][26][27][28][29].
The aim of this study is to get solution as truncated Taylor series centered about zero defined by which is Taylor polynomial of degree  at  = 0, where   ,  = 0, 1, ...,  are unknown Taylor coefficients to be determined.

Fundamental Relations
In this section we convert the expressions defined in ( 1) and (2) to the matrix forms by the following procedure.Firstly, the function () defined by (3) can be written in the matrix form where On the other hand, it is clearly seen that the relation between the matrix X() and its derivative X  () is where From the matrix equations ( 4) and (6), it follows that By using the production of two series, the matrix form of expression  2 () is obtained as where Similarly, the matrix representation of  3 () becomes where Finally, by substituting the matrix forms ( 4)-( 11) into (1) we have the fundamental matrix equation

Method of the Solution
To obtain the Taylor polynomial solution of (1) in the form (3) we firstly compute the Taylor coefficients by means of the collocation points defined by By substituting the collocation points into matrix equation ( 13) we obtain the system of matrix equations or compact notation Briefly, we can write the matrix equation which corresponds to a system of ( + 1) nonlinear algebraic equations with the unknown Taylor coefficients   ,  = 0, 1, ..., .The matrices in (17) are as follows: where . . .
The augmented matrix for (17) becomes, clearly, Next, by means of relations ( 4) and ( 8), we can obtain the corresponding matrix forms for the initial conditions (2) as Consequently, to obtain the solution of (1) under the conditions (2), by replacing the row matrices ( 21) by the last two rows of the augmented matrix (20), we have the required augmented matrix or By solving the matrix equation ( 22), the unknown Taylor coefficients   are determined.Thus we get the Taylor polynomial solution

Error Bound and Accuracy of the Solution
We can easily check the accuracy of the solution   () as follows.Since the Taylor polynomial (3) is an approximate solution of ( or   (  ) ≤ 10 −  (  positive integer).
If max (10   ) = 10 − ( positive integer) is prescribed, then the truncation limit  is increased until the difference   (  ) at each of the points becomes smaller than the prescribed 10 − .On the other hand, the error can be estimated by means of the function If   () → 0, when  is sufficiently large enough, then the error decreases.Also if we know the exact solution of problem, we can find error bound of method.
Theorem 1 (Lagrange error bound).Let f be function such that it and all of its derivatives are continuous, and   () is the nth Taylor polynomial for () centered  = ; then the error is bounded by where  = max | (+1) ()|,  ∈ (, ).If   is approximate solution of the matrix method and   () is the th Taylor polynomial for (), we can write |  −   | = , and absolute error function of the method is | −   | =   .To obtain error bound by Theorem 1 we have Therefore we can write which gives us error bound.

Numerical Examples
The method of this study is useful in finding the solutions of Duffing equations in terms of Taylor polynomials.We illustrate it by the following examples.Numerical computations have been done using Maple 9.
Example 1.Consider the Duffing equation in the following type [20]: with the initial conditions We assume that the problem has a Taylor polynomial solution in the form , where  = 5, 8, and 10.
We have similar results for Example 3 as in Example 2. Table 4 shows the error values   (  ) for  = 5, 8, 10, and 20.

Conclusion
In this paper, a very simple but effective Taylor matrix method was proposed for the numerical solution of the nonlinear   Duffing equation.One of the advantages of this method that is the solution is expressed as a truncated Taylor series, then () can be easily evaluated for arbitrary values of  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.However, the main point is that the polynomial expansion is highly ill-posed when  is larger than 1.This method can be improved with new strategies to solve the other nonlinear equations.

Figure 1 :
Figure 1: (a) Comparison of the approximate solution with exact solution for  = 10.(b) Comparison of absolute errors for  = 5, 8, and 10.

Table 1 :
Comparison of the absolute errors of Example 1.

Table 2 :
Numerical results of Example 2.

Table 3 :
Comparison of numerical solutions.

Table 4 :
Comparison of the absolute errors of Example 3.