## Skills Review for Sequences

### Learning Outcomes

• Write the terms of a sequence defined by a recursive formula
• Calculate the limit of a function as 𝑥 increases or decreases without bound
• Recognize when to apply L’Hôpital’s rule

In the Sequences section, we will look at ordered lists of numbers (sequences) and determine whether they converge or diverge. Here we will review how to evaluate a recursive (recurrence) formula, take limits at infinity, and apply L’Hôpital’s Rule.

## Use a Recursive Formula

A recursive formula is a formula that defines its value at a particular input using the result of the previous input(s).

A recursive formula always has two parts: the value of an initial input and an equation defining each term in terms of preceding terms. For example, suppose we know the following:

\begin{align}&{a}_{1}=3 \\ &{a}_{n}=2{a}_{n - 1}-1, \text{ for } n\ge 2 \end{align}
We can find the subsequent terms of the recursive formula using the first term.
\begin{align}&{a}_{1}=3\\ &{a}_{2}=2{a}_{1}-1=2\left(3\right)-1=5\\ &{a}_{3}=2{a}_{2}-1=2\left(5\right)-1=9\\ &{a}_{4}=2{a}_{3}-1=2\left(9\right)-1=17\end{align}

So, the first four terms are $3,5,9,\text{ and},17$.

### How To: Given a recursive formula with only the first term provided, write the first $n$ terms of a sequence.

1. Identify the initial term, ${a}_{1}$, which is given as part of the formula. This is the first term.
2. To find the second term, ${a}_{2}$, substitute the initial term into the formula for ${a}_{n - 1}$. Solve.
3. To find the third term, ${a}_{3}$, substitute the second term into the formula. Solve.
4. Repeat until you have solved for the $n\text{th}$ term.

### Example: Writing the Terms of a Sequence Defined by a Recursive Formula

Write the first five terms of the sequence defined by the recursive formula.

\begin{align} {a}_{1}&=9 \\ {a}_{n}&=3{a}_{n - 1}-20\text{, for }n\ge 2 \end{align}

### Try It

Write the first five terms of the sequence defined by the recursive formula.

\begin{align}{a}_{1}&=2\\ {a}_{n}&=2{a}_{n - 1}+1\text{, for }n\ge 2\end{align}

## Take Limits at Infinity

Recall that $\underset{x \to a}{\lim}f(x)=L$ means $f(x)$ becomes arbitrarily close to $L$ as long as $x$ is sufficiently close to $a$. We can extend this idea to limits at infinity. For example, consider the function $f(x)=2+\frac{1}{x}$. As can be seen graphically in Figure 1 and numerically in the table beneath it, as the values of $x$ get larger, the values of $f(x)$ approach 2. We say the limit as $x$ approaches $\infty$ of $f(x)$ is 2 and write $\underset{x\to \infty }{\lim}f(x)=2$. Similarly, for $x<0$, as the values $|x|$ get larger, the values of $f(x)$ approaches 2. We say the limit as $x$ approaches $−\infty$ of $f(x)$ is 2 and write $\underset{x\to a}{\lim}f(x)=2$.

Figure 1. The function approaches the asymptote $y=2$ as $x$ approaches $\pm \infty$.

 $x$ 10 100 1,000 10,000 $2+\frac{1}{x}$ 2.1 2.01 2.001 2.0001 $x$ -10 -100 -1000 -10,000 $2+\frac{1}{x}$ 1.9 1.99 1.999 1.9999

More generally, for any function $f$, we say the limit as $x \to \infty$ of $f(x)$ is $L$ if $f(x)$ becomes arbitrarily close to $L$ as long as $x$ is sufficiently large. In that case, we write $\underset{x\to \infty}{\lim}f(x)=L$. Similarly, we say the limit as $x\to −\infty$ of $f(x)$ is $L$ if $f(x)$ becomes arbitrarily close to $L$ as long as $x<0$ and $|x|$ is sufficiently large. In that case, we write $\underset{x\to −\infty }{\lim}f(x)=L$. We now look at the definition of a function having a limit at infinity.

