5  Computing Limits

The previous chapter defined limits of functions and proved that they behave well: they are unique, they pass through arithmetic, and they can be squeezed. What it did not do is compute anything. The \(\varepsilon\)–\(\delta\) definition is a way to check a candidate limit, and for most functions nobody wants to guess. This chapter is about finding the value.

The plan is short. For most functions, the answer is just substitution, and the limit laws explain why. The interesting cases are the ones where substitution produces \(\tfrac00\). There, one idea does nearly all the work: the limit ignores the point itself, so we are free to replace the function by a simpler one that agrees with it everywhere else. Factoring, difference of powers and rationalization are three ways of finding that simpler function. A single geometric inequality then handles \(\frac{\sin x}{x}\).

5.1 When Substitution Works

Two limits are immediate from the definition. For a constant function \(f(x) = c\), any \(\delta\) works, so \(\lim_{x \to a} c = c\). For \(f(x) = x\), take \(\delta = \varepsilon\), so \(\lim_{x \to a} x = a\). The limit laws (Theorem 4.3) then build everything else.

Proposition 5.1 (Substitution) If \(p\) is a polynomial, then \(\lim_{x \to a} p(x) = p(a)\). If \(p, q\) are polynomials and \(q(a) \ne 0\), then \[ \lim_{x \to a} \frac{p(x)}{q(x)} = \frac{p(a)}{q(a)}. \]

Since \(x \to a\), repeated use of the product law gives \(x^k \to a^k\). The constant multiple and sum laws then give \(c_k x^k \to c_k a^k\) and, term by term, \(p(x) \to p(a)\). For the quotient, \(p(x) \to p(a)\) and \(q(x) \to q(a) \ne 0\), so the quotient law applies. \(\square\)

So \(\lim_{x\to 2}\dfrac{x^2+1}{x+3} = \dfrac55 = 1\), with nothing to prove beyond the proposition. For these functions the limit at \(a\) equals the value at \(a\), and the whole subject of limits looks like an elaborate way of evaluating. It is not, as the following three limits show: \[ \lim_{x \to 1} \frac{x^2 - 1}{x - 1}, \qquad \lim_{x \to 0} \frac{\sqrt{1+x} - 1}{x}, \qquad \lim_{x \to 0} \frac{\sin x}{x}. \] Substituting gives \(\tfrac00\) each time. The quotient law requires the denominator’s limit to be nonzero, so it says nothing here, and the proposition does not apply.

5.2 What \(\tfrac00\) Does and Doesn’t Mean

The symbol \(\tfrac00\) is not a number, and it is not a verdict. It reports that the tool we tried does not apply. Look at four quotients whose numerator and denominator both tend to \(0\) at \(x = 0\):

Quotient For \(x \ne 0\) it equals Limit at \(0\)
\(\dfrac{x^2}{x}\) \(x\) \(0\)
\(\dfrac{3x}{x}\) \(3\) \(3\)
\(\dfrac{x}{x^3}\) \(\dfrac{1}{x^2}\) none (unbounded)
\(\dfrac{x\sin(1/x)}{x}\) \(\sin(1/x)\) none (oscillates)

Every one of them has the form \(\tfrac00\), and the outcomes are a limit of \(0\), a limit of \(3\), and two different kinds of failure. The form carries no information. What decides the answer is how fast the numerator and denominator go to zero relative to each other, and that is exactly what algebra can expose.

The reason algebra is allowed to help is a one-line consequence of the definition.

Lemma 5.1 (Agreeing Away from the Point) Suppose \(f(x) = g(x)\) for all \(x \in E\) with \(0 < |x - a| < r\), for some \(r > 0\). Then if \(\lim_{x\to a} g(x) = L\), also \(\lim_{x \to a} f(x) = L\).

Given \(\varepsilon > 0\), choose \(\delta_0\) for \(g\) in the definition, and put \(\delta = \min(\delta_0, r)\). For \(0 < |x - a| < \delta\) we have \(f(x) = g(x)\), so \(|f(x) - L| = |g(x) - L| < \varepsilon\). \(\square\)

This is the principle that was already visible in the previous chapter: \(\frac{x^2 - 1}{x-1}\) and \(x + 1\) are different functions, since one has no value at \(1\), but they agree at every \(x \ne 1\), so they have the same limit at \(1\). Every technique below is a way to find the simpler function.

