> [!Question] Problem
> Determine all functions $f:\mathbb{N}^+\to \mathbb{N}^+$ such that for all $x,y\in \mathbb{N}^+,$ $xf(y)+yf(x)=(x+y)f(x^2 + y^2)$
###### Solution:
For all $x\in \mathbb{N}^+,$ $2xf(x)=2xf(2x^2)$ and dividing by $2x^2\neq 0$ gives $f(x)=f(2x^2).$In summary, for any $a\in\mathbb{N}^+,$ there are arbitrarily large $N$ such that $f(a)=f(N).$
Also for all $x\in \mathbb{N}^+,$ $xf(1)+f(x)=(x+1)f(x^2 +1).$Thus, $xf(1)+f(x)\equiv 0 \pmod{x +1}$Since $x\equiv -1 \pmod{x+1},$ $f(x)\equiv f(1) \pmod{x+1}$
Finally, fix $a\in \mathbb{N}.$ WTS $f(a)=f(1).$ Choose $N$ larger than $f(a)+f(1)$ such that $f(a)=f(N).$ Then $f(a)=f(N)\equiv f(1) \pmod{N+1}$and so $f(a)=f(1).$
###### Solution
The constant function $f(x)=k$ where $k$ is a positive integer is the only possible solution.
BWOC, suppose there exists $a,b\in \mathbb{N}$ such that $f(a)<f(b)$ then $(a+b)f(a)<af(b)+b f(a) < (a+b)f(b)$or equivalently, using the formula, $(a+b)f(a)<(a+b)f(a^2 +b^2)<(a+b)f(a)$and dividing through by $(a+b)$ gives $f(a)<f(a^2 +b^2)<f(b)$that is, between any two different values of $f$ we can insert another. But this cannot go on forever since $f$ takes only integer values.