1. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that
$$
f(2 x y)+f(f(x+y))=x f(y)+y f(x)+f(x+y)
$$
for all real numbers $x$ and $y$.
Solution: The only functions are $f(x)=0, f(x)=x$ and $f(x)=2-x$. It can be checked that these are indeed solutions.
Substituting $x$ and $\frac{1}{2}$ for $x$ and $y$ respectively yields
$$
f(x)+f\left(f\left(x+\frac{1}{2}\right)\right)=x f\left(\frac{1}{2}\right)+\frac{1}{2} f(x)+f\left(x+\frac{1}{2}\right)
$$

On the other hand, substituting $x+\frac{1}{2}$ and 0 for $x$ and $y$ respectively yields
$$
f(0)+f\left(f\left(x+\frac{1}{2}\right)\right)=\left(x+\frac{1}{2}\right) f(0)+f\left(x+\frac{1}{2}\right)
$$

Subtracting the two equations then yields
$$
f(x)-f(0)=2 x f\left(\frac{1}{2}\right)-2 x f(0) \Longrightarrow f(x)=2 x\left[f\left(\frac{1}{2}\right)-f(0)\right]+f(0) \text {, }
$$
which implies that $f(x)$ is linear. Substituting $f(x)=a x+b$ to the given functional equation then gives the three answers.