Find all functions $f$ :- $\mathbb{N}$ $\to$ $\mathbb{N}$ such that :- $xf(y) + yf(x) = (x + y)f(x^2 + y^2)$

So here is the Question :-

Find all functions $$f$$ :- $$\mathbb{N}$$ $$\to$$ $$\mathbb{N}$$ such that :- $$xf(y) + yf(x) = (x + y)f(x^2 + y^2)$$ I tried substituting values for $$x$$ and $$y$$, but I couldn't reach to a possible clue to the solution. Any hints or suggestions will be greatly appreciated!

• What is $N$? $\mathbb{N}$? If so, do you consider $0$ to be an element of $\mathbb{N}$? – Hayden Jun 6 '20 at 4:24
• N consists the set of natural numbers , 0 is not included . – Anonymous Jun 6 '20 at 4:25
• Plugging in the first numbers gives $f(1)=f(2)=f(5)$. Every constant function is a solution. The question is if that's all; unless I'm wrong, we get by a kind of induction $f(m)=f(1)$ for all $m$ which are sums of two squares, and maybe on other $m$, $f(m)$ is arbitrary. – Torsten Schoeneberg Jun 6 '20 at 4:35
• Okay , if you have an idea or so , can you just write it as a solution instead of a comment ? – Anonymous Jun 6 '20 at 4:42
• Fair point. Done. – Torsten Schoeneberg Jun 6 '20 at 5:00

Suppose there exists an integer $$n$$ such that $$f(1) . With $$x=1$$ and $$y=n$$, we have $$nf(1)+f(n) = (n+1)f(n^2+1) \implies f(1) where $$g(n)=n^2+1$$. Repeating the same argument using $$f(1), we deduce that $$f(1) where $$g^m(\cdot)$$ denotes the composition of the function $$g$$ repeated $$m$$ times.

However, there cannot be more than $$f(n)-f(1)-1$$ integers between $$f(n)$$ and $$f(1)$$. Thus, (1) leads to contradiction because $$f(x)\in\mathbb{N},\forall x\in\mathbb{N}$$. Hence, $$f(1)\nless f(n).$$

Using similar arguments, we can show that $$f(1)\ngtr f(n)$$. Therefore, we conclude that $$f(x)=f(1)$$ for all values of $$x$$ which trivially satisfies the given relation.

Setting $$x=y=1$$ gives $$f(1)=f(2)$$. From there, try to show via induction that $$f(1)=f(n)$$ for all $$n$$ which are sums of two squares.

Remains the question if $$f(n)$$ can be defined arbitrarily on other $$n$$. For a counterexample, see comment by user Explorer (thanks!). I do not know if one can conclude further, and whether there are non-constant $$f$$ which satisfy the criterion.

EDIT: I realise what I had in mind here might not work. One only gets the following: If $$f(x)=f(y)$$, then $$f(x^2+y^2)=f(x)$$ as well, and starting with the above, one easily constructs infinitely many numbers $$n$$ with $$f(n)=f(1)$$. But to show that is true for all $$n$$, one needs more work, as in the other answer.

• $f(n)$ cannot be arbitrary for other values of $n$. For example, with $x=y=5$, we get $$f(1)=f(5^2+5^2)=f(50)=f(7^2+1)=\frac{f(7)+7f(1)}{7+1}\implies f(7)=f(1).$$ However, $7$ can not be written as sum of two squares. – Explorer Jun 6 '20 at 5:52