What are the continuous functions $ x f(y)+y f(x)=(x+y) f(x) f(y) ? $ question - 
What are the continuous functions on $\mathbb{R}$ which are solutions of the equation
$$
x f(y)+y f(x)=(x+y) f(x) f(y) ?
$$
my try - 
by putting $y=x$ i get $f(x)=0$ or $1$ for all $x$ not equal to $0$...
now my answer is same as mention in book but i think it is incorrect because they are not valid for all $x$ ??? 
can someone tell how to fix this hole with the help of continuity ...
i know this is simple question but i want to clear my doubt...
thankyou

Wit $x=y$, we arrive at the necessary condition
$$2xf(x)=2xf(x)^2 $$
and hence $$\tag1f(x)\in\{0,1\}\quad\text{for }x\ne0. $$
The only continuous functions with this property are the constant functions
$$f(x)=0$$
and
$$f(x)=1. $$
Both are directly verified to indeed solve the original functional equation.

What if we drop continuity?
We still have $(1)$, but note that $f$ may jump discontinuously between $0$ and $1$.
Suppose $f(x_0)=0$ for at least one $x_0\ne 0$. Then with $y=x_0$, we get
$x_0f(x)=0 $
and hence 
$$ f(x)=0\quad\text{for all } x$$
as one solution (again).
So assume $f(x)=1$ for all $x\ne 0$. 
Then nothing can be said about $f(0)$, i.e., for any $c$,
$$f(x)=\begin{cases}c&x=0\\1&x\ne 0\end{cases} $$
is a solution, as one readily verifies.
