10. find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $x, y \in \mathbb{R}$ holds for all $x, y \in \mathbb{R}$:

$$
f(x+y f(x+y))=y^{2}+f(x f(y+1))
$$
Solution: Set $y=0$ to

$$
f(x)=f(x f(1))
$$

to obtain Now set $x=0$ :

$$
f(y f(y))=y^{2}+f(0)
$$

It follows

$$
y^{2}+f(0)={ }^{(2)} f(y f(y))=f(y f(1) f(y f(1)))=(y f(1))^{2}+f(0)
$$

Set $y=1$ in it to get $f(1)^{2}=1$. We distinguish between two cases:

Case 1: $f(1)=-1$

From (1) it immediately follows that $f$ is even. Now set $x=y=-\frac{1}{2}$ in the original equation: $f\left(-\frac{1}{2}-\frac{1}{2} f(-1)\right)=\frac{1}{4}+f\left(-\frac{1}{2} f\left(\frac{1}{2}\right)\right) \Leftrightarrow f\left(-\frac{1}{2}-\frac{1}{2} f(1)\right)=\frac{1}{4}+f\left(\frac{1}{2} f\left(\frac{1}{2}\right)\right) \leftrightarrow f(0)=\frac{1}{2}+f(0)$, a contradiction. We first used the straightness of $f$ and then (2).

Case 2: $f(1)=1$

Put $y=1$ in (2) to get $f(0)=0$. We now show that $f$ is injective at position 1. So assume that $a \in \mathbb{R}$ holds with $f(a)=1$ (we already know that one exists). Let $y=a$ in $(2): a^{2}=f(a f(a))=f(a)=1$. So we only have to exclude the case $f(-1)=1$. Assuming that $f(-1)=1$ applies, inserting $y=-2$ and $x=1$ in the original equation leads to a contradiction: $f(1-2 f(-1))=4+f(f(-1)) \Leftrightarrow f(-1)=$ $4+f(1) \Leftrightarrow 1=5$. So $f$ is injective at 1 .

With $y=-1$ in the original equation, $f(x-f(x-1))=1$ now follows. With injectivity, this implies $f(x-1)=x-1$, i.e. $f(x)=x \forall x \in \mathbb{R}$.

- $+2 f(1)^{2}=1$
- $+1 f(1) \neq-1$
- +21 is the only real number that is sent to 1.
- 7 Finish the solution.