Find all real numbers $x$ such that $f(x) = f(f(x))$, where $f(x) = x^2 - 3x + x^3 - 7x^2 + 5x.$
f(x) = x^3 -6x^2 + 2x
f (f(x)) = [ x^3 - 6x^2 + 2x]^3 - 6 [ x^3 -6x^2 + 2x]^2 + 2[ x^3 - 6x^2 + 2x] =
x^9 - 18 x^8 + 114 x^7 - 294 x^6 + 300 x^5 - 312 x^4 + 154 x^3 - 36 x^2 + 4 x
So
x^3 -6x^2 + 2x = x^9 - 18 x^8 + 114 x^7 - 294 x^6 + 300 x^5 - 312 x^4 + 154 x^3 - 36 x^2 + 4 x
x^9 - 18 x^8 + 114 x^7 - 294 x^6 + 300 x^5 - 312 x^4 + 153 x^3 - 30 x^2 + 2 x = 0
With a little help from WolframAlpha :
Solutions are :