# IWM, Volume 13(2007), Issue 3, Problem 307

Find all functions $f:\mathbb{R}\to \mathbb{R}$ such that $\forall x,y,z\in\mathbb {R}\;f((x+z)(y+z))=(f(x)+f(z))(f(y)+f(z))\;(1).$

My solution.

If there is exists $C\in\mathbb{R}$ such that $f(x)=C\forall x\in\mathbb{R}$ then by (1) we have $C=4C^2$, so $C=0$ or $\dfrac{1}{4}$. If there is not such $C$ then choose $x=y=z=0$ in (1) we have $f(0)=0$ or $\dfrac{1}{4}$
(A)If $f(0)=0$

Setting $z=0$ in (1) we see that $f(xy)=f(x)f(y)\;\forall x,y\in\mathbb{R}\;\ (2)$

In (2) if put $x=y=\sqrt{t}(t\geq 0)$ we have $f(x)\geq 0\forall x\geq 0\; (3)$

So in (2) choose $x=y=1$ then $f(1)=0$ or $1$.

(A-1)If $f(1)=0$

In (2) choose $y=1$ then $f(x)=0\forall x\in\mathbb{R}$ contradiction!

(A-2)If $f(1)=1$

In (1) put $x=y=1-z$ we have $(f(z)+f(1-z))^2=1\forall z\in\mathbb{R}\; (4)$ So in (1) choose $y=1-z$ we see that $f(x+z)=(f(x)+f(z))(f(1-z)+f(z))\forall x,z\in\mathbb{R}$ $\Rightarrow f^2(x+z)=(f(x)+f(z))^2\forall x,z\in\mathbb{R}(\text{by (4)})$ $\Rightarrow f(x+z)=f(x)+f(z)\forall x,z\geq 0(\text{by (3)})\; (5)$

Now, in (1) choose $y=-z$ then $(f(x)+f(z))(f(z)+f(-z))=0\forall x,z\in\mathbb{R}\; (6)$

By $f$ isn’t const, from (6) we have $f(z)+f(-z)=0\forall z\in\mathbb{R}\; (7)$

From (5) and (7) we have $f(x+y)=f(x)+f(y)\forall x,y\in\mathbb{R}\; (8)$

By (2),(8) and $f$ isn’t const we have $f(x)=x\forall x\in\mathbb{R}$.

(B)If $f(0)=\dfrac{1}{4}$

In (1) choose $y=z=0$ then $f(x)=\dfrac{1}{4}\forall x\in\mathbb{R}$, contradiction!

Now, by checking direct (1) we have answer: $f(x)=0\forall x\in\mathbb{R}\; , f(x)=\dfrac{1}{4}\forall x\in\mathbb{R}\; , f(x)=x\forall x\in\mathbb{R}.$