> 
> $f(f(x))=f(x),$ for all $x\in\Bbb R$ suppose $f$ is differentiable, show $f$ is constant or $f(x)=x$
> 
> 
> 

Clearly, $f'(f(x))f'(x)=f'(x)$. This implies for each $x$, $f'(f(x))=1$, or $f'(x)=0$. But this is not enough.