TITLE: Finding the limit of a fraction: $\lim_{x \to 3} \frac{x^3-27}{x^2-9}$
QUESTION [5 upvotes]: Find $$\lim_{x \to 3} \frac{x^3-27}{x^2-9}$$

What I did is:
\begin{align}
\lim_{x \to 3} \frac{x^3-27}{x^2-9} &= \lim_{x \to 3} \frac{(x-3)^3+9x-27x}{(x-3)(x+3)} = \lim_{x \to 3} \frac{(x-3)^3+9(x-3)}{(x-3)(x+3)} \\
&= \lim_{x \to 3} \frac{(x-3)^3}{(x-3)(x+3)} + \lim_{x \to 3} \frac{9(x-3)}{(x-3)(x+3)} \\
&= \lim_{x \to 3} \frac{(x-3)^2}{(x+3)} + \lim_{x \to 3} \frac{9}{(x+3)} =0  + \frac{9}{6}
\end{align}
Wolfram factor the numerator to $(x-3)(x^2+3x+9)$ is there a quick way to find this?

REPLY [4 votes]: Wolfram factor the numerator to $(x-3)(x^2+3x+9)$ is there a quick way to find this?

Generally, you have
$$
a^{n+1}-b^{n+1}=(a-b)(a^n+a^{n-1}b+a^{n-2}b^2+\cdots+a^2b^{n-2}+ab^{n-1}+b^n)
$$ (to see this expand the right hand side, then terms telescope).
Then apply it to $a=x$, $b=3$, $n=2$ giving
$$
x^3-27=(x-3)(x^2+3x+9).
$$

REPLY [2 votes]: $$\lim_{x \to 3}\frac{x^3-27}{x^2-9}=\frac{0}{0}=\\\lim_{x \to 3}\frac{(x^3-27)'}{(x^2-9)'} =\\ \lim_{x \to 3}\frac{3x^2}{2x}=\\ \lim_{x \to 3}\frac{3x^2}{2x}\\=\lim_{x \to 3}\frac{3x}{2}=\frac{9}{2}$$