If $f(0) = 0$ and $|f'(x)|\leq |f(x)|$ for all $x\in\mathbb{R}$ then $f\equiv 0$ [duplicate]
Solution 1:
Consider $S := \{ x \in \mathbb{R} : f(x) = 0 \}$. This set is closed by the continuity of $f$. We now claim $S$ is also open. To show this, suppose $x_0 \in S$, and let $A := \sup \{ |f(x)| : x \in (x_0 - \frac{1}{2}, x_0 + \frac{1}{2}) \}$. Then, for $x \in (x_0 - \frac{1}{2}, x_0 + \frac{1}{2})$, we have $f(x) = \int_{x_0}^x f'(t)\,dt$, and $|f'(t)| \le |f(t)| \le A$ for $t$ between $x$ and $x_0$, so $|f(x)| \le |x - x_0| A \le \frac{1}{2} A$. Thus, by the definition of $A$ as a supremum, $0 \le A \le \frac{1}{2} A$, which implies $A = 0$. This implies that $f(x) \equiv 0$ for $x \in (x_0 - \frac{1}{2}, x_0 + \frac{1}{2})$, establishing that $S$ is a neighborhood of $x_0$.
Now, we have shown that $S$ is a clopen subset of $\mathbb{R}$, and we are given that $0 \in S$ so in particular, $S$ is nonempty. By the connectedness of $\mathbb{R}$, this implies $S$ is all of $\mathbb{R}$, which is equivalent to the desired conclusion.
Solution 2:
Let $\vert x \vert \leq \frac{1}{2}$ and let $x_0\in \mathbb{R}$ such that $f(x_0)=0$.
$$ \vert f(x_0+x) \vert = \left\vert f(x_0) + \int_0^x f'(x_0+t) dt \right\vert = \left\vert \int_0^x f'(x_0+t) dt \right\vert $$
using the triangular inequality for integrals yields
$$ \leq \left\vert \int_0^x \vert f'(x_0+t) \vert dt \right\vert \leq \left\vert \int_0^x \vert f(x_0+t) \vert dt \right\vert \leq \left\vert \int_0^x \max_{\vert s\vert \leq \frac{1}{2}}\vert f(x_0+s) \vert dt \right\vert \leq \vert x \vert \cdot \max_{\vert s\vert \leq \frac{1}{2}}\vert f(x_0+s) \vert.$$
Now we take the maximum over all $\vert x \vert \leq \frac{1}{2}$ and obtain
$$ \max_{\vert s\vert \leq \frac{1}{2}}\vert f(x_0+ s) \vert \leq \frac{1}{2} \max_{\vert s\vert \leq \frac{1}{2}}\vert f(x_0+s) \vert. $$
Thus, $\max_{\vert s\vert \leq \frac{1}{2}}\vert f(x_0+ s) \vert=0$ and hence
$$ \forall \vert t \vert \leq \frac{1}{2}: \ f(x_0+t)= 0.$$
By induction we prove that $f(t)=0$ for all $t\in \left[ -\frac{n}{2}, \frac{n}{2} \right]$ for all $n\in \mathbb{N}$ and therefore $f$ is identicially zero.
Added: If one does not want to use integrals, one can use the mean value theorem in the following way: For $\vert x \vert \leq \frac{1}{2}$ there exists $\vert \xi(x) \vert \leq \vert x \vert$ such that
$$ \vert f(x) \vert = \vert f(x) - f(0) \vert = \vert f'(\xi(x)) \vert \cdot \vert x \vert \leq \vert f(\xi(x)) \vert \cdot \vert x \vert \leq \max_{\vert s \vert \leq \frac{1}{2}} \vert f(s) \vert \cdot \vert x\vert .$$
Taking again the maximum over all $\vert x \vert \leq \frac{1}{2}$ one arrives at $\max_{\vert s \vert \leq \frac{1}{2}} \vert f(s) \vert \leq \frac{1}{2} \max_{\vert s \vert \leq \frac{1}{2}} \vert f(s) \vert$ and proceeds as above.