5.3 Factor and Cancel

If a rational function has numerator and denominator both vanishing at \(a\), then \(x - a\) divides both. Cancel it, which Lemma 5.1 permits, and try substitution again.

Example 1. \(\displaystyle\lim_{x \to 3} \frac{x^3 - 27}{x^2 - 9}\).

Substitution gives \(\tfrac00\). Factor: \(x^3 - 27 = (x-3)(x^2 + 3x + 9)\) and \(x^2 - 9 = (x-3)(x+3)\). For \(x \ne 3\), \[ \frac{x^3 - 27}{x^2 - 9} = \frac{x^2 + 3x + 9}{x + 3}. \] The right side has a nonzero denominator at \(x = 3\), so substitution applies: \[ \lim_{x \to 3} \frac{x^3 - 27}{x^2 - 9} = \frac{9 + 9 + 9}{3 + 3} = \frac{9}{2}. \]

Factoring cubes and higher powers is easier with one identity in hand.

Lemma 5.2 (Difference of Powers) For every integer \(n \ge 1\), \[ x^n - a^n = (x - a)\left(x^{n-1} + x^{n-2}a + \cdots + x\,a^{n-2} + a^{n-1}\right). \]

Write the second factor as \(\sum_{k=0}^{n-1} x^{n-1-k}a^k\). Multiplying by \(x\) gives \(\sum_{k=0}^{n-1} x^{n-k}a^k\), and multiplying by \(-a\) gives \(-\sum_{k=0}^{n-1} x^{n-1-k}a^{k+1}\). Reindexing the second sum with \(j = k+1\) shows it cancels every term of the first except \(x^n\) and \(-a^n\). \(\square\)

As a check, take \(n = 3\), \(x = 2\), \(a = 1\): the left side is \(8 - 1 = 7\) and the right side is \((2-1)(4 + 2 + 1) = 7\).

Example 2. \(\displaystyle\lim_{x \to 2} \frac{x^5 - 32}{x - 2}\).

By the lemma with \(n = 5\), \(a = 2\), \[ \frac{x^5 - 32}{x - 2} = x^4 + 2x^3 + 4x^2 + 8x + 16 \qquad (x \ne 2), \] and substituting \(x = 2\) gives \(16 + 16 + 16 + 16 + 16 = 80\). As a check, at \(x = 2.001\) the quotient is about \(80.03\).

The shape of Example 2 is worth noticing: it is the quotient \(\frac{f(x) - f(a)}{x - a}\) for \(f(x) = x^5\) at \(a = 2\). Its limit, \(80 = 5 \cdot 2^4\), is the number \(na^{n-1}\) in disguise. The lemma says that for \(f(x) = x^n\) the limit is always \(n a^{n-1}\), because each of the \(n\) terms of the second factor becomes \(a^{n-1}\) at \(x = a\). We will meet this quotient again under the name derivative.

5.4 Rationalize

Square roots resist factoring but yield to a different trick: multiply by the conjugate, using \((A - B)(A + B) = A^2 - B^2\) to turn a difference of roots into a difference of the quantities under them.

We also need the square root to respect limits, which the limit laws do not cover.

Lemma 5.3 (Limits of Square Roots) If \(f(x) \ge 0\) near \(a\) and \(f(x) \to L\), then \(L \ge 0\) and \(\sqrt{f(x)} \to \sqrt L\).

That \(L \ge 0\) follows from the comparison theorem for sequences (Theorem 3.4), via Theorem 4.1. If \(L = 0\), given \(\varepsilon > 0\) choose \(\delta\) so that \(f(x) < \varepsilon^2\) when \(0 < |x-a| < \delta\); then \(\sqrt{f(x)} < \varepsilon\). If \(L > 0\), write \[ \left|\sqrt{f(x)} - \sqrt L\right| = \frac{|f(x) - L|}{\sqrt{f(x)} + \sqrt L} \le \frac{|f(x) - L|}{\sqrt L}, \] which is below \(\varepsilon\) once \(|f(x) - L| < \varepsilon\sqrt L\). \(\square\)

The same argument, with Lemma 5.2 in place of the conjugate, handles \(n\)-th roots. We only need square roots here.

Example 3. \(\displaystyle\lim_{x \to 0} \frac{\sqrt{1+x} - 1}{x}\).

