Express in terms of Legendre polynomials
Solution 1:
Lets do the first one two different ways and then you can try the rest.
The Legendre Polynomials are given by:
$P_0(x) = 1$
$P_1(x) = x$
$P_2(x) = \frac{1}{2}(3x^2 - 1)$
$P_3(x) = \frac{1}{2}(5x^3-3x)$
$\ldots$
We are given $f(x) = -2x^2 + 7$
Method 1: (so we can check our answer)
How can we add those $P_i(x)$ to get $f(x)$?
Well, if you add $-\frac{4}{3} P_2(x) + \frac{19}{3}P_0 = f(x)$
Method 2: (the method you are asked to use)
To use the Legendre Series, we put:
$$\tag 1 f(x) = \sum_{i=0}^\infty c_iP_i(x)$$
To solve this, we solve a series of integrals given by:
$$\int_{-1}^1 f(x)P_i(x)~dx = \sum_{i=0}^\infty c_i \int_{-1}^1 (P_i(x))^2 ~dx$$
Because the Legendre polynomials are orthogonal, all the integrals on the right are zero except the one we care about, namely $c_i$. So, lets crank those $c_i$ using this approach.
$i = 0$
$$\int_{-1}^1 f(x)P_0(x)~dx = \sum_{i=0}^\infty c_0 \int_{-1}^1 (P_0(x))^2 ~dx$$
$$\int_{-1}^1 (-2x^2 + 7)(1)~dx = \sum_{i=0}^\infty c_0 \int_{-1}^1 (P_0(x))^2 ~dx = c_0 \int_{-1}^1 (1)^2~dx$$
This yields $\frac{38}{3} = c_0 \cdot 2 \rightarrow c_0 = \frac{19}{3}$
$i = 1$
$$\int_{-1}^1 f(x)P_1(x)~dx = \sum_{i=0}^\infty c_1 \int_{-1}^1 (P_1(x))^2 ~dx$$
$$\int_{-1}^1 (-2x^2 + 7)(x)~dx = \sum_{i=0}^\infty c_1 \int_{-1}^1 (P_1(x))^2 ~dx = c_1 \int_{-1}^1 (x)^2~dx$$
This yields $0 = c_1 \cdot 0 \rightarrow c_1 = 0$
$i = 2$
$$\int_{-1}^1 f(x)P_2(x)~dx = \sum_{i=0}^\infty c_2 \int_{-1}^1 (P_2(x))^2 ~dx$$
$$\int_{-1}^1 (-2x^2 + 7)(\frac{1}{2}(3x^2-1))~dx = \sum_{i=0}^\infty c_2 \int_{-1}^1 (P_2(x))^2 ~dx = c_2 \int_{-1}^1 (\frac{1}{2}(3x^2-1))^2~dx$$
This yields $-\frac{8}{15} = c_2 \cdot \frac{2}{5} \rightarrow c_2 = -\frac{4}{3}$
$\therefore ~ f(x) = -2x^2 + 7 = c_0P_0(x) + c_1P_1(x) + c_2P_2(x) = \frac{19}{3}P_0(x) -\frac{4}{3}P_2(x)$