Legendre Collocation Method for Solving Nonlinear Differential Equations

In this study, a matrix method based on Legendre collocation points on interval [-1,1] is proposed for the approximate solution of the some first order nonlinear ordinary differential equations with the mixed conditions in terms of Legendre polynomials. The method by means of Legendre collocation points, transforms the differential equation to a matrix equation which corresponds to a system of nonlinear algebraic equations with unknown Legendre coefficients. Also, the method can be used for solving Riccati equation. The numerical results show the effectuality of the method for this type of equations. Comparisons are made between the obtained solution and the exact solution.


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].These equations have also demonstrated their usefulness in ecology, economics, biology, astrophysics and engineering.Thus, methods of solution for these equations are of great importance to engineers and scientists.However many important differential equations can be solved by well known analytical techniques, a greater number of physically significant differential equations can not be solved [1,3,4].
Moreover, nonlinear differential equations play afundamental role in control theory; for example, optimal control, filtering and estimation and order reduction, etc. [5,6] .
We consider the approximate solution of the first order nonlinear ordinary differential equation (1) under the mixed condition where   ,   ,   ,   ,   and   are the functions defined on  ≤  ≤ ; the real coefficients ,  and  are appropriate constants.
Our purpose is to obtain an approximate solution of (1) in the following Legendre polynomial form where   ,  = 0,1,2, … ,  are unknown Legendre coefficients.

FUNDAMENTAL MATRIX RELATIONS
Let us consider the nonlinear differential equation ( 1) and find the matrix forms of each term in the equation.Firstly, we consider the solution () defined by a truncated series (3) and then we can convert to the matrix form where if  is even On the other hand, the matrix form of expression  2 () is obtained as where By using the expression (4), ( 5) and ( 6) we obtain Following a similar way to (6), we have where .
We can find the corresponding matrix equation for the condition (2), using the relation (4), as follows: so that We can write the corresponding matrix form (13) for the mixed condition (2) in the augmented matrix form as where To obtain the approximate solution of Eq. ( 1) with the mixed condition (2) in the terms of Legendre polynomials, by replacing the row matrix (14) by the last row of the matrix (11), we obtain the required augmented matrix: or the corresponding matrix equation where The unknown coefficients set  0 ,  1 , … ,   can be determined from the nonlinear system (15).As a result, we can obtain approximate solution in the truncated series form (3).
If max 10 −  = 10 − (  is any positive integer) is prescribed, then the truncation limit  is increased until the difference (  ) at each of the points   becomes smaller than the prescribed 10 − [7-13].

NUMERICAL EXAMPLES
In this section, two numerical examples are given to show the accuracy and efficiency of the presented method.Example 6.1.Let us first consider the first-order nonlinear differential equation with condition and the approximate solution () by the truncated Legendre polynomial where For  = 2 the collocation points become From the fundamental matrix equations for the given equation and condition respectively are obtained as The augmented matrix for this fundamental matrix equation is calculated From the obtained system, the coefficients  0 ,  1 and  2 are found as The solutions obtained for  = 3,4,5 are compared with the exact solution is   , which are given in Fig 1 .We compare the numerical solution and absolute errors for  = 3,4,5 in Table 1.A Legendre collocation method for the approximate solutions of the some first order nonlinear ordinary differential equations on the interval [-1,1] is analyzed in this study.A considerable advantage of the method is that the Legendre coefficients of the solution are found very easily by using computer programs.For this reason, this process is much faster than the other methods.Legendre collocation method gives well results for the different values N .The method can also be extended to the high order nonlinear ordinary differential equations with variable coefficients, but some modifications are required.

Table 1 .
Comparison of the absolute errors of Example 6.2