Question. Which of the following statements are true:
If $f \in C[0,2]$ is such that $f(0)=f(2)$, then there exist $x_1$ and $x_2$ in $[0,2]$ such that $x_1-x_2=1$ and $f(x_1)=f(x_2)$.
Let $f$ and $g$ be continuous real valued functions on $\mathbb{R}$ such that for all $x\in \mathbb{R}$, we have $f(g(x))=g(f(x))$. If there exists $x_0 \in \mathbb{R}$ such that $f(f(x_0))=g(g(x_0))$, then there exists $x_1\in \mathbb{R}$ such that $f(x_1)=g(x_1)$.
My Attempts.
Here $f(0)=f(2)$. If $f(1) \ne f(0)$, say, $f(1)>f(0)$ then for any $k$ such that $f(0)<k<f(1)$ there exists a $x_1,x_2$ with $0<x_1<1$ and $1<x_2<2$ such that $f(x_1)=f(x_2)=k$ (by Intermediate Value Property of $f$). But how can I prove $x_2-x_1=1$? Please help.
I don't have any guess here to start...
For 1) you can consider :
$$ g(x) = f(x+1) - f(x)$$
$g$ is continuous and verify :
$$ g(1) = f(2) - f(1) = f(0) - f(1) = -(f(1) - f(0)) =-g(0)$$
Then $g$ sign is changing and by the intermediate value theorem you can such $x_1$ and $x_2$. Using the same idea for 2) you'll have the result.
For 2), pose $h(x) = f(x) - g(x)$. Using the hypothesis :
\begin{align*} h(f(x_0)) &= f(f(x_0)) - g(f(x_0)) \\ &=g(g(x_0)) - f(g(x_0)) \\ &= -h(g(x_0)) \end{align*}
So it means that $h$ sign is changing and since $h$ is continuous, the intermediate value theorem gives you that you can find $x_1$ such as $h(x_1) = f(x_1) - g(x_1) =0$.