Exercise about continuous functions

Solution 1:

Extend $f$ to be $0$ outside the interval $[0,1]$, so that now it is defined on $\mathbb{R}$ (and is still continuous). Your requirement is equivalent to $x_2=x_1+f(x_1)$, $f(x_2)=f(x_1)>0$, $x_1,x_2\in [0,1]$.

So it suffices to find $x_1\in (0,1)$ such that $f(x_1+f(x_1))=f(x_1)$ (then putting $x_2:=x_1+f(x_1)$ we get $x_2>x_1$ and, since $f(x_2)=f(x_1)>0$, we get $x_2\in (0,1)$).

Thus we want to find a zero of $s(x):=f(x+f(x))-f(x)$. Clearly $s(\overline{x})\le 0$ at the point $\overline{x}\in (0,1)$ which realizes the maximum of $f$. But by continuity you can find $z\in (0,1)$ such that $z+f(z)=\overline{x}$ (since $x\mapsto x+f(x)$ fixes $0$ and $1$), so you also get $s(z)=f(\overline{x})-f(z)\ge 0$. Thus, again by continuity, $s$ must have a zero between $\overline{x}$ and $z$.