Example 9.7.3. The monic Legendre polynomial of degree 2 is z^2 - 3. Its zeros are ±√3. Theorem 9.7.2 guarantees that
∫p(z) dx = W0p + W1p√3
for all p(c) ∈ â„[x; 3], with W0 = ∫L0(c) dz. A straightforward calculation shows that L0(z) = √(1-z^2) and L1(z) = 8(√3+z) and integrating these gives W0 = W1 = 1. This implies that
∫(az^3 + bz^2 + cz + d) dz = a∫(z^3) dz + b∫(z^2) dz + c∫(z) dz + d∫(1) dz = a(√3) + b(√3)^2 + c(√3) + 4d + a(√3) + b(√3)^2 + c(√3) + 4d = 2b√3 + 2d
for all a, b, c, d ∈ â„. The coefficients of terms of odd degree do not contribute in the computation because all odd functions integrate to 0 on [-1,1].