Let $f:[0,1] \to \mathbb{R}$ be a differentiable function such that $f(0) = 0$ and $|f'(x)| \leq |f(x)|$ for all $x \in [0, 1]$. Show that $f(x) = 0$ for all $x \in [0, 1]$.
My attempt is this:
Suppose that $x \in (0, 1]$. Since $f$ is differentiable, by the mean value theorem there exists some $c \in (0, x)$ such that $$ f'(c) = \frac{f(x)-f(0)}{x-0} = \frac{f(x)}{x}. $$ This implies that $$ |\frac{f(x)}{x}| = |f'(c)| \leq |f(c)|,\ \ \text{for every}\ x \in (0, 1] $$ Therefore, for every $x \in (0,1]$ we have $$ |f(x)| \leq |x||f(c)| $$ From here I´m a bit stuck. A guess of mine is using the fact that $f$ is also differentiable at the end points and that $f'(0) = 0$. Can anyone give me a hint and/or tell me if my reasoning is correct up to that point?