Prove that there is no continuous function $f:\mathbb{R}\to\mathbb{R}$ such that for all $x\in \mathbb{R},f(f(x))= \cos x$.
I would so appreciate if someone can give me a hint!
Prove that there is no continuous function $f:\mathbb{R}\to\mathbb{R}$ such that for all $x\in \mathbb{R},f(f(x))= \cos x$.
I would so appreciate if someone can give me a hint!
I'm following Sergei Ivanov's argument from this answer.
Suppose that $f$ is such a continuous function. Using real analysis, the equation $\cos(x) -x =0$ has a unique real solution $x_0$. The number $y_0=f(x_0)$ satisfies $$\cos(y_0)=f(f(y_0))=f(f(f(x_0))) = f(\cos(x_0))=f(x_0)=y_0,$$ so that it is a fixed point of $\cos$, which yields $y_0=x_0$.
Therefore, $x_0$ being a fixed point of $\cos = f \circ f$, you could find a neighborhood $V$ of $x_0$ such that $f$ is injective in $V$. In particular, $f\vert_V$ is monotone. In all cases, $f \circ f$ is increasing on $V$. But $\cos$ is decreasing around $x_0$, as you can see for instance here: