<s>[INST] How to factorize a 4th degree polynomial? 
I need help to factorise the following polynomial:
$x^4 - 2x^3 + 8x^2 - 14x + 7$

The solution I need to reach is $(x-1)(x^3 - x^2 + 7x - 7)$. I need to factorize to this exactly as it is for a limit question where I cancel out the $(x-1)$ in the numerator and denominator. How do I proceed?
 [/INST] One may recognize the factorization of the polynomial(#): $$y^2+8y+7=(y+1)(y+7)$$
Also(^)
$$-2x^3-14x=-2x(x^2+7)$$
From (#), when $y=x^2$, we obtain(*)
$$x^4+8x^2+7=(x^2+1)(x^2+7)$$
Combine(*) and (^), we have
\begin{align}
x^4-2x^3+8x^2-14x+7&=(x^2+1)(x^2+7)-2x(x^2+7)\\&=(x^2-2x+1)(x^2+7)\\&=(x-1)^2(x^2+7)
\end{align}
</s>