Denote by $S$ the set of all positive integers. Find all functions $f: S \rightarrow S$ such that $f \big(f(m)^2 + 2f(n)^2\big) = m^2 + 2 n^2$ for all $m,n \in S$.
Obviously, the identity function $f(n)=n$ is such a function and I do not know how to prove or disprove it.
This is solved on the Art of Problem Solving High School Olympiad forum.