### Definition

(Informal) If the values of $f(x)$ become arbitrarily close to $L$ as $x$ becomes sufficiently large, we say the function $f$ has a limit at infinity and write

$\underset{x\to \infty }{\lim}f(x)=L$

If the values of $f(x)$ becomes arbitrarily close to $L$ for $x<0$ as $|x|$ becomes sufficiently large, we say that the function $f$ has a limit at negative infinity and write

$\underset{x\to -\infty }{\lim}f(x)=L$

If the values $f(x)$ are getting arbitrarily close to some finite value $L$ as $x\to \infty$ or $x\to −\infty$, the graph of $f$ approaches the line $y=L$. In that case, the line $y=L$ is a horizontal asymptote of $f$ (Figure 2). For example, for the function $f(x)=\frac{1}{x}$, since $\underset{x\to \infty }{\lim}f(x)=0$, the line $y=0$ is a horizontal asymptote of $f(x)=\frac{1}{x}$.

### Definition

If $\underset{x\to \infty }{\lim}f(x)=L$ or $\underset{x \to −\infty}{\lim}f(x)=L$, we say the line $y=L$ is a horizontal asymptote of $f$.

Figure 2. (a) As $x\to \infty$, the values of $f$ are getting arbitrarily close to $L$. The line $y=L$ is a horizontal asymptote of $f$. (b) As $x\to −\infty$, the values of $f$ are getting arbitrarily close to $M$. The line $y=M$ is a horizontal asymptote of $f$.

A function cannot cross a vertical asymptote because the graph must approach infinity (or negative infinity) from at least one direction as $x$ approaches the vertical asymptote. However, a function may cross a horizontal asymptote. In fact, a function may cross a horizontal asymptote an unlimited number of times. For example, the function $f(x)=\frac{ \cos x}{x}+1$ shown in Figure 3 intersects the horizontal asymptote $y=1$ an infinite number of times as it oscillates around the asymptote with ever-decreasing amplitude.

Figure 3. The graph of $f(x)=\cos x/x+1$ crosses its horizontal asymptote $y=1$ an infinite number of times.

### Example: Computing Limits at Infinity

For each of the following functions $f$, evaluate $\underset{x\to \infty }{\lim}f(x)$ and $\underset{x\to −\infty }{\lim}f(x)$.

1. $f(x)=5-\frac{2}{x^2}$
2. $f(x)=\dfrac{\sin x}{x}$
3. $f(x)= \tan^{-1} (x)$

### Try It

Evaluate $\underset{x\to −\infty}{\lim}\left(3+\frac{4}{x}\right)$ and $\underset{x\to \infty }{\lim}\left(3+\frac{4}{x}\right)$. Determine the horizontal asymptotes of $f(x)=3+\frac{4}{x}$, if any.

## Infinite Limits at Infinity

Sometimes the values of a function $f$ become arbitrarily large as $x\to \infty$ (or as $x\to −\infty )$. In this case, we write $\underset{x\to \infty }{\lim}f(x)=\infty$ (or $\underset{x\to −\infty }{\lim}f(x)=\infty )$. On the other hand, if the values of $f$ are negative but become arbitrarily large in magnitude as $x\to \infty$ (or as $x\to −\infty )$, we write $\underset{x\to \infty }{\lim}f(x)=−\infty$ (or $\underset{x\to −\infty }{\lim}f(x)=−\infty )$.

For example, consider the function $f(x)=x^3$. As seen in the table below and Figure 2, as $x\to \infty$ the values $f(x)$ become arbitrarily large. Therefore, $\underset{x\to \infty }{\lim}x^3=\infty$. On the other hand, as $x\to −\infty$, the values of $f(x)=x^3$ are negative but become arbitrarily large in magnitude. Consequently, $\underset{x\to −\infty }{\lim}x^3=−\infty$.

 $x$ 10 20 50 100 1000 $x^3$ 1000 8000 125,000 1,000,000 1,000,000,000 $x$ -10 -20 -50 -100 -1000 $x^3$ -1000 -8000 -125,000 -1,000,000 -1,000,000,000

