Find all continuous functions $f:\mathbb{R}\to\mathbb{R}$ such that $f(f(x))=x$ for all $x\in\mathbb{R}.$
It is easy to see that $f$ must be bijective. Since $f$ is continuous, we must have that $f$ is either strictly increasing or strictly decreasing.
Suppose $f$ is strictly increasing. Suppose there is some $x\in\mathbb{R}$ with $f(x)≠x.$ Suppose $f(x)<x.$ Then, $f(f(x))<f(x).$ So, $x<f(x).$ Contradiction. So, $f(x)≥x.$ Assume $f(x)>x.$ Then, $f(f(x))>f(x).$ So, $x>f(x).$ Contradiction. Hence we must have $f(x)=x.$ Another contradiction. So, our original assumption is false, and hence $f(x)=x$ for all $x\in\mathbb{R}.$
If $f$ is strictly decreasing, I haven't been able to solve this in general. I've noticed that $f(x)=-x+b$ works for any $b\in\mathbb{R}.$ I'm not sure if there are any other functions. It's clear that any such $f$ is it's own inverse. So, upon reflecting the graph of $f$ along the line $y=x,$ we must get back the same graph. Maybe this will help, as it gives a geometric picture to work with.
Edit: Yes, I know that there are uncountably many such functions. I am looking for examples of strictly decreasing ones like the one Julio provided in the comments.
Edit 2: Quite naively, I was hoping for a simple description of such functions. I thought that such a description would exist as there's only one such function that's strictly increasing. Kind of surprising that the strictly decreasing case is so much more subtle.