Multiply numerator and denominator by \(\sqrt{1+x} + 1\): \[ \frac{\sqrt{1+x} - 1}{x}\cdot\frac{\sqrt{1+x} + 1}{\sqrt{1+x} + 1} = \frac{(1 + x) - 1}{x\left(\sqrt{1+x} + 1\right)} = \frac{1}{\sqrt{1+x} + 1} \qquad (x \ne 0). \] By Lemma 5.3, \(\sqrt{1+x} \to 1\), so the denominator tends to \(2\) and the limit is \(\tfrac12\). As a check, at \(x = 0.01\) the quotient is \(0.49876\ldots\).

Example 4. \(\displaystyle\lim_{x \to 4} \frac{\sqrt x - 2}{x - 4}\).

Here it is quicker to factor than to rationalize, since \(x - 4 = (\sqrt x - 2)(\sqrt x + 2)\). For \(x \ne 4\) the quotient equals \(\dfrac{1}{\sqrt x + 2}\), which tends to \(\tfrac14\).

Both examples have the derivative shape again: they are the difference quotients of \(\sqrt{\ \cdot\ }\) at \(1\) and at \(4\), and the answers \(\tfrac12\) and \(\tfrac14\) are \(\tfrac{1}{2\sqrt a}\) for \(a = 1, 4\). Rationalizing is how one differentiates a square root from the definition.

5.5 The Limit of \(\sin x / x\)

The quotient \(\frac{\sin x}{x}\) has no algebraic simplification at all: the numerator is not a polynomial and nothing cancels. We must instead trap the quotient between two functions we understand, which is what the squeeze theorem (Theorem 4.4) is for. The trap is geometric.

Theorem 5.1 (The Fundamental Trigonometric Limit) For \(0 < |x| < \pi/2\), \[ 1 - \frac{x^2}{2} < \frac{\sin x}{x} < 1. \] Consequently \(\displaystyle\lim_{x \to 0}\frac{\sin x}{x} = 1\).

Take \(0 < \theta < \pi/2\). In the unit circle, the triangle with vertices \(O\), \((1,0)\) and \((\cos\theta, \sin\theta)\) lies inside the circular sector of angle \(\theta\), which lies inside the right triangle with vertices \(O\), \((1,0)\) and \((1, \tan\theta)\). (This is the picture from the sine problem in the chapter on sequences.) The three areas are \(\tfrac12\sin\theta\), \(\tfrac12\theta\) and \(\tfrac12\tan\theta\).

Comparing areas gives \(\sin\theta < \theta < \tan\theta\). Dividing the left inequality by \(\theta\) gives \(\frac{\sin\theta}{\theta} < 1\). Dividing the right one by \(\sin\theta > 0\) and taking reciprocals gives \(\cos\theta < \frac{\sin\theta}{\theta}\). For a lower bound we can control, use \(1 - \cos\theta = 2\sin^2(\theta/2)\) together with \(\sin(\theta/2) < \theta/2\), which gives \(1 - \cos\theta < \theta^2/2\). Hence \[ 1 - \frac{\theta^2}{2} < \cos\theta < \frac{\sin\theta}{\theta} < 1 . \] Since \(\frac{\sin(-\theta)}{-\theta} = \frac{\sin\theta}{\theta}\) and \(\theta^2\) is even, the same bounds hold for \(-\pi/2 < \theta < 0\). The outer functions \(1 - x^2/2\) and \(1\) both tend to \(1\) as \(x \to 0\), so Theorem 4.4 finishes the proof. \(\square\)

Graph of sin(x)/x for x between -20 and 20: a central peak of height 1 at the origin with an open circle there, and decaying oscillations on either side. A dashed line marks y = 1.

The function is undefined at \(0\), and the graph shows what the theorem proves: a hole at height \(1\) that the curve approaches from both sides.

The proof also hands us two further limits at no extra cost. The bound \(1 - x^2/2 < \cos x < 1\) on \(0<|x|<\pi/2\) is a squeeze that shows \(\cos x \to 1\). The same bound gives a limit needed when differentiating cosine.

Corollary 5.1 (A Cosine Limit) As \(x \to 0\), \[ \frac{\cos x - 1}{x} \longrightarrow 0. \]