Figure 2. For this function, the functional values approach infinity as $x\to \pm \infty$.

### Definition

(Informal) We say a function $f$ has an infinite limit at infinity and write

$\underset{x\to \infty }{\lim}f(x)=\infty$

if $f(x)$ becomes arbitrarily large for $x$ sufficiently large. We say a function has a negative infinite limit at infinity and write

$\underset{x\to \infty }{\lim}f(x)=−\infty$

if $f(x)<0$ and $|f(x)|$ becomes arbitrarily large for $x$ sufficiently large. Similarly, we can define infinite limits as $x\to −\infty$.

### Try It

Find $\underset{x\to \infty }{\lim}3x^2$.

## Apply L’Hôpital’s Rule

L’Hôpital’s rule can be used to evaluate limits involving the quotient of two functions. Consider

$\underset{x\to a}{\lim}\dfrac{f(x)}{g(x)}$

If $\underset{x\to a}{\lim}f(x)=L_1$ and $\underset{x\to a}{\lim}g(x)=L_2 \ne 0$, then

$\underset{x\to a}{\lim}\dfrac{f(x)}{g(x)}=\dfrac{L_1}{L_2}$

However, what happens if $\underset{x\to a}{\lim}f(x)=0$ and $\underset{x\to a}{\lim}g(x)=0$? We call this one of the indeterminate forms, of type $\frac{0}{0}$. This is considered an indeterminate form because we cannot determine the exact behavior of $\frac{f(x)}{g(x)}$ as $x\to a$ without further analysis. We have seen examples of this earlier in the text. For example, consider

$\underset{x\to 2}{\lim}\dfrac{x^2-4}{x-2}$ and $\underset{x\to 0}{\lim}\dfrac{ \sin x}{x}$

For the first of these examples, we can evaluate the limit by factoring the numerator and writing

$\underset{x\to 2}{\lim}\dfrac{x^2-4}{x-2}=\underset{x\to 2}{\lim}\dfrac{(x+2)(x-2)}{x-2}=\underset{x\to 2}{\lim}(x+2)=2+2=4$

For $\underset{x\to 0}{\lim}\frac{\sin x}{x}$ we were able to show, using a geometric argument, that

$\underset{x\to 0}{\lim}\dfrac{\sin x}{x}=1$

Here we use a different technique for evaluating limits such as these. Not only does this technique provide an easier way to evaluate these limits, but also, and more important, it provides us with a way to evaluate many other limits that we could not calculate previously.

The idea behind L’Hôpital’s rule can be explained using local linear approximations. Consider two differentiable functions $f$ and $g$ such that $\underset{x\to a}{\lim}f(x)=0=\underset{x\to a}{\lim}g(x)$ and such that $g^{\prime}(a)\ne 0$ For $x$ near $a$, we can write

$f(x)\approx f(a)+f^{\prime}(a)(x-a)$

and

$g(x)\approx g(a)+g^{\prime}(a)(x-a)$

Therefore,

$\dfrac{f(x)}{g(x)}\approx \dfrac{f(a)+f^{\prime}(a)(x-a)}{g(a)+g^{\prime}(a)(x-a)}$

Figure 1. If $\underset{x\to a}{\lim}f(x)=\underset{x\to a}{\lim}g(x)$, then the ratio $f(x)/g(x)$ is approximately equal to the ratio of their linear approximations near $a$.

Since $f$ is differentiable at $a$, then $f$ is continuous at $a$, and therefore $f(a)=\underset{x\to a}{\lim}f(x)=0$. Similarly, $g(a)=\underset{x\to a}{\lim}g(x)=0$. If we also assume that $f^{\prime}$ and $g^{\prime}$ are continuous at $x=a$, then $f^{\prime}(a)=\underset{x\to a}{\lim}f^{\prime}(x)$ and $g^{\prime}(a)=\underset{x\to a}{\lim}g^{\prime}(x)$. Using these ideas, we conclude that

