eu SOLUTION OF SECOND ORDER LINEAR AND NONLINEAR ORDINARY DIFFERENTIAL EQUATIONS USING LEGENDRE OPERATIONAL MATRIX OF DIFFERENTIATION

Following the approach of [9], in this paper, an approach using Tau method based on Legendre operational matrix of differentiation has been introduced for solving general form of second order linear and nonlinear ordinay differential equations. With the implementation of this scheme the actual problem is converted into a system of algebraic equations, whose solutions are the Legendre coefficients. Some illustrative examples are also given to demonstrate the validity and efficiency of the method. Received: March 10, 2014 c © 2014 Academic Publications, Ltd. url: www.acadpubl.eu Correspondence author 286 C.Y. Jung, Z. Liu, A. Rafiq, F. Ali, S.M. Kang AMS Subject Classification: 65L99


Introduction
Most problems in mathematical physics, engineering, astrophysics and many physical phenomina are governed by differential equations.The exact analytical solutions of such problems, except a few, are difficult to obtain.Many researchers have made attempts to rectify this problem and are able to develop new techniques for obtaining solutions which convincingly approximate the exact solution (see [3], [4], [12], [15] and references therein).Recently, the techniques like variational iteration method [6], Adomion decomposition method [1], [7] and homotopy perturbation method [14] have been exercised by the researchers.Singular initial value problems modeled by second order nonlinear ordinary differential equations have been a scorching topic for various mathematicians and physists during the recent years.Some researchers have studied the special cases of one specific equation in this category, the Lane-Emden type equation y ′′ (x) + α x y ′ (x) + f (x, y) = g(x), α, x ≥ 0 (1.1) with the initial conditions y(0) = a and y ′ (0) = 0, ( where the prime denotes the differentiation with respect to x, a is a constant, f (x, y) and g(x) are nonlinear continuous functions.Lane-Emden type equation is a nonlinear differential equation which has singularity at the origin and describes the equilibrium density distribution in self-gravitating sphere of polytrophic isothermal gas.This equation is primarily importent in the field of stellar structure, radiative cooling and modeling of clusters of galaxies.It is known that the analytic solution of equation (1.1) is possible [5] in the neighbourhood of its singular point.
The aim of this paper is to find the solution of the generalized form of equation (1.1), i.e., with suitable initial conditions.We have applied Tau method based on Legendre operational matrix of differentiation to find the solution of equation (1.6).In Section 3, we give some examples by taking different values of p (x) , f (x, y) and g (x) to illustrate the validity and efficiency of our method.

Legendre Polynomials and its Operational Matrix of Differentiation
The Legendre polynomials of order m are defined on the interval [−1, 1] and are denoted by L m (t).These polynomials can be determined with the help of following recurrence relation By taking t = 2x − 1, the so called shifted Legendre polynomials can be defined on the interval t ∈ [0, 1].Let the shifted Legendre polynomials L m (2x − 1) be denoted by P m (x).Then P m (x) can be obtained as follows where P 0 (x) = 1 and P 1 (x) = 2x − 1.The analytic form of the shifted Legendre polynomials P m (x) of degree m are given by , can be approximated as a sum of shifted Legendre polynomials as where In general, the series in equation (2.4) can be truncated with the first (N + 1) shifted Legendre polynomials as where The operational matrix of derivative of the shifted Legendre polynomials set ϕ(x) is defined as [13]: where D (1) is the (N + 1) × (N + 1) operational matrix of derivative given as where For example for even N we have From equation (2.7), it can be generalized for any n ∈ N as

Application of the Method
In this section, we derive the method for solving general second order linear and non-linear differential equations.Let us consider the general second order non-linear differential equation with initial conditions y(0) = a and y ′ (0) = b.
Approximating y(x), p(x), f (x, y) and g(x) by the shifted Legendre polynomials as where the unknowns are Using Legendre operational matrix of differentiation, equation (1.6) can be written as (3.5) The residual R N (x) for equation (3.5) can be written as Applying typical Tau method, which is used in the sense of a particular form of the Petrov-Galerkin method [2], [10], [13], equation (3.5) can be transformed into N − 2 nonlinear equations by applying The initial condition are given by Equations (3.7) and (3.8) generate N + 1 nonlinear algebraic equations.By solving these equations, unknowns in vector C can be calculated.Thus, we can find the solution y (x) .

Results
In this section, we apply the method presented in the previous section to solve some general second order nonlinear differential equations.
Example 4.1.We consider the differential equation with initial condition y (0) = 0 and y ′ (0) = 0. (4. 2) The exact solution of the problem is y (x) = x 2 .Now we apply our method for N = 2 to illustrate the validity of our method.
From equation (2.8), we have Therefore, using equation (3.7), we get by applying initial conditions from equation (4.2), we have Solving equations (4.4) to (4.5), we get Hence the solution is obtained as which is the exact solution.That is by using only first three shifted Legendre polynimials, we have obtained the exact solution.The exact solution in this case is y (x) = x 2 .Approximating cos x by 1 and taking N = 2, we get the following algebraic equations Solving equations from (4.8) to (4.9), we get and hence the solution is y(x) = x 2 , which is the exact solution.
For N = 2, we get the following three algebraic equations ) Solving equations (4.12) to (4.13), we obtain and hence the solution is y(x) = x 2 , which is again the exact solution.
Example 4.4.Now, we consider the differential equation whose exact solution is in linear form, i.e., y (x) = x.y ′′ (x) + e x y ′ (x) + e y = 2e x , ( with initial condition y (0) = 0 and y ′ (0) = 1.( For N = 1, p (x) = e x , f (x, y) = e y and g (x) = 2e x , we obtain two equations by using equation (4.15) only, i.e., c 0 − c 1 = 0 and 2c 1 = 1. (4.16) From equation (4.16), we get Hence the solution is y (x) = x, which is the exact solution.The exact solution of the problem is y (x) = cos x.Approximating sin x with x − x 3 6 and cos x by 1 − x 2 2 and taking N = 2, we get the following equations: which gives the approximate solution of the differential equation (4.17) as y(x) = 1 − 30 71 x 2 and if we approximate sin x with x and cos x by 1, then the approximate solution becomes y(x) = 1 − 6 14 x 2 .It is notable that by taking N = 3 and approximating sin x with x − x 3 6 and cos x by 1 − x 2 2 , we obtain better approximation to the solution as y(x) = 1 − 585 1087 x 2 + 85 1087 x 3 .So, one can observe that by increasing the value of N, we get more terms in the series solution and hence better approximation to the exact solution.
Example 4.6.The series solution of the differential equation y ′′ (x) + 2 x y ′ (x) + e xy 2 = x + 1 with initial conditions y (0) = 0 and y ′ (0) = 0 is obtained in [11] as y(x) = The exact solution of the problem is y (x) = x 2 .Now, by approximating e y with 1 + y and for N = 2, we get the following three algebraic equations.which is an approximate solution.

Conclusion
From the examples given in Section 3, we note that for different values of the functions p (x) , f (x, y) and g (x), equation (1.6) can be solved by taking N = 2, and using only first few shifted Legendre polynomials.In most of the cases, when the exact solution is in the form of a polynimial, we obtain the exact solution by applying our method.A good approximation to the exact solution is found otherwise.For the differential equations whose exact solution is a trigonometric function, we get better approximation by increasing the value of N , because with the increase in the value of N, we get more terms in the series solution.