Equation solution set of $f^{-1}(x)=f(x)$? 
let $f(x)=-(x+2)^3-2 $ . Now what is the equation solution set of $f^{-1}(x)=f(x)$ ?


My try : I know that if a function $f$ is increasing in the domain $D$ on
which its inverse function $f^{-1}$ exists, and a lies in
$D$, then $f (a) = f^{-1}(a)$ if and only if $f(a) = a$
Now :
$$f'(x)=-3(x+2)^2 \leq 0$$ So function $f$ is  steady decreasing and $-f(x)$ is steady increasing. Thus these equations have the same solution :
$$f(x)=f^{-1}(x)\\-f(x)=-f^{-1}(x)\\-f(x)=x \to f(x)=-x$$
$$-(x+2)^3-2=-x \\ x = -3.7$$
It is right ?
 A: No, if you have $f(x) = f^{-1}(x)$, then $f(f(x)) = x$, but $f(f(-3.7)) = 2.913 \ne -3.7$, so it's wrong.  Since $f$ is monotone, $f(x)=f^{-1}(x)$ iff $f(f(x)) = x$.  Let $$g(x) := f(f(x))-x = -[(-(x+2)^3-2)+2]^3-2 - x = (x+2)^9 - 2 - x = (x+2)((x+2)^8-1)$$
Therefore, $f(f(x)) = x$ iff $g(x) = 0$ iff $x = -2$ or $(x+2)^8 = 1$, so $(x+2)^4 = (x+2)^2 = 1$, so $x + 2 = \pm1$ and $x = -3$ or $x = -1$.
Hence, $g(x)$ has only three real roots $-3,-2,-1$.

Checking: I'll use Julia to speed up the checking work.
julia> f(x) = -(x+2)^3-2
f (generic function with 1 method)
julia> f.(-3:-1)
3-element Array{Int64,1}:
 -1
 -2
 -3

The . in f.() means to apply user-defined function f element-wise on the range -3:-1.  For $x = -3$, it's the first element in the argument for f, so f(x) will be shown in the first element in the results (-1).  Then search for -3 in the results: it occurs at the last element, so it corresponds to the last element in the argument for f (-1).  The other two elements can be checked in the same way.
julia> f.(-10:10)
21-element Array{Int64,1}:
   510
   341
   214
   123
    62
    25
     6
    -1
    -2
    -3
   -10
   -29
   -66
  -127
  -218
  -345
  -514
  -731
 -1002
 -1333
 -1730

