[Math] How to calculate Legendre Polynomials using Orthogonal projections

linear algebrapolynomials

In Linear Algebra, how do I calculate the first four Legendre Polynomials using
basic rules of orthogonal projections given the following inner product space:
$$
\int f\,g
$$
where $f$ and $g$ are vectors in the polynomial space (let's say it's finite).

I've been able to develop the the Legendre Polynomial of 1 which is $1/\sqrt{2}$.
However, I cannot seem to get to the values of $x$, I get stuck with a constant value:
$$
\text{Legendre}(x) = x – \frac{1}{2}
$$
What is the right way to perform this?

Thank you

Best Answer

If you want to build Legendre polynomials manually (we wil use the interval $[-1,1]$ and normalise them to get $L_p(1)=1$), you can use the following procedure (note that $p$-th Legendre polynomial has degree $p$).

1) zero degree, $L_0(1)=L_0$, hence $L_0(x)=1$.

2) first degree, $L_0\bot L_1$, $ L_1 (1) =1 $. We take $L_1(x) = ax+b$, so we can write

$$0=\int_{-1}^1L_1(x)L_0dx= \int_{-1}^1 (ax+b)dx= 2b,$$hence $b=0$.

Next, $$1= L_1 (x) =a x $$ so we can take $a=1$.

3) second degree: $L_2(x) = ax^2+bx+c$, you impose orthogonality to $L_0$ and $L_1$ and normalise it to $L_2(1)=1$. This will give you three linear equations on $a$, $b$, $c$, which we are able to solve.

This iterative procedure gives all $L_p$. This wiki article gives many properties of Legendre polynomials, take a look at it.

Related Question