Optimization Problem Can someone please help me with this minimization problem? 

I dunno what to do after replacing p(x) with given s.t.
 A: This is a "least-squares minimization problem". There are abstract ways of solving this problem using geometry, or you can brute-force it by consider this a function of the three coefficients, and setting the derivatives with respect to each coefficient equal to $0$. You'll get the same thing without so much verbage if you just set the derivatives to 0. Rather than expanding the full expression
$$
    f(a) =\int_{0}^{1}(g-a_{2}x^{2}-a_{1}x-a_{0})^{2}dx,
$$
just form the derivatives directly
$$
    \frac{\partial f}{\partial a_{0}} = -2\int_{0}^{1}(g-a_{2}x^{2}-a_{1}x-a_{0})dx =0
$$
$$
    \frac{\partial f}{\partial a_{1}} = -2\int_{0}^{1}(g-a_{2}x^{2}-a_{1}x-a_{0})xdx =0
$$
$$
    \frac{\partial f}{\partial a_{2}} = -2\int_{0}^{1}(g-a_{2}x^{2}-a_{1}x-a_{0})x^{2}dx =0 .
$$
The answer will be expressed in terms of three constants, which cannot be computed without know the specific form of $g$:
$$    c_{0}=\int_{0}^{1}g dx,\;\; c_{1}=\int_{0}^{1}g(x)x\,dx,\;\; c_{2}=\int_{0}^{1}g(x)x^{2}\,dx
$$
Just assume that these three constants are known and proceed to find a solution in terms of these. The three constants $c_{0},c_{1},c_{2}$ are all that have to be known about the function $g$ in order to find the coefficients $a_{0},a_{1},a_{2}$. The resulting system is a 3x3 linear system which will have a unique solution for all choices of $c_{0}, c_{1}, c_{2}$. The resulting linear system of equations has a coefficient matrix which involves only 5 numbers $\int_{0}^{1}dx,...,\int_{0}^{1}x^{4}dx$ in a nice pattern.
