We seek a polynomial of rank $2$ that interpolates the function $f(x)=x^3$ in the interval $[-1,1]$ at the points $x=-1,x=0,x=a$ were $0<a<1$. We need find the number $a$ that make the approximation optimal by minimizing the integral $$ \int_{-1}^{1} \left(x^3-p_2(x) \right)^2\ dx. $$
So if I find the Lagrange polynomial for the points $(-1,-1),(0,0),(a,a^3)$, I get: $$ P_L(a) =-1+(x+1)+(a-1)(x+1)x=ax^2+ax-x^2. $$ But I don't know what make now, probably take derivatives of the integral to find its minimum...
The full answer is (continue was Claude Leibovici wrote). We make integral of it and we get:
$2\int\limits_{0}^{1} [a^2x^2 +(a^2-4a+1)x^4] \ dx=\frac{2}{3}a^2+\frac{2}{5}(a^2-4a+1)=g(a)$ Now we need obtain such $a$ that our integral get it minimum, so we need take first derivative on $g(a)$ and make it equal to zero: $g'(a)=0=\frac{2a}{3}+\frac{2a}{5}-\frac{4}{5}$ And the solution is: $a=3/4$