If $f(x)\leq f(f(x))$ for all $x$, is $x\leq f(x)$? 
If I have $f(x)\leq f(f(x))$ for all real $x$, can I deduce $x\leq f(x)$?

Thank you.
 A: Let $f(x)=1$.  Then $f(f(x))\leq f(1)=1$.  However, $2\geq f(2)=1$ so that the conclusion does not follow.
A: Let $f$ map $-1$ to $-2$ and all other values to $0$. Then $f(-1)<-1$ but $f(f(x))\geq f(x)$ for all $x$.
A: For an example showing that even strict inequality $f(x)<f(f(x))$ for all $x$ does not imply $x\leq f(x)$ for all $x$, consider
$$
  f: x\mapsto \begin{cases} -\frac{|x|}2 &\text{if }x\neq0\\ \\-1&\text{if }x=0\\
          \end{cases}
$$
The discontinuity at $x=0$ is inevitable, since a continuous function $\mathbf R\to\mathbf R$ that has both points $x$ where $x<f(x)$ and other points where $x>f(x)$ must have some fixed points with $x=f(x)$.
A: No.
Suppose $f(x)=1$.
$\left\{ 
\begin{array}{l}
f(x)=f(f(x))=1 \\ 
1\leq1
\end{array}
\right. \therefore f(x) \leq f(f(x))
$ for all real $x$.
If $x>1$, $f(x)<x \therefore x\not\leq f(x)$.

A: *

*YES if $f$ is monotonically increasing in the smallest interval containing  $x$ and $f(x)$ 

*NO if $f$ is monotonically decreasing in the smallest interval containing  $x$ and $f(x)$ 

*If $f = k$ is a constant function, then it is TRUE for all $x\le k$ and FALSE for all $x>k$

*NOT NECESSARILY TRUE in any other case.

A: No. Suppose $f$ is a constant function.....
A: If $f$ satisfies the above conditions, then:


*

*For all $x \in Im(f)$ we have $x \leq f(x)$. In particular, if $f(x)$ is onto then, the problem is true.
To see this, let $y$ be so that $x=f(y)$, then $f(y) \leq f(f(y)) \Rightarrow x \leq f(x)$.

*There exists non onto functions which satiesfy the above condition for which, $x \leq f(x)$ if and only if $x \in Im(f)$. For example $f(x)=\frac{x-|x|}{2}$.
A: No, when the function which is a decreasing function did not meet the result. Such as $f(x)=-x$,only when $x\geq 0$, $f(x)\leq f(f(x))$; but at the same time, $x\geq f(x)$.
A: If $f(x)<f(f(x))$ for all $x$ and $f$ is continuous then $x<f(x)$ for all $x$:
Define a continuous function $g$ by $g(x)=x-f(x)$. Now $g(f(0))=f(0)-f(f(0))<0$, so $g$ is below the $x$-axis at some point. Since $g(x)=0$ would imply $x=f(x)$ and hence $f(x)=f(f(x))$, we get $g(x)\ne 0$ for all $x$. Thus, $g(x)<0$ for every $x$.
A: Well.. here is a sufficient condition:
If $f$ is invertible and monotonically increasing then $f^{-1}$ exits and is also monotonically increasing and therefore  $f(x)\leq f(f(x)) \implies f^{-1}(f(x)) \leq f^{-1}(f(f(x))) \implies x \leq f(x)$.
A: For a slightly non-trivial example, $f(x) = - \vert x \vert$. We then have that $$f(f(x)) = - \vert f(x) \vert = -\vert-\vert x \vert \vert = - \vert x \vert = f(x)$$
However, $x \geq f(x)$ for all $x \in \mathbb{R}$ and in fact $x > f(x)$ for all $x \in \mathbb{R}^+$.
