New Implementation of Legendre Polynomials for Solving Partial Differential Equations

In this paper we present a proposal using Legendre polynomials approximation for the solution of the second order linear partial differential equations . Our approach consists of reducing the problem to a set of linear equations by expanding the approximate solution in terms of shifted Legendre polynomials with unknown coefficients . The performance of presented method has been compared with other methods , namely Sinc-Galerkin , quadratic spline collocation and LiuLin method . Numerical examples show better accuracy of the proposed method . Moreover , the computation cost decreases at least by a factor of 6 in this method .


Introduction
There are several applications of partial differential equations (PDEs) in science and engineering [1,2].Many physical processes can be modeled using PDEs .Analytical solution of PDEs , however , either does not exist or is difficult to find .Recent contribution in this regard includes meshless methods [3], finite-difference methods [4], Alternating-Direction Sinc-Galerkin method (ADSG) [5] , quadratic spline collocation method (QSCM) [6] , Liu and Lin method [7] and so on .
Orthogonal functions and polynomials have been employed by many authors for solving various PDEs.The main idea is using an orthogonal basis to reduce the problem under study to a system of linear algebraic equations.This can be done by truncated series of orthogonal basis functions for the solution of problem and using the collocation method.
In this paper, we have applied a method based on Legendre polynomials basis on the unit square.This method is simple to understand and easy to implement using computer packages and yields better results.Comparative studies of CPU time of present method and other methods such as Sinc-Galerkin method, quadratic spline collocation method and Liu-Lin method are also presented.Numerical tests exhibit better accuracy of our proposed method based on Legendre polynomials.Moreover, time for computation decreases at least more than 6 folds.
This paper is organized as follows.In Section 2, we present some properties of Legendre polynomials.Section 3 describes the proposed technique for solution of PDEs.Section 4 is devoted to some experimental results and the paper is concluded with a summery in Section 5.

Preliminaries and Notation
The Legendre polynomials ; are the eigenfunctions of the singular Sturm-Liouville problem The Legendre polynomials satisfy the recursion relation 0,1 , may be expanded in terms of shifted Legendre polynomials as where the coefficients are given by terms shifted Legendre polynomials are considered.Then we set of two independent variables defined for may be expanded in terms of double shifted Legendre polynomials as where the coefficient are given by For further properties of Legendre polynomials referred to [8,9].

Solution of Second-Order Linear PDEs
Consider the following second-order linear PDEs on the unit square,   2 0,1 : where and , , , ,  a b c d g f are known functions.With Dirichlet boundary conditions: where are known functions.We introduce the following notations: We assume that the second order partial derivatives can be expressed by Legendre polynomials series as given below: The following collocation points are considered: After integrating from "Equation ( 4)" we obtain Now by integrating from "Equation ( 8)" in the interval Substituting "Equation ( 9)" in "Equation ( 7)", yields


Now by integrating this equation from to 0 x , we have

y u y x u y u y a P y P x xC
Thus by substituting "Equation ( 2)" in this equation, we obtain Similarly for "Equation ( 5)", we have Equating "Equation ( 11)" and "Equation ( 12)", and substituting the collocation points we obtain   2 1 M  equations.Another equations are obtained by substituting the expressions of and its partial derivatives into given differential "Equation ( 1)".These two sets of equations are solved simultaneously for the unknown Legendre polynomials coefficients ij 's and ij 's.The solution can be obtained by substituting these coefficients either in (11) or (12).

Numerical Examples
We examine the accuracy and efficiency of the proposed method by presenting following examples.


With , subject to Dirichlet boundary conditions.The function at the exact solution of the problem is in Table 1 indicates the number collocation points.In this table we have also calculated the experimental convergence rate c of the error at the collocation points which is defined as We have presented comparison of maximum error and between present method and QSCM in Table 1.Maximum error and CPU time of present method and Liu-Lin method [7] are also given in Table 2.

   
, 3 e 1 1 x y u x y xy x y is exact solution of the problem.Comparison of maximum error of present method and ADSG method are presented in Table 3. Maximum error and CPU time of present method and Liu-Lin method [7] are listed in Ta- ble 4. By comparing the data in Tables 3 and 4, it is clear that our method is more efficient.

Conclusion
In this study, solution of partial differential equations by Legendre polynomials approximation in two dimensions   is investigated.Results show better accuracy of the proposed method based on Legendre polynomials.Experimental results on various problems show that in comparison with the previous method (Sinc-Galerkin method, quadratic spline collocation method and Liu-Lin method), the computation cost of the proposed methods has decreased noticeably, the CPU time for computation falls at least more than 6 folds.