$f'(x)=[f(x)]^2$ and $f$ not injective then $f \equiv 0 $ in $ \mathbb{R}$ Let $f:\mathbb{R} \to \mathbb{R}$ a diff. function satisfying $f'(x)=[f(x)]^2 \;\forall x \in \mathbb{R}$ . Prove that if $f$ is not injective then $f \equiv0 $ in $ \mathbb{R}$.
I already proved that without the hypothesis of injectiveness but with $f(a)=f(b)$ instead, then $f \equiv 0$ in $[a,b]$. I don´t know how to use this.
There is a suggestion, and I would like a solution using it: ``Observe that $\int_{x_1}^{x_2}k^2 dx < k \;\;\forall \;\; k \;\;st.\;\ 0<k<1 $ and sufficiently close $x_1$ and $x_2$.´´
Thanks
 A: If $f \ne 0$ then,
since $(1/f)' = -f'/f^2$,
$(1/f)' = -1$ so
$1/f = -x+c$ so
$f(x) = 1/(-x+c)$.
Then 
$f$ is injective
since $f(x) = f(y)
\implies x=y$.
A: Suppose that there is $x_0 \in \mathbb R$ such that $f(x_0) \ne 0.$ Then there is an intervall $I$ such that $x_0 \in I$ and $f(x) \ne 0$ for all $x \in I.$ Now define $g:=1/f$ on $I$ . Then it is easy to see that $g'=-1$ on $I$. Hence there is $C$ such that
$f(x)=\frac{1}{C-x}$ for all $x \in I.$ This contradicts the facts, that the domain of $f$ is all of $ \mathbb R$ and $f$ is continuous at $C$.
That $f$ is not injective is not needed.
A: Partial answer.
FTC:
Assume there exist $x_2 >x_1$ s.t. $f(x_2)=f(x_1)$.
Then $f(x_2)-f(x_1)=\displaystyle{\int_{x_1}^{x_2}}f'(x)dx=$
$\displaystyle{\int_{x_1}^{x_2}}f^2(x)dx =0$.
Since $f$ is continuos this implies $f(x)\equiv 0$ for $x \in [x_1,x_2]$.
What about  $\mathbb{R}$ \ $[x_1,x_2]$?
A: here's an approach that uses the hint.  You have $f'(x)=[f(x)]^2\geq 0$.  If $f'(x)\gt 0$ everywhere, then the function is injective.  
Thus not injective implies there is at lease one $a \in \mathbb R$ where $f'(a) = 0 =[f(a)]^2$.  Now suppose for contradiction that $f$ isn't identically zero.  Then there is (at least) some $c$ where $f(c) \gt 0$.  I show the case where $c\gt a$ but the case of $c\lt a$ follows in a very similar manner.  Now consider $b \in[a,c]$ where $b$ is the maximal value in that domain that $f$ maps to zero.  (The maximum exists because $f$ is continuous and the image of $\{0\}$ is closed, so its preimage is closed.) 
Now attack $b$ using the integral estimate
select a sufficiently small $\delta $ neighborhood around $b$ -- in particular for any $x_2 \in (b,b+\delta)$ any $f(x_2) \in (0,1)$ will do (and also ensure $\delta \in (0,1)$).  
Then by FTC you have
$f(x_2) $
$=f(x_2) - 0$
$= f(x_2) - f(b) $
$= \int_{b}^{x_2} f'(x)dx $
$=\int_{b}^{x_2} [f(x)]^2 dx$
$\lt f(x_2)$
which is a contradiction  
note
you can skip integration.  Just observe that 
$f(x_2) = f(x_2)-f(b) \leq (x_2-b)K \leq \delta \cdot K = \delta \cdot f(x_2)^2\lt f(x_2)$
by mean value inequality since $f'(x) \leq K=f(x_2)^2$ for $x \in [b,x_2]$ 
A: Note that your $f$ is a solution to the ODE
$$
dy/dx = y^2 \ ,
$$
which can be solved using separation of variable. ALL solutions to this ODE other than the obvious solution $y = 0 $ are of the form
$$
y = \frac{1}{c-x} \ ,
$$
for a constant $c$. The claim that this is an exhaustive list follows from uniqueness of solutions to initial value problems of the type $y'=F(x,y), y(x_0) = y_0 $ where $F$ is, say, locally Lipschitz. Here $F(x,y) = y^2$ which is super nice!
Now, every solution other than the constant solution is injective (although not defined on all of $\mathbb{R}$.
Note: I actually proved more: Injective or otherwise, you cannot find a differentiable function, other than zero function, defined on all of $\mathbb{R}$ that satisfies $f' = f^2$!
A: It is enough to assume 
$$|f'(x)|\le f^2(x)$$
To  show that if $\{x \ | \ f(x) = 0\}$ is nonvoid then it equals $\mathbb{R}$. 
Clearly it is a closed set.  Let us show that it is also open.
Take $x_0$, $f(x_0) = 0$. There exists $0< \delta < 1$ so that 
$$\sup_{x \in (x_0-\delta, x_0 + \delta)} |f(x)| < 1$$
 Denote that supremum by $M$.  Note that $0\le M < 1$.
For $x \in (x_0-\delta, x_0 + \delta)$ we have
$$|f(x)| = |f(x) - f(x_0) | = |\int_{x_0}^{x} f'(t) dt| \le 
|x-x_0| \cdot \sup |f'(t)| \le \delta \cdot M^2$$
so 
$$M \le \delta M^2\le \delta M$$
We conclude $M=0$, so $f=0$ on $(x_0-\delta,x_0+\delta)$
Note: we can see how to generalize this to functions satisfying
$$|f'(x)|\le F(f(x))$$
where $F$ is a positive function so that $F(t) \le K\cdot |t|$ around $0$.
