Consider the following limit:

$$\lim_{x \rightarrow -2} \frac{x^2+7x+10}{x^2-x-6}$$This is a limit of a quotient, so we check the limiting values of the numerator and denominator. If the limiting value of the denominator is not zero, we can express this limit of a quotient as a quotient of limits.

Sadly, that doesn't happen here. The limits of both the numerator and denominator are zero.

The curious thing, however, is why they both ended up with limiting values of zero. Of course, both the top and bottom are polynomials, so their limiting values are found by simply plugging in $x = -2$ in the numerator and denominator.

Obviously then, if we plug in $x=-2$ into the entire expression, we get a non-sensical "$0/0$".

The important observation is that this indeterminant form is due to a common factor of $(x+2)$ present in both the numerator and denominator.

Cancelling this common factor reveals a function with the same limiting value as our initial rational expression as $x \rightarrow -2$, which we can then find:

$$\lim_{x \rightarrow -2} \frac{x^2+7x+10}{x^2-x-6} = \lim_{x \rightarrow -2} \frac{(x+5)(x+2)}{(x-3)(x+2)} = \lim_{x \rightarrow -2} \frac{x+5}{x-3} = -\frac{3}{5}$$Interestingly, we can extend this idea of "canceling a troublesome factor" to other expressions that have indeterminant form upon direct substitution -- ones that take the indeterminant form "$\pm \infty/\infty$".

Consider this limit: $$\lim_{x \rightarrow +\infty} \frac{3x^2 + 5x - 1}{6x^2 + 7x + 2}$$

Here, the limiting values of the numerator and denominator are both $+\infty$. Just like before, when we sought a common factor that "caused" the numerator and denominator to both be zero upon direct substitution -- we now look for a common factor that can cause the numerator and denominator to grow without bound as $x \rightarrow \infty$.

Looking carefully at the terms in the numerator and denominator, we notice several grow infinitely large as $x \rightarrow +\infty$.

Importantly, some of these terms grow faster than others.

For example, $3x^2$ grows much faster than $5x$. Likewise, $6x^2$ grows much faster than $7x$. Both of these statements are true because $x^2$ grows much faster than $x$.

With this in minde, to resolve the limit, let us try to "cancel" the fastest growing element present in the denominator. In this particular case, that suggests we should cancel a factor of $x^2$ from both the numerator and denominator.

Equivalently, let us multiply the top and bottom by $\frac{1}{x^2}$:

$$\lim_{x \rightarrow +\infty} \frac{3x^2 + 5x - 1}{6x^2 + 7x + 2} = \lim_{x \rightarrow +\infty} \frac{3x^2 + 5x - 1}{6x^2 + 7x + 2} \cdot \frac{\frac{1}{x^2}}{\frac{1}{x^2}} = \lim_{x \rightarrow +\infty} \frac{3 + \frac{5}{x} - \frac{1}{x^2}}{6 + \frac{7}{x} + \frac{2}{x^2}}$$Of course, this final limit is easy to evaluate, as all of the little fractions with $x$s in the denominator now have limiting values of zero (and thus can then be ignored), which leads to

$$\lim_{x \rightarrow +\infty} \frac{3 + \frac{5}{x} - \frac{1}{x^2}}{6 + \frac{7}{x} + \frac{2}{x^2}} = \lim_{x \rightarrow +\infty} \frac{3 + 0 - 0}{6 + 0 + 0} = \frac{1}{2}$$Let's look at using this same technique to evaluate two other limits:

$$\lim_{x \rightarrow -\infty} \frac{9x^2-2x-5}{x^3+8} \quad \textrm{ and } \quad \lim_{x \rightarrow \infty} \frac{2x^3+8x}{x^2+7}$$In the first, we divide top and bottom by the fastest growing element in the denominator, $x^3$, to find:

$$\lim_{x \rightarrow -\infty} \frac{9x^2-2x-5}{x^3+8} = \lim_{x \rightarrow -\infty} \frac{\frac{9}{x} - \frac{2}{x^2} - \frac{5}{x^3}}{1 + \frac{8}{x^3}} = \lim_{x \rightarrow -\infty} \frac{0 - 0 - 0}{1 + 0} = 0$$In the second, we do something similar -- except now the fastest growing element in the denominator is $x^2$ -- to find:

$$\lim_{x \rightarrow \infty} \frac{2x^3+8x}{x^2+7} = \lim_{x \rightarrow \infty} \frac{2x + \frac{8}{x}}{1 + \frac{7}{x^2}} = \lim_{x \rightarrow \infty} \frac{2x + 0}{1 + 0} = \lim_{x \rightarrow \infty} 2x = +\infty$$Careful consideration of the three examples above should reveal the following "shortcut" for finding the limits at infinity of rational expressions:

For polynomials $p(x)$ and $q(x)$, $\displaystyle{\lim_{x \rightarrow \pm \infty} \frac{p(x)}{q(x)}}$ will take on one of three values:

If the degrees of $p(x)$ and $q(x)$ agree, the limiting value will be the ratio of the leading coefficients of $p(x)$ and $q(x)$.

If the degree of $p(x)$ is less than the degree of $q(x)$, the limiting value will be $0$.

If the degree of $p(x)$ is greater than the degree of $q(x)$, the limiting value will be infinite. (Although, whether this limit is $+\infty$ or $-\infty$ depends on the expression and what $x$ is approaching.)