TITLE: How can you factor $x^4-6x^3+8x^2+2x-1?$
QUESTION [10 upvotes]: The original question is:
Solve this equation for x:
$$(x^2-3x+1)^2-3(x^2-3x+1)+1=x$$
I expanded and simplified it to get
$$x^4-6x^3+8x^2+2x-1=0$$
Since neither -1 nor 1 are factors, it appears that the roots will be fractional. How can I proceed from here? Thanks.

REPLY [3 votes]: Hint:
$f(x)=x^2(x-3)^2-(x-1)^2$

REPLY [2 votes]: Let $f(x) = x^2 -3x + 1$
Note that the original equation is in the form $f(x)^2 - 3f(x) + 1 = x$, and the LHS is equivalent to $f(f(x))$.
So you know that the required roots are the roots of $f(f(x)) = x$.
Apply the inverse function to both sides to get $f(x) = f^{-1}(x)$.
Graphically, the inverse function is formed by reflecting the function in the line of identity $y = x$. This implies that the two points of intersection between $y=f(x)$ and $y=x$ will give the required roots.
So all you have to solve is $x^2 - 3x + 1 = x$ or $x^2 - 4x + 1 = 0$.
(Of course, it's strictly improper to speak of an inverse function here, since the quadratic is not bijective. If you wanted to be rigorous, you could split the domain up to make the same argument).