# Find all $f:\mathbb R\to\mathbb R$ such that $\forall x,y\in\mathbb R$ the given equality holds: $xf(y)+yf(x)=(x+y)f(x)f(y)$.

Find all $f:\mathbb R\to \mathbb R$ such that $\forall x,y\in\mathbb R$ the given equality holds: $$xf(y)+yf(x)=(x+y)f(x)f(y)$$

My try:

whenever $y=0$, we have $$x\cdot f(0)\cdot(1-f(x))=0$$

So the solutions can be either generated by: $$f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$$

where $c$ generate an infinite amount of solutions, or it can be any function satisfying $f(0)=0$.

However, I can't seem to find a way to check such a solution on the initial equation (we have to check it since we've simply eliminated the impossible solutions and we've only found that the solutions can be somehow generated using the way I've shown).

Note that this generates the trivial solutions $f(x)=0$ and $f(x)=1$ as well.

Is my reasoning correct?

If so, how can I check whether all the generated functions satisfy the initial equation?

Off-topic, but do $f^2(x)$ and $f(x)^2$ denote the same concept? My teacher uses the former while my book uses the latter (for squaring $f(x)$). Which one is correct, or are both of them correct?

• Note that if you plug $y=0$ into your original equation you have $xf(0) = xf(x)f(0) \forall x$, so if $f(0)\neq 0$ then your solutions are much more tightly constrained. – Steven Stadnicki Jun 3 '14 at 18:22
• Yes, you are right. But, you haven't proved that you already covered all functions. – Jlamprong Jun 3 '14 at 18:22
• @Jlamprong I'm not sure what you mean. I have proved that whatever the solutions the initial equation has, they can be generated using the formula I've given. – user26486 Jun 3 '14 at 18:25
• @StevenStadnicki It follows that the solutions can be generated by $$f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$$ or it can be any function satisfying $f(0)=0$, if my reasoning is correct. – user26486 Jun 3 '14 at 18:29
• @StevenStadnicki I've edited the question. – user26486 Jun 3 '14 at 18:38

You're most of the way there; now just show that your piecewise $f$ works for arbitrary $x$ and $y$. You may find it easiest to break the analysis into four cases: $x,y\neq 0$; $x=0, y\neq 0$; $x\neq 0, y=0$; and $x, y=0$. For instance, for the last case, you have $xf(y)+yf(x) = 0\cdot c+0\cdot c = 0 = (0+0)\cdot c\cdot c = (x+y)\cdot f(x)\cdot f(y)$. You should find similar results in the other cases.

But note that not every function satisfying $f(0)=0$ satisfies the equation; what happens if you take e.g. $f(x) = \sin x$, $x=y=\frac\pi4$? What you've shown is that every function with $f(0)=0$ satisfies the equation when we choose one of $x,y$ to be $0$, but the equation has to hold for arbitrary $x$ and $y$. You may find it useful to set $x=y$ and see what the resultant restriction on $f(x)$ is.

Incidentally, the approach that you're taking is the typical way of solving these questions: find special values of $x$ or $y$ that simplify the equation considerably and turn it into a one-parameter equation. For instance, taking $x=0$ here (obviously) simplifies the equation considerably; so does taking $x=y$.

• What I meant was if the solution can't be generated by $f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$, then $f(0)=0$. – user26486 Jun 3 '14 at 19:09
• I haven't fully understood the solution yet. When $f(0)\neq0$, it's clear that $f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$ generates all the solutions. How to go on with the case $f(0)=0$? – user26486 Jun 3 '14 at 20:12
• We have that the solution $f(x)=0$ isn't generated by $f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$, so there has to be something about the case $f(0)=0$ that creates such a solution. – user26486 Jun 3 '14 at 20:21
• @mathh If $f(a)=0$ for some $a \not =0$, then putting $y=a$ gives $af(x)=0 \, \forall x$ so $f(x)=0 \, \forall x$. Otherwise $f(x) \not =0$ for $x \not =0$. Putting $x=y$ gives $2xf(x)=2xf(x)^2$. For $x \not =0$ we have $xf(x) \not =0$ by above so $f(x)=1$. Thus $f(x)=\begin{cases} c \, c \in \mathbb{R} \, x=0 \\ 1 \, x \not =0 \end{cases}$. – Ivan Loh Jun 3 '14 at 20:26
• @IvanLoh It seems like our problem was that we analysed the case $y=0\implies xf(0)(1-f(x))=0$ and got lost when we were left with the case $f(0)=0$, which was never able to provide us the rest of the solutions. However, when we analysed the case $x=y$, we could check all the cases and finish our solution. I think that was the problem. – user26486 Jun 3 '14 at 20:48

Your solution is not complete. You have only identified a necessary condition. It is not obvious, not true, that they are sufficient conditions.

• That's why I emphasized: "However, I can't seem to find a way to check such a solution on the initial equation (we have to check it since we've simply eliminated the impossible solutions and we've only found that the solutions can be somehow generated using the way I've shown)." You shold've read the entire description before commenting. – user26486 Jun 4 '14 at 10:55
• Ivan Loh has posted the full solution in the comments. The final solutions are the functions $f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$ and $f(x)=0$. – user26486 Jun 4 '14 at 11:17
• One of the main questions that were highlighted in brown was "If so, how can I check whether all the generated functions satisfy the initial equation?" – user26486 Jun 4 '14 at 12:40