$p_n : [−1, 1] → \mathbb{R} (n \in \mathbb{N})$ is a polynomial of degree $n$.
$p_n$ is an orthonormal system, $\int_{-1}^{1}p_n(x)p_m(x)dx=\delta_{m,n}$.
The first task was to calculate $p_0, p_1$ and $p_2$. I did that with the Gram-Schmidt process, I got $p_o(x)=1, p_1(x)=x$ and $p_2(x)=\dfrac 32(x^2-\dfrac 13)$.
The second task is this: Which second degree polynomial approximates $\sin(x)$ on $[−1, 1]$ in $L^2$ the best?
Hint: $\int_{a}^{b}|f(x)-s_N(x)|^2dx$ and $||f||_2= \sqrt{\int_{a}^{b}|f(x)|^2dx}$
I have no idea what to do, can someone help me?
If $p_0, p_1, p_2$ are three orthonormal polynomials of degree $\leq 2$. Then the best $L^2$ approximation of any function $f$ on $[-1,1]$ in $span\{p_0, p_1, p_2\}$ is $g(x) = a_0p_0(x)+a_1p_1(x)+a_2p_2(x)$ where $a_i = \int_{-1}^1 p_i(x)f(x)dx$.