<s>[INST] How to factorise $x^4 - 3x^3 + 2$, so as to compute the limit of a quotient? Question:

Find the limit: $$\lim_{x \to 1}\frac{x^4 - 3x^3 + 2}{x^3 -5x^2+3x+1}$$

The denominator can be simplified to: $$(x-1)(x^2+x)$$
However, I am unable to factor the numerator in a proper manner (so that $(x-1)$ will cancel out)
I know upon graphing that the limit is $5\over4$. What should I do here?
Note: To be done without the use of L'Hospital Rule
 [/INST] Using the Euclidean division we get
$$\begin{array}\\x^4-3x^3+2&\Bigg|&x-1\\ 
-(x^4-x^3)&\Bigg|&x^3\\
=-2x^3+2&\Bigg|&-2x^2\\
-(-2x^3+2x^2)\\
=-2x^2+2&\Bigg|&-2x\\-(-2x^2+2x)\\=-2x+2&\Bigg|&-2
\end{array}$$
so we find that
$$x^4-3x^3+2=(x-1)(x^3-2x^2-2x-2)$$
</s>