Find all increasing idempotent functions on $\mathbb{R}$

Supposing that you mean strictly increasing :

$ f \circ f=f \Leftrightarrow f(f(x)) = f(x)$

But $f: \Bbb R \to \Bbb R$ is a strictly increasing function, which means it is $"1-1"$ as well. So, we got :

$f(f(x)) = f(x) \Leftrightarrow f(x) = x$ which is an increasing function $\Bbb R \to \Bbb R$


Let's suppose you mean non-strictly increasing, since the other two answers have the strict case sewn up.

This permits the example of constant functions, since after all they are non-strictly monotonic, and $f \circ g = f$, regardless of $g$.

Does it permit anything else?

Well, suppose we're only piecewise constant. Then we require that each of $f$'s constant values are a fixed point of $f$, by idempotence, so we might imagine the class of functions which are piecewise constant and such that every "piece" intersects the line $f(x) = x$ on the graph.

Indeed, let's suppose, without loss of generality, that $x \le f(x)$. Then for all $y$ between the two, we have: \[\begin{array}{rrrcll} & x &\le& y &\le& f(x) & \\ \implies & f(x) &\le& f(y) &\le& f(f(x)) & \text{by monotonicity} \\ \implies & f(x) &\le& f(y) &\le& f(x) & \text{by idempotence} \\ \implies & f(x) &=& f(y) \end{array}\]

Thus, every $x$ with $x \not= f(x)$ has $f$ constant on the closed interval between them, and so:

Any such $f$ is the identity function, interrupted by up to countably many (open or closed or half-open) intervals on which it is instead constant, taking a value which falls inside that interval.

(Countably many because you can't interrupt a function by uncountably many disjoint intervals, since they each contain a rational).

A perhaps more familiar example of such a thing is the integer part (or floor) function.


Because $f$ is increasing it is also an injection, we have $f(f(x)) = f(x)$ for all $x$ which implies $f(x) = x$ for all $x$ therefore the only solution is the identity and it is easy to see that the identity is indeed a solution.