For the question:
Find the $\lim_{x \to 1} \frac{3x^3 - 5x^2 + x + 1}{x^2 - 2x + 1}$
I couldn't see how to factorize the numerator and noticed that it was in intermediate form $\frac{0}{0}$ so I applied L'Hôpital's rule twice which left me with:
$\frac{18x - 10}{2}$
which I evaluated at $x \rightarrow 1$ to get the limit of 4.
I then typed the problem into wolfram alpha and noticed that, although I got the same answer, WA had factored out $x^2 - 2x +1$ which cancels with the denominator and then the function can be evaluated to equal 4 without using L'Hôpital's.
I was wondering if my use of L'Hôpital's rule here is unjustified, and if so, what would have been the method to factor the numerator?