if we have $(f(x))^2 = 2 \int_0^xf, \ \forall x>0,$ then $f(x) =x \ \forall x\geq0$. Let $f: [0, \infty) \to \Bbb R$ be continuous and $f(x) \neq 0 \forall x>0$. If we have $$(f(x))^2 = 2 \int_0^xf, \ \forall x>0,$$
then $f(x) =x \ \forall x\geq0$.
We have $(f(x))^2 = 2 \int_0^xf, \ \forall x>0,$. Differentiating we have $2f(x)f'(x) = 2f(x) \implies f'(x) = 1 $. Thus  $f(x) =x \ \forall x\geq0$. Is the proof correct?

The proof is not entirely correct. A priori you don't know that $f $ is differentiable. 
In the original equation, the right-hand-side is differentiable. So $f(x)^2 $ is differentiable. As $f $ is never zero, it cannot change sign; and on any interval not containing zero, the square root is differentiable. So $f $ is differentiable. 
Now you can use your argument to see that $f (x)=x+c $, and specializing the original equation at  $x=0$ you get that  $c=0$.
