Legen(X) = Legendre polynomial of integer >= 0:
The general form of a Legendre polynomial of order n is given by the sum:
where M = n/2 or (n−1)/2, whichever is an integer.
P(n) has n+1 terms {p(n); p(n−1); ...; p(1); p(0)}.
p(n) = Fac(n+n) / (2^n * Fac(n)^2);
for (m = n − 2; m >= 0; m −= 2)
The first few Legendre polynomials are:
P(0) = 1 = {1}
P(1) = x = {1; 0}
P(2) = (3*x^2 − 1)/2 = {1.5; 0; −0.5}
P(3) = (5*x^3 − 3*x)/2 = {2.5; 0; −1.5; 0}
P(4) = (35*x^4 − 30*x^2 + 3)/8 = {4.375; 0; −3.75; 0; +0.375}
P(5) = (63*x^5 − 70*x^3 + 15*x)/8 = {7.875; 0; −8.75; 0; +1.875;
0}
P(6) = (231*x^6 − 315*x^4 + 105*x^2 − 5)/16 = {14.4375; 0;
−19.6875; 0; +6.5625;
0; −0.3125}
Return to Matrix and Polynomial Computations
Return to Harry's Home Page