Since \(0 \le 1 - \cos x < x^2/2\), we have \[ \left|\frac{\cos x - 1}{x}\right| \le \frac{|x|}{2} \longrightarrow 0. \] \(\square\)

The bound \(0 < 1 - \cos x < x^2/2\) also gives the following.

Example 5. \(\displaystyle\lim_{x \to 0}\frac{1 - \cos x}{x} = 0\) and \(\displaystyle\lim_{x \to 0}\frac{1 - \cos x}{x^2} = \frac12\).

For the first, divide \(0 < 1 - \cos x < x^2/2\) by \(|x|\): the quotient \(\frac{1 - \cos x}{|x|}\) lies between \(0\) and \(|x|/2\), so \(\frac{1-\cos x}{x}\) lies between \(-|x|/2\) and \(|x|/2\), both of which tend to \(0\). For the second, multiply by the conjugate, \[ \frac{1 - \cos x}{x^2} = \frac{\sin^2 x}{x^2(1 + \cos x)} = \left(\frac{\sin x}{x}\right)^2 \cdot \frac{1}{1 + \cos x} \longrightarrow 1^2 \cdot \frac12 = \frac12. \] The two answers are consistent: \(1 - \cos x\) vanishes faster than \(x\) but at the same rate as \(x^2\).

Example 6. \(\displaystyle\lim_{x \to 0}\frac{\sin 5x}{3x} = \frac53\).

Write \(\frac{\sin 5x}{3x} = \frac53\cdot\frac{\sin 5x}{5x}\). Put \(u = 5x\). If \(0 < |u| < \delta\) then \(0 < |x| < \delta/5\), so a \(\delta\) that works for \(\frac{\sin u}{u}\) at \(0\) gives a \(\delta/5\) that works for \(\frac{\sin 5x}{5x}\). Hence \(\frac{\sin 5x}{5x} \to 1\) and the limit is \(\frac53\).

TipKey Ideas
  • For polynomials, and for rational functions with nonzero denominator, the limit at \(a\) is the value at \(a\). The limit laws prove it.
  • \(\frac00\) is not an answer. It means the quotient law does not apply, and the limit can be any number, or not exist.
  • Limits ignore the point itself: if two functions agree near \(a\) except possibly at \(a\), they have the same limit there. Every technique here finds a simpler function that agrees with the given one for \(x \ne a\).
  • Factor and cancel when numerator and denominator are polynomials, with \(x^n - a^n\) as the main tool. Rationalize or factor when square roots appear.
  • When algebra cannot simplify, trap the function. The bounds \(1 - x^2/2 < \frac{\sin x}{x} < 1\) come from comparing areas and give \(\frac{\sin x}{x} \to 1\) by the squeeze theorem.
  • Several of these limits were difference quotients \(\frac{f(x) - f(a)}{x - a}\). That is not a coincidence, and it is where the Differentiation part begins.

