Maths WorkshopMaths problems with full solutions
Exercise 2170Linear algebra › Inner product spacesL1Added 3 Nov 2026

Legendre polynomials

#Legendre polynomials#orthogonal polynomials#inner product

Statement

In Rn[X]\mathbb{R}_n[X] with inner product ⟨P,Q⟩=∫−11P(t)Q(t) dt\langle P,Q\rangle=\int_{-1}^1 P(t)Q(t)\,dt, construct the first three Legendre polynomials by orthonormalizing (1,X,X2)(1,X,X^2).

Hint

Apply Gram–Schmidt.

Show solutionHide solution

Solution

Step 1: normalize 11. ⟨1,1⟩=∫−11dt=2\langle 1,1\rangle=\int_{-1}^1 dt=2, so
u1=12.u_1=\frac{1}{\sqrt2}.

Step 2: orthogonalize XX against u1u_1. ⟨X,1⟩=∫−11t dt=0\langle X,1\rangle=\int_{-1}^1 t\,dt=0, so XX is already orthogonal to 11. Norm:
⟨X,X⟩=∫−11t2 dt=23,u2=X2/3=32 X.\langle X,X\rangle=\int_{-1}^1 t^2\,dt=\frac23,\qquad u_2=\frac{X}{\sqrt{2/3}}=\sqrt{\frac32}\,X.

Step 3: orthogonalize X2X^2 against u1,u2u_1,u_2.
⟨X2,1⟩=∫−11t2 dt=23,⟨X2,X⟩=∫−11t3 dt=0.\langle X^2,1\rangle=\int_{-1}^1 t^2\,dt=\frac23,\qquad \langle X^2,X\rangle=\int_{-1}^1 t^3\,dt=0.
So the orthogonal part is
X2−⟨X2,1⟩⟨1,1⟩⋅1=X2−2/32=X2−13.X^2-\frac{\langle X^2,1\rangle}{\langle 1,1\rangle}\cdot 1=X^2-\frac{2/3}{2}=X^2-\frac13.
Its squared norm:
∫−11(t2−13)2dt=∫−11t4 dt−23∫−11t2 dt+19∫−11dt=25−49+29=18−20+1045=845.\int_{-1}^1\left(t^2-\frac13\right)^2 dt=\int_{-1}^1 t^4\,dt-\frac23\int_{-1}^1 t^2\,dt+\frac19\int_{-1}^1 dt=\frac25-\frac49+\frac29=\frac{18-20+10}{45}=\frac{8}{45}.
Hence
u3=X2−1/38/45=458(X2−13)=3522(X2−13).u_3=\frac{X^2-1/3}{\sqrt{8/45}}=\sqrt{\frac{45}{8}}\left(X^2-\frac13\right)=\frac{3\sqrt5}{2\sqrt2}\left(X^2-\frac13\right).

The orthonormal triple.
u1=12,u2=32 X,u3=3522(X2−13).u_1=\frac{1}{\sqrt2},\qquad u_2=\sqrt{\frac32}\,X,\qquad u_3=\frac{3\sqrt5}{2\sqrt2}\left(X^2-\frac13\right).
They satisfy ⟨ui,uj⟩=δij\langle u_i,u_j\rangle=\delta_{ij}.

Standard Legendre polynomials. Rescaling to monic (or to the classical normalization), one gets
P0=1,P1=X,P2=3X2−12.P_0=1,\qquad P_1=X,\qquad P_2=\frac{3X^2-1}{2}.
These are proportional to u1,u2,u3u_1,u_2,u_3 and orthogonal for the integral inner product on [−1,1][-1,1].

Conclusion. The first three Legendre polynomials (unnormalized) are P0=1P_0=1, P1=XP_1=X, P2=3X2−12P_2=\dfrac{3X^2-1}{2}; the corresponding orthonormal vectors are u1,u2,u3u_1,u_2,u_3 above.