Find the limit of $\frac {x^2+x} {x^2-x-2}$ where $x \to -1$? I need to find the limit of $\frac {x^2+x} {x^2-x-2}$ where $x \to -1$. Right now I am getting $\frac{0}{0}$ if I don't factor first, or $\frac{2}{0}$ if I do.
Here are my factoring steps:
$\frac {x^2+x} {x^2-x-2}$
$=\frac{x(x+1)}{(x-2)(x+1)}$
replace $x$ with $-1$
$=\frac{-1(-1+1)}{(-1-2)(-1+1)}$
$=\frac{2}{-3 (0)}$
$=\frac{2}{0}$
How can I solve this problem?
 A: You can't plug it in since the function $f(x) = {x^2+x\over x^2-x-2}$ is not continuous at $x=-1$. 
You have to cancel it first by $x+1$, then you can plug it in.
A: $$\frac{x^2+x}{x^2-x-2}=\frac{x(x+1)}{(x-2)(x+1)}=\frac x{x-2}\xrightarrow[x\to-1]{}\frac{-1}{-3}=\frac13$$
The above is justified by the fact that taking the limit when $\;x\to-1\;$ means $\;x\;$ gets closer and closer to $\;-1\;$ but never equals it in this limit process.
To calculate a limit as $\;x\to a\;$  is the same as substituting $\;x=a\;$ in the function iff the function is continuous at $\;a\;$ , otherwise it may fail...as in this case, where the function's not even defined at $\;x=-1\;$ 
A: Just factorise:
$$\frac{x^2+x}{x^2-x-2} \equiv \frac{x(x+1)}{(x-2)(x+1)}$$
Assuming $x \neq -1$, we can divide the numerator and denominator by $x+1$. For all $x \neq -1$, we have
$$\frac{x^2+x}{x^2-x-2} = \frac{x}{x-2}$$
As $x \to -1$, we see that 
$$\frac{x^2+x}{x^2-x-2} \to \frac{-1}{-1-2} = \frac{1}{3}$$
A: In your approach, you noticed that the function you are taking the limit of is effectively $f(x)=\frac{x}{x-2}$ but undefined at $x=-1$. It IS however, defined all the way up to $-1$, so you can take the limit of this $f$, which is simply $f(-1)$
A: In addition to factoring to solve this problem, you can also use L'Hôpital's rule because when plugging $x=-1$ directly into the function gives you $\frac 00$.
Take derivative of top and bottom to get $\frac{2x+1}{2x-1}$ and then plug in $x=-1$ to get $\frac{-1}{-3}=\frac 13 $
https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule
A: $$
\begin{align}
x^2-x-2
&=x^2-2x\frac{1}{2}+\left(\frac{1}{2}\right)^2-\left(\frac{1}{2}\right)^2-2\\
&=\left(x-\frac{1}{2}\right)^2-\frac{1}{4}-\frac{2\cdot4}{4}\\
&=\left(x-\frac{1}{2}\right)^2-\frac{9}{4}\\
&=\left(x-\frac{1}{2}\right)^2-\left(\frac{3}{2}\right)^2\\
&=\left(x-\frac{1}{2}-\frac{3}{2}\right)\left(x-\frac{1}{2}+\frac{3}{2}\right)\\
&=(x-2)(x+1)
\end{align}
$$
Now, things are going to cancel out nicely:
$$
\lim\limits_{x \rightarrow -1}\frac {x^2+x} {x^2-x-2}=
\lim\limits_{x \rightarrow -1}\frac {x(x+1)} {(x-2)(x+1)}=
\lim\limits_{x \rightarrow -1}\frac {x} {x-2}=\frac{-1}{-1-2}=\frac{-1}{-3}=\frac{1}{3}.
$$
