Let $f(x)$ be a differential real function defined on the real line. If $f(0)=0$ and $f'(x)=[f(x)]^2$, then $f(x)=0$ foi any $x$. Again, $f:\mathbb{R}\to\mathbb{R}$ is differentiable, $f(0)=0$, and $f'(x)=[f(x)]^2$ for every $x$. A friend suggested the following argument:
If exists $c$ such that $f(c)\neq0$, there exists an interval $I$ around $c$ such that $f(x)\neq0$ if $x\in I$ (because $f$ is continuous since it is differentiable). In that interval, we could define $g(x)=x+\frac{1}{f(x)}$. This function $g$ would be differentiable and $g'(x)=0$. Then $g(x)$ is constant, for example, $k$. Then, $f(x)=\frac{1}{k-x}$ for $x\in I$
But I don't know where to find an absurd. What should I do next?
I think I should use the fundamental theorem of calculus and try to find an absurd with $f(x)=\int_0^x f'(t)dt=\int_0^x [f(t)]^2 dt$, but I also didn't got anywhere.
Thanks in advance.

By contradiction.  First, suppose $f(x)\ne 0$ for some $x>0.$ For $x\geq 0,$ for brevity let $F(x)=\sup_{0\leq y\leq x}|f(y)|=\sup_{0\leq y\leq x}|f(y)-f(0)|.$
Let $r=\sup \{x\geq 0: F(x)=0\}=\sup \{x\geq 0:\forall y\in [0,x]\;(f(y)=0)\}.$
For $x> r:$  Since $f(t)=0$ for $t\in [0,r],$  we have $F(x)=\sup_{r\leq y\leq x}|f(y)|=\sup_{r\leq y\leq x}|f(y)-f(r)|.$ Therefore $$F(x)=   \sup_{r\leq y\leq x}|\int_r^yf(t)^2dt|\leq$$ $$\leq    \sup_{r\leq y\leq x}\int_r^y F(x)^2dt=$$ $$=   \sup_{r\leq y\leq x} (y-r)F(x)^2=$$ $$=(x-r)F(x)^2.$$ So $x>r\implies F(x)\leq (x-r)F(x)^2.$  
Now by def'n of $r,$ for every $x>r$ there exists $x'\in (r,x)$ with $f(x')\ne 0,$ so if $x>r$ then $F(x)\geq |f(x')|>0.$
So for $X>r$ we have  $0<F(x)\leq (x-r)F(x)^2,$ implying $\frac {1}{x-r}\leq F(x).$ 
So $\lim_{x\to r^+}F(x)=\infty.$ This is impossible  because $\sup \{F(x): r< x\leq r+1\}\leq F(r+1)<\infty. $
Second, the case where $f(x)\ne 0$ for some $x<0$ is handled similarly.  
