legendre takes as argument an integer n and
optionally 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)= |
| x L(n−1,x)− |
| L(n−2,x) |
These polynomials are orthogonal for the scalar product :
<f,g>= | ∫ |
| f(x)g(x) dx |
Input :
Output :
^
4+-30*x^
2+3)/8Input :
Output :
^
4+-30*y^
2+3)/8