Prove that absolute value of function is less or equal to integral of function squared I was solving some exercises in my calculus textbook when I stumbled upon this one:
Given $f:[0,1] \to \Bbb R$ continuously differentiable with $f(0) = 0$, prove that
a) $|f(x)| ≤ \int_{0}^{1} |f'(x)|\, dx$ for every $x$ in $[0,1]$.
b) $|f(x)| ≤ \int_{0}^{1} |f'(x)|^2\, dx$ for every $x$ in $[0,1]$.
I managed to solve (a) but I'm uncertain of how to solve (b) since if $f(x) = x/2$ ($f(0)=0$) then for $x = 1$, $ |1/2| \le \int_{0}^{1} |1/2|^2\, dx =\int_{0}^{1} |1/4|\, dx = 1/4 $ which is incorrect. Is the textbook wrong, or have I made an error somewhere?

For part (b), the question should be corrected as $|f(x)|^2\leq\int_{0}^{1}|f'(x)|^2 dx$, which is a consequence from (a) and Cauchy-Schwarz inequality.
