Approximate $f(x) = x^{1/3}$ by a polynomial $p(x)$ of degree $\le 2$ that minimizes the error $$E = (f(-1)-p(-1))^2 + \int_{-1}^1 (f(x)-p(x))^2 dx + (f(1)-p(1))^2$$
I think I must minimize the following:
$$\min ||x^{1/3}-(ax^2 + bx + c)||^2$$
but I don't know how to proceed.
To answer this type of questions it is vital to correctly identify the vector space, the subspace and the inner product. The error formula $$E = E(f-p) = (f(-1)-p(-1))^2 + \int_{-1}^1 (f(x)-p(x))^2 dx + (f(1)-p(1))^2$$ makes sense for all functions $f-p$ which are continuous on the interval $[-1,1]$. In particular, it makes sense when $f : [-1,1] \rightarrow \mathbb{R}$ is given by $$f(x) = x^{1/3}$$ and $p$ is any polynomial. We therefore consider the vector space $\Omega$ given by $$ \Omega = \{ f : [-1,1] \rightarrow \mathbb{R} \: : \: \text{$f$ is continuous on $[-1,1]$} \}.$$ There is no harm in stressing how addition and scalar multiplication is defined. Specifically, if $f, g \in \Omega$ and $r, s \in \mathbb{R}$, then $r\cdot f + t \cdot g$ is the function $h \in \Omega$ given by $$h(x) = r \cdot f(x) + t \cdot g(x).$$ Moreover, let $V$ be given by $$ V = \{ p : [-1,1] \rightarrow \mathbb{R} \: : \: \text{$p$ is a polynomial of degree at most $2$} \}$$ It is clear that $V$ is a subspace of $\Omega$. We now need an inner product defined all $f, g \in \Omega$. In view of the expression for $E$ we choose to define $$ \langle f, g \rangle = f(-1)g(-1) + \int_{-1}^1 f(x)g(x) dx + f(1)g(1).$$ It is straightforward but very important to verify that this definition has all the properties of an inner product. In particular, we have $$ \langle r_1 f_1 + r_2 f_2 , g \rangle = r_1 \langle f_1, g \rangle + r_2 \langle f_2 , g \rangle $$ and $$ \langle f, g \rangle = \langle g, f \rangle$$ as well as $$\langle f, f \rangle \ge 0, \quad\text{and}\quad \langle f,f \rangle = 0 \: \Leftrightarrow \forall x \in [-1,1] \: : f(x) = 0.$$ This completes our preparations. We note that $$E(f-p) = \langle f-p, f-p \rangle = \| f - p\|^2$$ is merely the square of the norm associated with our freshly defined inner product on $\Omega$. To minimize the error we merely need to project our target function $f$ onto $V$ using our inner product. To that end, we deploy Gram-Schmidt's orthogonalization procedure and construct an orthonomal basis for $V$. If $p_i \in \Omega$ is given by $$p_i(x) = x^i$$ for $i=0,1,2$, then it is clear that $$ B = \{ p_0, p_1, p_2 \} \subset V$$ is a basis for $V$, but it is almost certainly not orthonormal with respect to our inner product. In fact we have $$ \|p_0\|^2 = \langle p_0, p_0 \rangle = 1 + \int_{-1}^1 1 dx + 1 = 4$$ It follows that $v_0$ given by $$v_0 = \frac{1}{2} p_0$$ has norm $1$. Continuing with Gram-Schmidt's procedure we compute $$ \langle p_1, v_0 \rangle = (-1)\left(\frac{1}{2}\right) + \int_{-1}^1 x \left(\frac{1}{2}\right) dx + (1)\left(\frac{1}{2}\right) = 0.$$ We have been lucky! The function $p_1$ is already orthogonal to $v_0$. We compute $$ \|p_1 \|^2 = (-1)(-1) + \int_{-1}^1 x\cdot x dx + (1)(1) = 2 + \frac{2}{3} = \frac{8}{3}.$$ It follows that $v_1$ given by $$ v_1 = \sqrt{\frac{3}{8}} p_1 $$ is orthogonal to $v_0$ and has norm $1$. We now process $p_2$. We have $$ \langle p_2, v_0 \rangle = (-1)^2 \frac{1}{2} + \int_{-1}^1 x^2 \frac{1}{2} dx + (1)^2 \frac{1}{2} = 1 + \frac{2}{3} = \frac{5}{3}$$ and $$ \langle p_2, v_1 \rangle = (-1)^2 \sqrt{\frac{3}{8}} (-1) + \int_{-1}^1 x^2 \cdot \left( \sqrt{\frac{3}{8}} \right) x dx + (1)^2 \sqrt{\frac{3}{8}} (1) = 0.$$ We conclude that the intermediate polynomial $w_2$ given by $$ w_2 = p_2 - \frac{5}{3}v_0$$ is orthogonal to $v_0$ and $v_1$. Before continuing there is nothing lost by noting $$ w_2(x) = x^2 - \frac{5}{6}.$$ It remains to compute $\|w_2\|$ and define the final element $v_2 = \frac{1}{\|w_2\|}w_2$ of our new orthonormal basis $$\{v_0, v_1, v_2\}.$$ Afterwords, the orthogonal projection $q \in V$ of $f(x) = x^{1/3}$ with respect to our inner product can be computed. This polynomial $q$ will minimize the special error.
It is getting late in my timezone, so I will leave it at that for right now. It is entirely possible that I have made a miscalculation when applying GS's method. Therefore, check all the calculations carefully. However, the central idea is correct: Examine the expression for the error and find a suitable vector space with a related inner product.