Given two polynomials $f$ and $g$, define their inner product by
$$\langle f,g\rangle =\int _0^{\pi }f(x)g(x)\sin (x)dx$$
Prove that for any two polynomials $f$ and $g$, $\langle f,g\rangle =\langle g,f\rangle$.
Prove that for any three polynomials $f$, $g$, and $h$ and any two real number $a$ and $b$, $\langle a f+b g,h\rangle =a\langle f,h\rangle +b\langle g,h\rangle$.
If I use this inner product to apply the Gramm-Schmitt orthogonalization process to the set $\left\{1,x,x^2\right\}$, I obtain the following three polynomials.
\begin{eqnarray*}
p_0(x) & = & \frac{1}{\sqrt{2}} \\
p_1(x) & = & \sqrt{\frac{2}{\pi ^2-8}} x-\frac{\pi }{\sqrt{2 \left(\pi ^2-8\right)}} \\
p_2(x) & = & \frac{x^2}{\sqrt{40-4 \pi ^2}}-\frac{\pi x}{\sqrt{40-4 \pi ^2}}+\frac{2}{\sqrt{40-4 \pi ^2}}
\end{eqnarray*}
Suppose I now wish to express $f(x)=x(\pi -x)$ as a linear combination of these polynomials. Thus:
$$f(x) = a_0p_0(x)+a_1p_1(x)+a_2p_2(x).$$
Write down the integral that you would use to compute $a_2$. You do not have to evaluate the integral!