Quick Check: \(\lim_{x \to 0} \dfrac{\sin 3x}{x} = \;\)?

  1. Suppose \(\lim_{x \to 2} f(x) = 5\) and \(\lim_{x \to 2} g(x) = -3\).

    1. Evaluate \(\lim_{x \to 2}\,[2f(x) - 3g(x)]\).

    2. Evaluate \(\lim_{x \to 2}\dfrac{f(x) + 1}{g(x) - 1}\).

    3. Why can the limit laws not evaluate \(\lim_{x \to 2}\dfrac{f(x) - 5}{g(x) + 3}\) directly?

    4. If in addition \(f(x) = x^2 + 1\) and \(g(x) = x - 5\), evaluate the limit in (c).

  2. Evaluate each limit, stating which technique you use.

    1. \(\displaystyle\lim_{x \to 5}\frac{x^2 - 25}{x - 5}\)

    2. \(\displaystyle\lim_{x \to 1}\frac{x^4 - 1}{x^2 - 1}\)

    3. \(\displaystyle\lim_{x \to 0}\frac{\sqrt{4 + x} - 2}{x}\)

    4. \(\displaystyle\lim_{x \to 9}\frac{\sqrt x - 3}{x - 9}\)

  3. Use Lemma 5.2 to evaluate \(\displaystyle\lim_{x \to a}\frac{x^n - a^n}{x - a}\) for an integer \(n \ge 1\) and a real number \(a\). Check your answer against Example 2.

  4. Evaluate each limit.

    1. \(\displaystyle\lim_{x \to 0}\frac{\tan x}{x}\)

    2. \(\displaystyle\lim_{x \to 0}\frac{\sin 3x}{\sin 5x}\)

    3. \(\displaystyle\lim_{x \to 0}\frac{1 - \cos 2x}{x^2}\)

  5. Let \(f(x) = x^2\cos(1/x)\) for \(x \ne 0\).

    1. Find two sequences \(x_n, y_n \to 0\) with \(\cos(1/x_n) = 1\) and \(\cos(1/y_n) = -1\). What does Theorem 4.1 say about \(\lim_{x \to 0}\cos(1/x)\)?

    2. Show that nevertheless \(\lim_{x \to 0} f(x) = 0\).

  6. Show that \(\tfrac00\) can be anything. For each of the following, give functions \(f, g\) with \(f(x) \to 0\) and \(g(x) \to 0\) as \(x \to 0\) such that \(f(x)/g(x)\) has the stated behavior.

    1. The quotient tends to \(7\).

    2. The quotient is unbounded near \(0\), so it has no limit.

    3. The quotient has no limit but stays bounded.

    1. \(2(5) - 3(-3) = 19\).

    2. The denominator’s limit is \(-3 - 1 = -4 \ne 0\), so \(\dfrac{5 + 1}{-4} = -\dfrac32\).

    3. The numerator and denominator both tend to \(0\), and the quotient law requires the denominator’s limit to be nonzero.

    4. The quotient is \(\dfrac{x^2 - 4}{x - 2} = x + 2\) for \(x \ne 2\), so the limit is \(4\).

    1. Factor and cancel: \(\dfrac{x^2 - 25}{x - 5} = x + 5 \to 10\).

    2. \(\dfrac{x^4 - 1}{x^2 - 1} = x^2 + 1\) for \(x \ne \pm1\), so the limit is \(2\).

    3. Rationalize: \(\dfrac{(4 + x) - 4}{x(\sqrt{4+x} + 2)} = \dfrac{1}{\sqrt{4+x} + 2} \to \dfrac14\).

    4. Factor \(x - 9 = (\sqrt x - 3)(\sqrt x + 3)\), so the quotient is \(\dfrac{1}{\sqrt x + 3} \to \dfrac16\).

  1. By the lemma, for \(x \ne a\) the quotient equals \(\sum_{k=0}^{n-1} x^{n-1-k}a^k\). Each of the \(n\) terms tends to \(a^{n-1}\), so the limit is \(n\,a^{n-1}\). For \(n = 5\), \(a = 2\) this is \(5 \cdot 16 = 80\), matching Example 2.

    1. \(\dfrac{\tan x}{x} = \dfrac{\sin x}{x}\cdot\dfrac{1}{\cos x} \to 1 \cdot 1 = 1\).

    2. \(\dfrac{\sin 3x}{\sin 5x} = \dfrac{3}{5}\cdot\dfrac{\sin 3x}{3x}\cdot\dfrac{5x}{\sin 5x} \to \dfrac35 \cdot 1 \cdot 1 = \dfrac35\), using the quotient law because \(\frac{\sin 5x}{5x} \to 1 \ne 0\).

    3. \(1 - \cos 2x = 2\sin^2 x\), so the quotient is \(2\left(\frac{\sin x}{x}\right)^2 \to 2\).

    1. \(x_n = \dfrac{1}{2n\pi}\) and \(y_n = \dfrac{1}{(2n+1)\pi}\). Both tend to \(0\), and \(\cos(1/x_n) = 1\), \(\cos(1/y_n) = -1\). If the limit \(L\) existed, Theorem 4.1 would force both \(1\) and \(-1\) to equal \(L\). So it does not exist.

    2. For \(x \ne 0\), \(-x^2 \le x^2\cos(1/x) \le x^2\). Both bounds tend to \(0\), so \(f(x) \to 0\) by Theorem 4.4.

    1. \(f(x) = 7x\), \(g(x) = x\).

    2. \(f(x) = x\), \(g(x) = x^3\). The quotient is \(1/x^2\), which is unbounded near \(0\).

    3. \(f(x) = x\sin(1/x)\), \(g(x) = x\). The quotient is \(\sin(1/x)\), bounded by \(1\) but with no limit (Example 6 of the previous chapter).