Question to find all functions satisfying the functional equation $ f \left( f ( m ) ^ 2 + f ( n ) ^ 2 \right) = m ^ 2 + n ^ 2 $ Find all $f:\mathbb{N_{0}}\to\mathbb{N_{0}}$ satisfying
$$f(f(m)^{2}+f(n)^{2})=m^{2}+n^{2}\text{, for all }m,n\in\mathbb{N_{0}}$$
Just to clarify, the set $\mathbb{N_{0}}$ refers to the set of non negative integers. Getting back to the question, I was able to prove that $f$ is injective and I also noticed that the identity function is a solution. However, I am not able to complete my proof. I am also unable to find the initial values at 0,1 to try and proceed by induction. I request somebody to provide a solution for this. Any help is much appreciated :)
 Here is how I proved injectivity of the function. If $f(m)=f(n)$, then
$$f(f(m)^{2}+f(n)^{2})=f(f(m)^{2}+f(m)^{2})$$
$$\Rightarrow m^{2}+n^{2}=m^{2}+m^{2}$$
$$\Rightarrow m=n$$
We are ignoring negative value due to range of the function.
 A: *

*$f$ is injective:
$f(n)=f(m) \to m^2+n^2=f(f(m)^2+f(n)^2)=f(f(m)^2+f(m)^2)=m^2+m^2 \to m=n$

*$f$ is not constant: suppose $f(m)=c$ for all $m\in\mathbb{N}_0$. Then $f(2c^2)=m^2+n^2=c$ for all $m,n$. Absurd.

Now, the condition implies $f[f[f(m)^2+f(n)^2)]]=f(m^2+n^2)$.
Putting $m'=f(m)$ and $n'=f(n)$ we have
$f[f[f(m')^2+f(n')^2)]]=f(m'^2+n'^2)=f(f(m)^2+f(n)^2)=m^2+n^2$
Because $f$ is injective, and we have 2 values with image $m^2+n^2$ then:
$f[f(m')^2+f(n')^2)]=f(f(m)^2+f(n)^2)$
Again, because $f$ is injective
$f(m')^2+f(n')^2)=f(m)^2+f(n)^2$
$f(m')^2-f(m)^2=f(n')^2-f(n)^2$
$[f(m')-f(m)][f(m')+f(m)]=[f(n)-f(n')][f(n)+f(n')]$
Both sides of the equality depend on different variables, so it must be a constant. Suppose this constant is not 0. But the equality is in $\in\mathbb{N}_0$, so we know that $f(m')+f(m)\geq f(m)$ would be bounded, absurd since $f$ is injective.That is, the product $[f(m')-f(m)][f(m')+f(m)]$ must be $0$.
Now, $f(m')+f(m)=0 \to f(m)=0 \text{ and } f(m')=0 \to m'=m$. If $f(m')-f(m)=0 \to f(m')=f(m) \to m'=m$. So, $m'=m$ for all $m$, ie $f(m)=m$.
