8. Find all continuous functions $f: \mathbf{R} \rightarrow \mathbf{R}$ such that

$$
f(x+f(y))=f(x)+y
$$

for every $x, y \in \mathbf{R}$.

## Geometry
8. By setting $x=0$ and then $y=0$ in the relation, we get

$$
f(f(y))=y+f(0), \quad f(x+f(0))=f(x)
$$

Now

$$
f(x)=f(x+f(0))=f(f(f(x)))=f(x)+f(0)
$$

and hence $f(0)=0$. Thus from (1) we have $f(f(y))=y$. Now

$$
f(x+y)=f(x+f(f(y)))=f(x)+f(y)
$$

and the continuity of $f$ implies that $f(x)=a x$ for some $a \in \mathbf{R}$. From the relation in the problem we get

$$
a(x+a y)=a x+y
$$

## Figure 9

for all $x, y \in \mathbf{R}$, i.e. $a= \pm 1$. Therefore

$$
f(x)=x \quad \text { or } \quad f(x)=-x
$$