Let $f:\mathbb R\to\mathbb R$ differentiable such that $f(0)=0$ and $f'(x)=[f(x)]^2$ for all $x\in\mathbb R$. Prove that $f(x)=0$ for all $x\in\mathbb R$.
My thoughts:
Suppose, to the contrary, that $\exists a\in\mathbb R$ such that $f(a)\neq 0$. Assume $f(a)>0$ $\left(f(a)<0 \mbox{ is analogous}\right)$. Hence, $f'(a)>0$ and therefore there is $\delta>0$ such that $x\in\mathbb R$ and $a<x<a+\delta$ implies $0<f(a)<f(x)$. Thus $f(x)\neq 0$ for all $x\in(a,a+\delta)$. We have that $\dfrac{1}{f},h:(a,a+\delta)\to\mathbb R$ given by $h(x)=-x$ are primitives of the function $t(x)=-1$, $x\in(a,a+\delta)$ since $$ \left(\frac{1}{f}\right)'(x)=\frac{-f'(x)}{f^2(x)}=\frac{-f^2(x)}{f^2(x)}=-1. $$ and $h'(x)=-1,\; \forall x\in(a,a+\delta)$. Since primitives differ by a constant, it follows that $$ \frac{1}{f(x)}-h(x)= C \Longrightarrow f(x)=\frac{1}{-x+C},\quad C\in\mathbb R. $$
I stop here. My attempt was to be able to evaluate $f(0)=\frac{1}{C}\neq 0$, which would give a contradiction, but my function is defined only in $(a,a+\delta)$.
Your idea just needs a kickstart.
Since $f'(x)=f(x)^2$ we know that $f$ is (weakly) increasing. Suppose $f(a)>0$ for some $a>0$ and let $b=\inf\{x:x>0,f(x)>0\}$. By continuity, we have $$ f(b)=0,\quad f(x)>0\text{ for }x>b $$ Over $(b,\infty)$ consider $g(x)=1/f(x)$. From the assumptions we get $$ g'(x)=-1 $$ and therefore $g(x)=k-x$ for some $k$. Hence $$ f(x)=\frac{1}{k-x}\quad (x>b) $$ which contradicts $f(b)=0$.
Similarly over $(-\infty,0)$.