## Problem 1

Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

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

for all real $x$.


Solution 1. Notice that $f(f(f(x)))=^{2} 1-f(f(x))={ }^{2} f(x)$. This is equation 3 . By substituting $f(x)$ for $x$ in the first equation we get:

$$
f(\underline{f(x)})={ }^{1} f(f(\underline{f(x)}) f(1-\underline{f(x)}))={ }^{2} f(f(f(x)) f(f(f(x))))={ }^{3} f(f(f(x)) f(x))
$$

Again we substitute $f(x)$ for $x$ above:

$$
f(f(\underline{f(x)}))=f(f(f(\underline{f(x)})) f(\underline{f(x)}))
$$

Equation 3 applied on both sides gives us:

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

But this is the same as what we started with so

$$
f(x)=f(f(x) f(f(x)))=f(f(x))={ }^{2} 1-f(x)
$$

Therefore $f(x)=\frac{1}{2}$, which is a solution.
