Method to show that a limit exisits and evaluate the limit of a function as x tends to infinity. 
Exam Question:

For each of the following functions f , determine whether $\lim_{x\to\infty}f(x)$
exists, and compute the limit if it exists. In each case, justify your answers.
a) $f(x)= \dfrac{x+2}{x^2+8}$
b) $f(x)= \dfrac{\cos(x)}{x^2}$

Attempt:
a) I think you divided by the leading power of $x$, and then use algebra of limits to show that the limit is equal to $0$.
  b) I don't think this limit exits as $\cos(x)$ is a periodic function.

What is the correct method to answer this question? 
 A: You're right about (a). For rational functions, the limit (for $x \to \pm \infty$) will always be zero if the denominator has a higher degree than the numerator; in your case:
$$\lim_{x \to +\infty} \frac{x+2}{x^2+8} = \lim_{x \to +\infty} \frac{1/x+2/x^2}{1+8/x^2} = \frac{0}{1} = 0$$
Addendum: and if it's the other way around (degree higher in the numerator), the limit will be $\pm \infty$ (check the sign). When the degree of numerator and denominator is the same, the limit will be the ratio of the highest order coefficients.

For (b): consider the fact that $-1 \le \cos x \le 1$ (for all $x$), but the denominator (which is $x^2$) tends to...? You may have heard of the squeeze or sandwich theorem? Dividing by $x^2$:
$$\color{green}{
-\frac{1}{x^2}} \le \color{blue}{
\frac{\cos x}{x^2}} \le \color{red}{
\frac{1}{x^2}}$$
Since green and red tend to $0$, also blue... 
A: Keep in mind
$$
\frac{-1}{x^2} \leq \frac{\cos x}{x^2} \leq \frac{1}{x^2}
$$
what is the limit of $\frac{\pm 1}{x^2}$ when $x\to \infty$ ?
