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?
 A: 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$.
A: Let's see what happens
if we assume
$(f(x))^a = b \int_0^xf(t)dt, \ \forall x>0
$.
(Note:
I write
$f^a(x)$
for
$(f(x))^a$.)
Differentiating
as you did,
$a f'(x)f^{a-1}(x)
=b f(x)
$
or
$ f'(x)f^{a-2}(x)
=b/a
$.
If $a=1$,
then
$f'(x)/f(x)
=b
$,
or
$\ln f(x)
=bx+c
$
or
$f(x)
=e^{bx+c}
$.
Putting this in 
the original equation,
$e^{bx+c}
=b\int_0^x e^{bt+c}dt
=e^c(e^{bx}-1)
$
which is not true
for any real $b$.
If $a \ne 1$,
since
$(f^{a-1}(x))'
=(a-1)f^{a-2}(x) dx
$,
$(f^{a-1}(x))'
=(a-1)b/a
$,
so
$f^{a-1}(x)
=(a-1)bx/a+c
$
or
$f(x)
=((a-1)bx/a+c)^{1/(a-1)}
$.
Since $f(0) = 0$,
$c = 0$,
so
$f(x)
=((a-1)bx/a)^{1/(a-1)}
$.
If $a=b=2$,
as in the original problem,
$f(x)
=x
$.
A: You have to prove $f$ is differentiable first. 
Let $g=f^2$. Then $g$ is differentiable for $f$ is continuous and $\int_0^xfdx$ is integrable. Since $f\ne 0$,
$$
\dfrac{g(x+\Delta x)-g(x)}{\Delta x}=\dfrac{f^2(x+\Delta x)-f^2(x)}{\Delta x}=\dfrac{f^2(x+\Delta x)-f^2(x)}{f(x+\Delta x)-f(x)}\cdot \dfrac{f(x+\Delta x)-f(x)}{\Delta x}
$$
Or
$$
\dfrac{f(x+\Delta x)-f(x)}{\Delta x}=\dfrac{g(x+\Delta x)-g(x)}{\Delta x}\cdot\dfrac{f(x+\Delta x)-f(x)}{f^2(x+\Delta x)-f^2(x)}
$$
Since $y^2$ is differentiable and $f$ is continuous 
$$
\dfrac{f(x+\Delta x)-f(x)}{f^2(x+\Delta x)-f^2(x)}=\dfrac1{\dfrac{f^2(x+\Delta x)-f^2(x)}{f(x+\Delta x)-f(x)}}
$$
is differentiable. Also $g$ is differentiable, and thus $f$ is differentiable.
The rest of your proof is correct.
A: You are on the right track, but you have gone in the wrong direction. If we look at your statement
$$ f'(x) = 1 \implies f(x) = x$$
This is incorrect. Consider
$$C \in \mathbb{R} \setminus \{ 0 \} : f(x) = x + C \implies f'(x) = 1, \ f(x) \not = x$$
Usually these sorts of proofs are brought together in the end by the mean value theorem. In this case I would look at the function
$$ g(x) = f(x) - x$$
and prove that $\forall x \in \mathbb{R}^+ : g(x) = 0$. By the MVT we have
$$ \exists c \in (0,x) : g'(c) = \frac{g(x) - g(0)}{x}$$
Can you take it from here?