$\underset{x\to a}{\lim}\dfrac{f(x)}{g(x)}=\underset{x\to a}{\lim}\dfrac{f^{\prime}(x)(x-a)}{g^{\prime}(x)(x-a)}=\underset{x\to a}{\lim}\dfrac{f^{\prime}(x)}{g^{\prime}(x)}$

Note that the assumption that $f^{\prime}$ and $g^{\prime}$ are continuous at $a$ and $g^{\prime}(a)\ne 0$ can be loosened. We state L’Hôpital’s rule formally for the indeterminate form $\frac{0}{0}$. Also note that the notation $\frac{0}{0}$ does not mean we are actually dividing zero by zero. Rather, we are using the notation $\frac{0}{0}$ to represent a quotient of limits, each of which is zero.

### L’Hôpital’s Rule (0/0 Case)

Suppose $f$ and $g$ are differentiable functions over an open interval containing $a$, except possibly at $a$. If $\underset{x\to a}{\lim}f(x)=0$ and $\underset{x\to a}{\lim}g(x)=0$, then

$\underset{x\to a}{\lim}\dfrac{f(x)}{g(x)}=\underset{x\to a}{\lim}\dfrac{f^{\prime}(x)}{g^{\prime}(x)}$,

assuming the limit on the right exists or is $\infty$ or $−\infty$. This result also holds if we are considering one-sided limits, or if $a=\infty$ or $-\infty$.

### Example: Applying L’Hôpital’s Rule (0/0 Case)

Evaluate each of the following limits by applying L’Hôpital’s rule.

1. $\underset{x\to 0}{\lim}\dfrac{1- \cos x}{x}$
2. $\underset{x\to 1}{\lim}\dfrac{\sin (\pi x)}{\ln x}$
3. $\underset{x\to \infty }{\lim}\dfrac{e^{\frac{1}{x}}-1}{\frac{1}{x}}$
4. $\underset{x\to 0}{\lim}\dfrac{\sin x-x}{x^2}$

### Try It

Evaluate $\underset{x\to 0}{\lim}\dfrac{x}{\tan x}$.

We can also use L’Hôpital’s rule to evaluate limits of quotients $\frac{f(x)}{g(x)}$ in which $f(x)\to \pm \infty$ and $g(x)\to \pm \infty$. Limits of this form are classified as indeterminate forms of type $\infty / \infty$. Again, note that we are not actually dividing $\infty$ by $\infty$. Since $\infty$ is not a real number, that is impossible; rather, $\infty / \infty$ is used to represent a quotient of limits, each of which is $\infty$ or $−\infty$.

### L’Hôpital’s Rule ($\infty / \infty$ Case)

Suppose $f$ and $g$ are differentiable functions over an open interval containing $a$, except possibly at $a$. Suppose $\underset{x\to a}{\lim}f(x)=\infty$ (or $−\infty$) and $\underset{x\to a}{\lim}g(x)=\infty$ (or $−\infty$). Then,

$\underset{x\to a}{\lim}\dfrac{f(x)}{g(x)}=\underset{x\to a}{\lim}\dfrac{f^{\prime}(x)}{g^{\prime}(x)}$,

assuming the limit on the right exists or is $\infty$ or $−\infty$. This result also holds if the limit is infinite, if $a=\infty$ or $−\infty$, or the limit is one-sided.

### Example: Applying L’Hôpital’s Rule ($\infty /\infty$ Case)

Evaluate each of the following limits by applying L’Hôpital’s rule.

1. $\underset{x\to \infty }{\lim}\dfrac{3x+5}{2x+1}$
2. $\underset{x\to 0^+}{\lim}\dfrac{\ln x}{\cot x}$

### Try It

Evaluate $\underset{x\to \infty }{\lim}\dfrac{\ln x}{5x}$