TITLE: How to find the following limit algebraically?
QUESTION [6 upvotes]: I've been trying to answer this for a while and I know it's a simple question relative to most questions that are posted here.
$$
\lim_{x\rightarrow -2}\: \frac{x^4+5x^3+6x^2}{x^2(x+1)-4(x+1)}
$$
If we substitute -2 for $ x $ we get $ 0/0 $, an indeterminate form. I figured that the denominator can be rewritten as $ (x^2-4)(x+1) $. And then I tried to factor something in the numerator but couldn't see anything interesting. How do I find the limit algebraically?
I know that the answer is supposed to be 1, but I don't know how they got there.
Thanks in advance!

REPLY [30 votes]: The fact the numerator becomes zero after plugging in $x = -2$ means that $(x + 2)$ is a factor of the numerator; that is the "interesting" thing you can factor out. You can factor it out of the denominator for the same reason.
Doing so gives
$$ \lim_{x\rightarrow -2}\: \frac{x^4+5x^3+6x^2}{x^2(x+1)-4(x+1)}
= \lim_{x\rightarrow -2}\: \frac{(x+2)(x^3 + 3x^2)}{(x+2)(x^2 - x - 2)}  = \lim_{x\rightarrow -2}\: \frac{x^3 + 3x^2}{x^2 - x - 2} $$
and this limit can be found by plugging in $x = -2$.