The answer, though correct, is incomplete: in fact, gygabyte017 was assuming \(c\in [0,1]\) without justifying such an assumption.
To be more precise, while in cases (a) and (b) there is nothing to add to the given answer (because previuos computations don't really need assumption \(c\in [0,1]\) to work), there remains something to say in order to make the argument (c) complete.
Let us assume \(c\in \mathbb{R}\setminus [0,1]=]-\infty , 0[\cup ]1,\infty[\) and separate the two cases:
- \(c<0\): in such a case we get:
\[
\begin{split}
\| f-c\|_1 &= \int_0^1|x^2-c|\ \text{d} x\\
&= \int_0^1(x^2-c)\ \text{d} x\\
&= \frac{1}{3} - c
\end{split}
\]
- \(c>1\): in this case we get:
\[
\begin{split}
\| f-c\|_1 &= \int_0^1|x^2-c|\ \text{d} x\\
&= \int_0^1(c-x^2\ \text{d} x\\
&= c-\frac{1}{3}
\end{split}
\]
Therefore, in general, we get:
\[
\| f-c\|_1 = \begin{cases} \frac{1}{3} - c &\text{, if } c<0\\
\frac{1}{3} - c + \frac{4}{3}\ c\sqrt{c} &\text{, if } 0\leq c\leq 1\\
c-\frac{1}{3} &\text{, if } c>1
\end{cases}
\]
and a simple graphical representation:
shows that the minimum is assumed in \(c=1/4\), as gygabyte017 already correctly claimed.
Sono sempre stato, e mi ritengo ancora un dilettante. Cioè una persona che si diletta, che cerca sempre di provare piacere e di regalare il piacere agli altri, che scopre ogni volta quello che fa come se fosse la prima volta. (Freak Antoni)