Solve the following minimization problems and determine whether there is a unique value of $\alpha$ that gives the minimum.
In each case, $\alpha$ is allowed to range over all real numbers. We are approximating the function $f(x) = x$ with polynomials of the form $\alpha x^2$.
(a) $min_{\alpha} \int_{-1}^{1}(x-\alpha x^2)^2 dx$
(b)$min_{\alpha} \int_{-1}^{1}|x-\alpha x^2| dx$
(c)$min_{\alpha} max_{-1 \leq x \leq 1} |x-\alpha x^2| $
My approach
For part (a):
First I integrated and then took the minimum over $\alpha$ and ended with $\alpha =0$ as the minimum.
Part (b):
I defined the function $$|x-\alpha x^2|= \begin{cases} x-\alpha x^2, x \geq \alpha x^2\\ -(x-\alpha x^2),x \lt \alpha x^2\\ \end{cases}$$
For integration, I took two cases for $\alpha \gt 0 \text{ and } \alpha \lt 0$.
For $\alpha \gt 0$ and $x \gt 0 \implies \text{ either }x-\alpha x^2 \geq 0 \text{ or } x-\alpha x^2 \lt 0 $. Greater than equal case is when $x \leq \frac{1}{\alpha}$ and less than when $x \gt \frac{1}{\alpha}$, also if $\alpha \gt 0$ and $x \lt 0 \implies x-\alpha x^2 \lt 0 $,
Therefore, the integral can be written as :$$\int_{-1}^{1}|x-\alpha x^2| dx = \int_{-1}^{0} -(x-\alpha x^2)dx +\int_{0}^{\frac{1}{\alpha}} (x-\alpha x^2) dx + \int_{1/\alpha}^{1} -(x-\alpha x^2) dx $$
Solving the integration I obtained the function of $f(\alpha)= \frac{2\alpha}{3} + \frac{1}{3 \alpha^2}$, solving for the minimum gives me $\alpha =1$.
Is my approach right? Any help is appreciated.
There is nothing wrong with the provided approach, however I think that it is easier to use symmetry for these problems:
\begin{align}A&=\int_{-1}^1(x-\alpha x^2)^2~\mathrm dx\\&=\int_0^1(x-\alpha x^2)^2+(x+\alpha x^2)^2~\mathrm dx\\&=2\int_0^1x^2+\alpha^2x^4~\mathrm dx\end{align}
at which point it is already obvious this is minimized at $\alpha=0$ for part a.
Similarly for part b:
\begin{align}B&=\int_{-1}^1|x-\alpha x^2|~\mathrm dx\\&=\int_0^1|x-\alpha x^2|+|x+\alpha x^2|~\mathrm dx\\&=2\int_0^1\max(|x|,|\alpha x^2|)~\mathrm dx\end{align}
Again, without actually working out the integral, we can see this is minimized at $\alpha=0$. I leave it to the reader to see that $\alpha=0$ is not the unique answer here.
For part c, you want to find the local extrema of $x-\alpha x^2$. This can be done by finding where it has vanishing derivative and additionally checking the endpoints $x=\pm1$.