TITLE: Determine all functions $f:\mathbb{N}\rightarrow\mathbb{N}$ such that $xf(y)+yf(x)=(x+y)f(x^2+y^2)$ for all $x,y\in\mathbb{N}$ (contest question)
QUESTION [8 upvotes]: The question below is from the 2002 Canada National Olympiad. I have found one family of functions but need help in finding (or proving the non-existence) of others. Suggestions on how to improve the solution method (especially rigour of arguments) would also be appreciated.

Let $\mathbb{N} = {0,1,2,\dots}$. Determine all functions $f : \mathbb{N} \rightarrow \mathbb{N}$ such that 
$xf(y) + yf(x) = (x + y)f(x^2 + y^2) \tag{1}$
for all $x,y \in \mathbb{N}$.


Expressing $f$ as a power series:
$f(t) = a_0 + \displaystyle{\sum\limits_{k=1}^{\infty}{a_k x^k}} \tag{2}$
Assuming the power series is convergent, the general coefficient, $a_n$, is the same on both sides of equation (1). [I am not sure of this step].
So for $a_0$
$x(a_0) + y(a_0)=(x+y)(a_0)$
which is satisfied for all values of $a_0$. Hence $\boxed{f(t)=a_0,\:a_0\in\mathbb{N}}$ is a solution.
For any $n > 0$, we have
$\begin{align}
x a_n y^n + y a_n x^n &= (x+y)a_n(x^2+y^2)^n \iff \\ 
a_n(xy^n+yx^n) &= a_n(x+y)(x^2+y^2)^n
\end{align}$
and if this is true for fixed $n>0$ and all $x,y\ge0$ then $a_n=0$. So I am unable to find any other functions.

REPLY [7 votes]: Set $y=0$. This gives us
$$xf(0)=xf(x^2)$$
for all $x$, and so $f(x^2)=f(0)$ for all $x$.
Now take $x=3n^2$ and $y=4n^2$ for some $n$. We get that
$$3n^2 f(4n^2) + 4n^2 f(3n^2) = 7n^2 f(25n^4)$$
Since $f(4n^2)=f(25n^4)=f(0)$, we get
$$4n^2 f(3n^2) = 4n^2 f(0)$$
and so $f(3n^2)=f(0)$ for all $n$.
Next, let $x=12n^2$ and $y=5n^2$ for some $n$. Then
$$12n^2 f(5n^2) + 5n^2 f(12n^2) = 17n^2 f(169n^4)$$
Again, since $f(12n^2)=f(169n^4)=f(0)$, we get that
$$12n^2 f(5n^2) = 12n^2 f(0)$$
and so $f(5n^2)=f(0)$ for all $n$.
Now let $x=2n^2$ and $y=n^2$ for some $n$. We get that
$$2n^2 f(n^2) + n^2 f(2n^2) = 3n^2 f(5n^2)$$
and since $f(n^2)=f(5n^2)=f(0)$, we get that
$$n^2 f(2n^2) = n^2 f(0)$$
giving us that $f(2n^2)=f(0)$ for all $n$.
Finally, let $x=y$. This gives us
$$2xf(x) = 2xf(2x^2)=2xf(0)$$
for all $x$, and so $f(x)=f(0)$ for all $x$.
Thus the only functions satisfying the equation are constant functions, and we can check that any constant function does indeed satisfy the equation.