Calculate $$\inf\limits_{a, b, c \in \mathbb{R}} \,\int_{-1}^{1}\left|x^{3}-a x^{2}-b x-c\right|^{2} \mathrm d x$$
I am new to Hilbert space, I see similar questions used the formula: $\langle f, g\rangle=\int f g \, \mathrm d \mu$ (real $L^{2}$), but I am having trouble converting the problem to the formula: What is the systematic way of finding $f$ and $g$? What role does orthogonality plays in the question?
Hint: you want to project $x^{3}$ onto the subspace spanned by $1,x,x^{2}$. Use Gram Schmidt to find an orthonormal basis for this subspace and use the general formula for the projection $Px=\sum \langle x, e_i \rangle e_i$ for the projection onto the space with orthonormal basis $\{e_i\}$.