If the derivative of a function is square of it then it is constant Let $f:\mathbb{R}\to\mathbb{R}$ is differentiable and $f(0)=0$. Also $\forall x\in \mathbb{R}$ we have $f'(x)=f^2(x)$. Prove that $f(x)=0$, for every $x$.
I tried to use MVT for both derivative and integral. But I got nowhere.
I just found out that

$f$ is increasing.
for positive values $f$ is non negative.
$\forall x>0$, there exists some $c\in (0,x)$ s.t. $f(x)=xf^2(c).$

Intuitively, it seems one can start by a small interval around zero and show that $f=0$ and so on.
Any comment!
 A: On the set where $f(x) \neq 0$ the derivative of $-1/f$ is $1 $ so we get $f(x) (x+c)=-1$ for some constant $c$. It follows that the continuous function $f(x) (x+c)$ takes only two values $0$ and$-1$. Hence it is a constant. But $f(0)=0$ so $f$ must vanish identically. [We get $f(x)=0$ for $x \neq -c$ but $f(-c)$ is also $0$ by continuity].
Some additional details: The set where $f \neq 0$ is an open set, so it is a countable disjoint union of open intervals. If $(a,b)$ is one of these intervals then there exits $c$ such that $f(x)(x+c)=-1$ in $(a,b)$ and it is $0$ at the end points. This contradicts continuity of $f$. Conclusion: there is no point $x$ with $f(x) \neq 0$.
A: Suppose for some $x_0$ you have $f(x_0)\neq0$. Then you can solve the differential equation
$$\frac{f'(x)}{f^2(x)}=1$$
with the initial condition $f(x_0)$, which gives
$$\frac{-1}{f(x)}+\frac{1}{f(x_0)}=x-x_0\iff f(x)=\frac{1}{c-x}$$
where $c$ is a constant, and this holds for every $x$ that is in the same component of $\mathbb R\backslash\{c\}$ with $x_0$, say $I=(-\infty,c)$. This goes to $\infty$ as $x$ approaches $c$, hence it cannot be the restriction of a function that is differentiable over $\mathbb R$ to $I$.
