Given that $f$ is a function from $[0, 1]$ such that $$f(x)=x-x^2.$$Compute the $L^{\infty}$ norm of the function $f(x)$. My attempt:
I know that $$\|f\|_{\infty }= \inf\{C\geq 0:|f(x)|\leq C{ \ \text{ for almost every }}x\}.$$ Since $f'(x)=1-2x$ means that $f$ attains its maximum value at $\frac12$ in $[0, 1]$ and maximum value is $$f(1/2)=1/4.$$ Can I say that $\|f\|_{\infty}=\frac14$?
Yes, that is correct. You can reach the same conclusion without differentiation:\begin{align}x-x^2&=\frac14-\frac14+x-x^2\\&=\frac14-\left(x-\frac12\right)^2\\&\leqslant\frac14,\end{align}and we have $x-x^2=\frac14$ when $x=\frac12$. Besides, you always have $x-x^2\geqslant0$.