Find $a,b,c\in\mathbb{C}$, which minimize the value of the integral $\int_{-1}^1 |x^3-a-bx-cx^2|^2dx.$ We're working in the Hilbert Space $L^2([-1,1])$, we have $f(x)=x^3$ and $g(x)=cx^2 + bx + a$ with inner product 
$$\langle f , g \rangle = \int_{-1}^1 |x^3-a-bx-cx^2|^2dx.$$
How does one go about finding the minimum? 
 A: This is a simple least squares problem. You are looking for the projection of $f(x)=x^3$ on the subspace $S = span\{1,x,x^2\}$. The formula you presented is for $\|f-g\|^2$, not for $\langle f,g\rangle$. The coefficients $a,b,c$ will be the solutions of the linear system
$$
\begin{pmatrix}
\langle 1,1\rangle & \langle 1,x\rangle & \langle 1,x^2\rangle\\
\langle x,1\rangle & \langle x,x\rangle & \langle x,x^2\rangle\\
\langle x^2,1\rangle & \langle x^2,x\rangle & \langle x^2, x^2\rangle
\end{pmatrix}
\begin{pmatrix}a \\ b\\c\end{pmatrix}=
\begin{pmatrix} \langle f,1\rangle \\\langle f,x\rangle \\ \langle f,x^2 \rangle\end{pmatrix}\Leftrightarrow
$$
$$
\left(
\begin{array}{ccc}
 2 & 0 & \frac{2}{3} \\
 0 & \frac{2}{3} & 0 \\
 \frac{2}{3} & 0 & \frac{2}{5} \\
\end{array}
\right)\begin{pmatrix}a \\ b\\c\end{pmatrix}=\begin{pmatrix}0 \\ 2/5\\0\end{pmatrix}.
$$
Solving the system you get $g(x)=\frac 35 x$. Please note that solving this system is the same as computing the stationary points of 
$$
Q(a,b,c) = \int_{-1}^1 |f(x)-a-bx-cx^2|^2 dx.
$$
If you a use an orthogonal base of $S$ things will be even simpler.
