Suppose that $f$ is continuous on $[0,\infty)$ such that $f(x)>0$ for all $x>0$ and that $f^2(x)=2\int_0^x f(t)\,dt$ for all $x>0$. Prove that $f(x)=x$ for all $x\geq 0$.
Attempt at a proof: Let $f(t)=t$ for all $t\geq 0$. Since $f$ is continuous on $[0,\infty)$, $f(t)=t$ is integrable. Then \begin{align*} f^2(x)&=2\int_0^x f(t)\, dt \\ &=2\int_0^x t\, dt \\ &=2\frac{t^2}{2}\Big|_0^x \\ &=2\frac{x^2}{2} \\ &=x^2 \end{align*} Therefore $f(x)=x$ for all $x\geq 0$.