next up previous contents index
suivant: Hermite polynomial : hermite monter: Orthogonal polynomials précédent: Orthogonal polynomials   Table des matières   Index


Legendre polynomials: legendre

legendre takes as argument an integer n and optionnally a variable name (by default x).
legendre returns the Legendre polynomial of degree n : it is a polynomial L(n, x), solution of the differential equation:

(x2 - 1).y'' - 2.x.y' - n(n + 1).y = 0

The Legendre polynomials verify the following recurrence relation:

L(0, x) = 1,    L(1, x) = x,    L(n, x) = $\displaystyle {\frac{{2n-1}}{{n}}}$xL(n - 1, x) - $\displaystyle {\frac{{n-1}}{{n}}}$L(n - 2, x)

These polynomials are orthogonal for the scalar product :

< f, g > = $\displaystyle \int_{{-1}}^{{+1}}$f (x)g(xdx

Input :
legendre(4)
Output :
(35*x^4+-30*x^2+3)/8
Input :
legendre(4,y)
Output :
(35*y^4+-30*y^2+3)/8



giac documentation written by Renée De Graeve and Bernard Parisse