2

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.

aqualubix
  • 3,029
  • 2
    https://math.stackexchange.com/a/1299393/578498 – Bruno Andrades Dec 14 '24 at 13:56
  • 1
    What kind of description do you expect to get? Every continuous function $\mathbb{R} \to \mathbb{R}$ the graph of which is symmetric over the line $y = x$ is a solution, and it is quite evident that there is a wild abundance of such functions. – Adayah Dec 14 '24 at 13:58
  • I think there are a lot of possibilities, and very bad ones e.g. $f(x) = \left{ \begin{array}{l} -2x \quad \text{if} , x\ge 0\ -x/2 \quad \text{else}\end{array}\right.$ – julio_es_sui_glace Dec 14 '24 at 13:59
  • 1
    @CalvinLin, no. Is it supposed to? – aqualubix Dec 14 '24 at 14:01
  • If you take an increasing bijection $g$ from $\mathbb R_+ \to \mathbb R_+$ and $f(x-x_0) = -g(x)$ if $x\ge x_0$ and $f(x-x_0) = g^{-1}(-x)$ else should work. Finding the unique fixed point of $f$ would be important – julio_es_sui_glace Dec 14 '24 at 14:06
  • Oh silly me. I landed there from the linked question "functions which are their own inverse" and thought it was still about involutions, but it clearly isn't. Sorry about that. – Calvin Lin Dec 14 '24 at 14:13
  • @CalvinLin, no problem :) – aqualubix Dec 14 '24 at 14:16
  • And then you study $g(x) = f(x+x_0)-x_0$ – julio_es_sui_glace Dec 14 '24 at 14:19
  • Are you asking just for examples or what? One cannot describe all such functions in closed form because any arbitrary curve would satisfy if mirrored. – Anixx Dec 14 '24 at 14:39

2 Answers2

0

So as you said when $f$ is increasing, it is easy, now when $f$ is decreasing, set $g(x) = x-f(x)$ which is increasing, continuous and has limits $\pm \infty$ in $\pm \infty$. Using the IVT, we get the existence of a unique point $x_0$ satisfying $g(x_0) = 0$ which means $f(x_0) = x_0$.

Now you set $h(x) = f(x_0-x) - x_0$, we have $h(0) = 0$, $h$ is increasing and bijective and $$h\circ h(x) = f(x_0-(f(x_0-x) - x_0)) - x_0) - x_0 = f(f(x_0-x)) -x =x_0-x-x_0= -x$$ Which means $h^{-1} (x) = h(-x)$, so since $h(\mathbb R_+) \subset \mathbb R_+$ and the converse for $\mathbb R_-$, the data of $h$ is equivalent to the data of $k: \mathbb R+ \to \mathbb R_+$ continuous bijective and increasing by setting $h(x) = k(x)$ for $x\ge 0$and $h(-x) = -k^{-1}(x)$ for $x\le 0$.

This means that

$$f(x_0-x)-x_0 = \begin{cases} k(x)& \text{if} \,x \ge 0\\ -k^{-1}(-x) & \text{else} \end{cases}$$ or in other words $$f(x) = \begin{cases} k(x_0-x)+x_0& \text{if} \,x \le x_0\\ -k^{-1}(x_0-x)+x_0 & \text{else} \end{cases}$$

And of course all of these function work.

-1

Any function $y=f(x)$ whose plot is symmetric against the $y=x$ line satisfies your property. There is infinitely many such functions.

Taking any arbitrary strictly decreasing curve such as $f(x)\le x$ or $f(x)\ge x$ you can mirror it against the $y=x$ axis and the both curves will together constitute a function that satisfies your demands.

Anixx
  • 10,161