Ran Wei/ Calculus/Module 2
中文
Calculus · Part I · Functions, limits and continuity

Module 2Limits

Learn what it means for a function to approach a value, and how to find limits from tables, graphs and algebra. You will prove the limit on which the calculus of sine and cosine rests, use the precise ε–δ definition in proofs, and see when a computer gets a limit wrong.

⏱ 240 minYou need: Module 1

In this module you will

  • Estimate a limit from a table of values or a graph, and recognise the three ways in which a limit can fail to exist
  • Find one-sided limits, and use them to decide whether a limit exists
  • Evaluate limits with the limit laws, direct substitution, factoring, rationalising and combining fractions
  • Use the squeeze theorem, and prove that sin θ/θ approaches 1 as θ approaches 0
  • State the ε–δ definition of a limit, and use it to prove limits of linear and quadratic functions
  • Explain cancellation error in floating-point arithmetic, and compute limits with SymPy
1

The idea of a limit

Module 1 ended with a falling ball. After tt seconds it has fallen s(t)=4.9t2s(t) = 4.9t^2 metres, and its average speed between the times t=1t = 1 and t=1+ht = 1 + h is the difference quotient

s(1+h)−s(1)h=9.8+4.9h(h≠0).\frac{s(1 + h) - s(1)}{h} = 9.8 + 4.9h \qquad (h \ne 0).

As hh shrinks towards 0, from either side, these average speeds settle down to 9.8 m/s, the speed of the ball at the instant t=1t = 1 (Section 1.6). Two things are worth noticing. You cannot put h=0:h = 0\mathclose{\text{:}} the quotient would be 0/0,0/0\mathclose{\text{,}} which means nothing. And 9.8 is not one of the average speeds, since 9.8+4.9h=9.89.8 + 4.9h = 9.8 only when h=0.h = 0\mathclose{\text{.}} It is the number that the average speeds approach. Such a number is a limit, and the whole of calculus rests on the idea.

Here is the same situation without the physics. The function

f(x)=x2−1x−1f(x) = \frac{x^2 - 1}{x - 1}

is not defined at x=1,x = 1\mathclose{\text{,}} where it gives 0/0.0/0\mathclose{\text{.}} Near 1 it is defined, and a table of its values shows what it does there:

xxx2−1x−1\dfrac{x^2-1}{x-1}
0.90.91.91.9
0.990.991.991.99
0.9990.9991.9991.999
0.99990.99991.99991.9999
1.00011.00012.00012.0001
1.0011.0012.0012.001
1.011.012.012.01
1.11.12.12.1

The closer xx is to 1, from either side, the closer f(x)f(x) is to 2. Algebra explains why. Factor the numerator, x2−1=(x−1)(x+1),x^2 - 1 = (x - 1)(x + 1)\mathclose{\text{,}} and cancel the factor x−1,x - 1\mathclose{\text{,}} which is not 0 when x≠1:x \ne 1\mathclose{\text{:}}

f(x)=(x−1)(x+1)x−1=x+1(x≠1).f(x) = \frac{(x - 1)(x + 1)}{x - 1} = x + 1 \qquad (x \ne 1).

So the graph of ff is the line y=x+1y = x + 1 with one point missing, a hole at (1,2),(1, 2)\mathclose{\text{,}} like the rational function of Example 1.5 (Figure 2.1, left). As xx approaches 1, f(x)=x+1f(x) = x + 1 approaches 2.

Definition 2.1Limit

Let ff be a function defined at every xx in an open interval containing the number a,a\mathclose{\text{,}} except possibly at aa itself. If f(x)f(x) can be made as close to a number LL as you like by taking xx close enough to a,a\mathclose{\text{,}} but not equal to a,a\mathclose{\text{,}} then LL is the limit of f(x)f(x) as xx approaches a,a\mathclose{\text{,}} and you write

lim⁡x→af(x)=L.\lim_{x\to a} f(x) = L.

Read lim⁡x→af(x)=L\lim_{x\to a} f(x) = L as “the limit of f of x as x approaches a is L”. Another way to write it is f(x)→Lf(x) \to L as x→a,x \to a\mathclose{\text{,}} read “f of x tends to L as x tends to a”. If there is no such number L,L\mathclose{\text{,}} the limit does not exist. So far:

lim⁡x→1x2−1x−1=2,lim⁡h→0s(1+h)−s(1)h=9.8.\begin{aligned} \lim_{x\to 1}\frac{x^2 - 1}{x - 1} &= 2, \\ \lim_{h\to 0}\frac{s(1 + h) - s(1)}{h} &= 9.8. \end{aligned}

The name of the variable does not matter: in the second limit hh plays the part of x,x\mathclose{\text{,}} and 0 that of a.a\mathclose{\text{.}}

Definition 2.1 is informal: “as close as you like” and “close enough” are not yet precise. Section 2.7 turns them into numbers, and with them into proofs. Until then, tables, graphs and algebra will do.

Key idea

A limit describes what f(x)f(x) does as xx approaches a,a\mathclose{\text{,}} never what happens at a.a\mathclose{\text{.}} The value f(a)f(a) may be undefined, equal to the limit or different from it, and the limit is the same in all three cases (Figure 2.1).

Three functions with the same limit at x = 1. Left: f(x) = dfrac{x^2 - 1}{x - 1} is not defined at 1; as x approaches 1 from either side (orange arrows on the x-axis), f(x) approaches 2 (orange arrows beside the y-axis). Middle: g(x) = x + 1, with g(1) = 2. Right: h(x) = x + 1 for x ne 1, and h(1) = 1. Away from x = 1 the three graphs are the same line, so all three limits at 1 are 2.
Figure 2.1

Three functions with the same limit at x=1.x = 1\mathclose{\text{.}} Left: f(x)=x2−1x−1f(x) = \dfrac{x^2 - 1}{x - 1} is not defined at 1; as xx approaches 1 from either side (orange arrows on the xx-axis), f(x)f(x) approaches 2 (orange arrows beside the yy-axis). Middle: g(x)=x+1,g(x) = x + 1\mathclose{\text{,}} with g(1)=2.g(1) = 2\mathclose{\text{.}} Right: h(x)=x+1h(x) = x + 1 for x≠1,x \ne 1\mathclose{\text{,}} and h(1)=1.h(1) = 1\mathclose{\text{.}} Away from x=1x = 1 the three graphs are the same line, so all three limits at 1 are 2.

Example 2.1A limit from a table✓ Checked

Estimate the limit of sin⁡xx\dfrac{\sin x}{x} as x→0,x \to 0\mathclose{\text{,}} with xx in radians.

The function is not defined at x=0,x = 0\mathclose{\text{,}} so compute its values near 0:

xxsin⁡xx\dfrac{\sin x}{x}
110.841470980.84147098
0.50.50.958851080.95885108
0.10.10.998334170.99833417
0.010.010.999983330.99998333
0.0010.0010.999999830.99999983

Negative values of xx give the same numbers: sine is odd (Section 1.4), so

sin⁡(−x)−x=−sin⁡x−x=sin⁡xx.\frac{\sin(-x)}{-x} = \frac{-\sin x}{-x} = \frac{\sin x}{x}.

The values approach 1, and it is natural to guess that

lim⁡x→0sin⁡xx=1.\lim_{x\to 0}\frac{\sin x}{x} = 1.

A table suggests a limit but does not prove it. Section 2.6 proves this one, which is among the most important limits in calculus.

Watch out

A table shows finitely many values, and they can mislead. Try f(x)=sin⁡(π/x)f(x) = \sin(\pi/x) at x=0.1,x = 0.1\mathclose{\text{,}} 0.01 and 0.001: the values are sin⁡(10π),\sin(10\pi)\mathclose{\text{,}} sin⁡(100π)\sin(100\pi) and sin⁡(1000π),\sin(1000\pi)\mathclose{\text{,}} all exactly 0, so the table suggests the limit 0 as x→0.x \to 0\mathclose{\text{.}} But at x=221≈0.095x = \tfrac{2}{21} \approx 0.095 the value is sin⁡21π2=1,\sin\tfrac{21\pi}{2} = 1\mathclose{\text{,}} and at x=2201≈0.00995x = \tfrac{2}{201} \approx 0.00995 it is sin⁡201π2=1\sin\tfrac{201\pi}{2} = 1 again. As close to 0 as you like there are points where f(x)=0f(x) = 0 and points where f(x)=1,f(x) = 1\mathclose{\text{,}} and the limit does not exist, for the reason that Example 2.3 gives for sin⁡(1/x).\sin(1/x)\mathclose{\text{.}} Use tables to guess; use algebra or a proof to be sure.

2

One-sided limits

Module 1 drew the piecewise function

f(x)={x2if x<1,3−xif x≥1,f(x) = \begin{cases} x^2 & \text{if } x < 1, \\ 3 - x & \text{if } x \ge 1, \end{cases}

whose graph jumps at x=1x = 1 (Example 1.3). Near 1 its values are

xxf(x)f(x)
0.90.90.810.81
0.990.990.98010.9801
0.9990.9990.9980010.998001
1.0011.0011.9991.999
1.011.011.991.99
1.11.11.91.9

To the left of 1, f(x)=x2f(x) = x^2 approaches 1; to the right, f(x)=3−xf(x) = 3 - x approaches 2. No single number is approached from both sides, so lim⁡x→1f(x)\lim_{x\to1} f(x) does not exist. But each side, taken alone, has a limit.

Definition 2.2One-sided limits

Let ff be defined on an open interval (c,a)(c, a) that ends at a.a\mathclose{\text{.}} If f(x)f(x) can be made as close to a number LL as you like by taking xx close enough to aa with x<a,x < a\mathclose{\text{,}} then LL is the limit from the left (or left-hand limit) of ff at a,a\mathclose{\text{,}} written

lim⁡x→a−f(x)=L.\lim_{x\to a^-} f(x) = L.

The limit from the right (or right-hand limit), lim⁡x→a+f(x)=L,\lim_{x\to a^+} f(x) = L\mathclose{\text{,}} is defined in the same way, with ff defined on an interval (a,d)(a, d) and x>a.x > a\mathclose{\text{.}}

Read x→a−x \to a^- as “x approaches a from the left”, through values below a,a\mathclose{\text{,}} and x→a+x \to a^+ as “x approaches a from the right”. For the piecewise function above,

lim⁡x→1−f(x)=1,lim⁡x→1+f(x)=2,f(1)=2.\lim_{x\to 1^-} f(x) = 1, \quad \lim_{x\to 1^+} f(x) = 2, \quad f(1) = 2.

The two-sided limit of Definition 2.1 asks for closeness on both sides at once, so it exists exactly when the one-sided limits exist and agree:

Key idea

lim⁡x→af(x)=L\lim_{x\to a} f(x) = L exactly when lim⁡x→a−f(x)=L\lim_{x\to a^-} f(x) = L and lim⁡x→a+f(x)=L.\lim_{x\to a^+} f(x) = L\mathclose{\text{.}} If the one-sided limits differ, or if one of them does not exist, then lim⁡x→af(x)\lim_{x\to a} f(x) does not exist. (Theorem 2.7 proves this from the precise definition.)

Example 2.2A jump at 0✓ Checked

Find the one-sided limits of f(x)=∣x∣xf(x) = \dfrac{\abs{x}}{x} at 0. Does lim⁡x→0f(x)\lim_{x\to0} f(x) exist?

ff is defined for every x≠0.x \ne 0\mathclose{\text{.}} For x>0,x > 0\mathclose{\text{,}} ∣x∣=x,\abs{x} = x\mathclose{\text{,}} so f(x)=x/x=1;f(x) = x/x = 1\mathclose{\text{;}} for x<0,x < 0\mathclose{\text{,}} ∣x∣=−x,\abs{x} = -x\mathclose{\text{,}} so f(x)=−x/x=−1.f(x) = -x/x = -1\mathclose{\text{.}} Each piece is constant, so

lim⁡x→0−∣x∣x=−1andlim⁡x→0+∣x∣x=1.\lim_{x\to0^-}\frac{\abs{x}}{x} = -1 \quad\text{and}\quad \lim_{x\to0^+}\frac{\abs{x}}{x} = 1.

The one-sided limits differ, so lim⁡x→0∣x∣/x\lim_{x\to0} \abs{x}/x does not exist. The graph (Figure 2.2, left) consists of two horizontal half-lines, with a jump of 2 at x=0.x = 0\mathclose{\text{.}}

Jumps are common in engineering. A circuit whose switch closes at time t=0t = 0 is described with the unit step u(t),u(t)\mathclose{\text{,}} which is 0 for t<0t < 0 and 1 for t>0t > 0 (books differ about its value at 0 itself). Its limit from the left at 0 is 0 and its limit from the right is 1, whatever u(0)u(0) is. Signal processing builds switched signals from it.

Watch out

Two misreadings of the notation. x→1−x \to 1^- means that xx approaches 1 from below, through values such as 0.9, 0.99 and 0.999. It does not mean x→−1,x \to -1\mathclose{\text{,}} and the values of xx need not be negative. And one-sided limits do not depend on the value at the point: for the piecewise function above, f(1)=2f(1) = 2 comes from the right-hand formula, but the limit from the right would still be 2 if f(1)f(1) were changed to 7.

3

Limits that do not exist

A limit can fail to exist in three ways. Figure 2.2 shows one of each.

Three ways for a limit not to exist, all at x = 0. Left, a jump: abs{x}/x is -1 to the left of 0 and 1 to the right. Middle, a blow-up: 1/x^2 grows beyond every bound. Right, an oscillation: sin(1/x) swings between -1 and 1, faster and faster as x approaches 0; near 0 the swings are too close together to draw, and the graph looks like a solid band.
Figure 2.2

Three ways for a limit not to exist, all at x=0.x = 0\mathclose{\text{.}} Left, a jump: ∣x∣/x\abs{x}/x is −1-1 to the left of 0 and 1 to the right. Middle, a blow-up: 1/x21/x^2 grows beyond every bound. Right, an oscillation: sin⁡(1/x)\sin(1/x) swings between −1-1 and 1, faster and faster as xx approaches 0; near 0 the swings are too close together to draw, and the graph looks like a solid band.

A jump. The one-sided limits exist but differ, as for ∣x∣/x\abs{x}/x at 0 (Example 2.2).

A blow-up. As xx approaches 0, the values of 1/x21/x^2 grow beyond every bound:

xx1x2\dfrac{1}{x^2}
1111
0.10.1100100
0.010.011000010000
0.0010.0011×1061\times10^{6}

and −x-x gives the same values as x.x\mathclose{\text{.}} Whatever number LL you name, 1/x2>∣L∣+11/x^2 > \abs{L} + 1 for every x≠0x \ne 0 with x2<1/(∣L∣+1),x^2 < 1/(\abs{L} + 1)\mathclose{\text{,}} so close to 0 the values of 1/x21/x^2 are more than 1 away from L.L\mathclose{\text{.}} No number is the limit. Module 3 describes this behaviour by writing lim⁡x→01/x2=∞,\lim_{x\to0} 1/x^2 = \infty\mathclose{\text{,}} an infinite limit; but ∞\infty is not a number, and in the sense of Definition 2.1 the limit does not exist.

An oscillation. As xx approaches 0, sin⁡(1/x)\sin(1/x) swings between −1-1 and 1 infinitely often.

Example 2.3An oscillation✓ Checked

Show that lim⁡x→0sin⁡(1/x)\lim_{x\to0}\sin(1/x) does not exist.

sin⁡u=1\sin u = 1 when u=π2,5π2,9π2,…,u = \tfrac{\pi}{2}, \tfrac{5\pi}{2}, \tfrac{9\pi}{2}, \dots\mathclose{\text{,}} and sin⁡u=−1\sin u = -1 when u=3π2,7π2,11π2,….u = \tfrac{3\pi}{2}, \tfrac{7\pi}{2}, \tfrac{11\pi}{2}, \dots\mathclose{\text{.}} Taking u=1/x,u = 1/x\mathclose{\text{,}} that is, x=1/u,x = 1/u\mathclose{\text{,}} gives points closer and closer to 0 where sin⁡(1/x)\sin(1/x) is 1 and −1-1 in turn:

xxx (decimal)x\ (\text{decimal})sin⁡(1/x)\sin(1/x)
2π\frac{2}{\pi}0.63660.636611
23π\frac{2}{3 \pi}0.21220.2122−1-1
25π\frac{2}{5 \pi}0.12730.127311
27π\frac{2}{7 \pi}0.090950.09095−1-1
29π\frac{2}{9 \pi}0.070740.0707411
211π\frac{2}{11 \pi}0.057870.05787−1-1

In general x=2(4k+1)πx = \dfrac{2}{(4k + 1)\pi} gives sin⁡(1/x)=1\sin(1/x) = 1 and x=2(4k+3)πx = \dfrac{2}{(4k + 3)\pi} gives sin⁡(1/x)=−1,\sin(1/x) = -1\mathclose{\text{,}} for k=0,1,2,…,k = 0, 1, 2, \dots\mathclose{\text{,}} and as kk grows these points come as close to 0 as you like. So every open interval around 0, however small, contains points where sin⁡(1/x)=1\sin(1/x) = 1 and points where sin⁡(1/x)=−1.\sin(1/x) = -1\mathclose{\text{.}} If the values near 0 stayed within 12\tfrac12 of one number L,L\mathclose{\text{,}} then 1 and −1-1 would both be within 12\tfrac12 of L,L\mathclose{\text{,}} and so within 1 of each other; but they are 2 apart. No number LL is the limit.

Watch out

“The limit does not exist” and “the function is not defined at aa” are different statements, and neither follows from the other. x2−1x−1\dfrac{x^2 - 1}{x - 1} is not defined at 1 but has the limit 2 there. The function that is −1-1 for x<0x < 0 and 1 for x≥0x \ge 0 is defined at 0, with the value 1, but has no limit there.

4

The limit laws

Tables and graphs suggest limits; the limit laws compute them, by building complicated limits from simple ones. The two simplest are

lim⁡x→ac=candlim⁡x→ax=a\lim_{x\to a} c = c \qquad\text{and}\qquad \lim_{x\to a} x = a

for every constant cc and every number a.a\mathclose{\text{.}} The first says that a constant function stays at its constant; the second, that as xx approaches a,a\mathclose{\text{,}} the values of the function xx approach a.a\mathclose{\text{.}} Section 2.7 proves both from the precise definition.

Theorem 2.1Limit laws

Suppose that lim⁡x→af(x)=L\lim_{x\to a} f(x) = L and lim⁡x→ag(x)=M,\lim_{x\to a} g(x) = M\mathclose{\text{,}} and let cc be a constant. Then:

Law Statement
Sum lim⁡x→a(f(x)+g(x))=L+M\lim\limits_{x\to a}\big(f(x) + g(x)\big) = L + M
Difference lim⁡x→a(f(x)−g(x))=L−M\lim\limits_{x\to a}\big(f(x) - g(x)\big) = L - M
Constant multiple lim⁡x→ac f(x)=cL\lim\limits_{x\to a} c\,f(x) = cL
Product lim⁡x→af(x) g(x)=LM\lim\limits_{x\to a} f(x)\,g(x) = LM
Quotient lim⁡x→af(x)g(x)=LM,\lim\limits_{x\to a} \dfrac{f(x)}{g(x)} = \dfrac{L}{M}\mathclose{\text{,}} if M≠0M \ne 0
Power lim⁡x→a(f(x))n=Ln,\lim\limits_{x\to a} \big(f(x)\big)^n = L^n\mathclose{\text{,}} for n=1,2,3,…n = 1, 2, 3, \dots
Root lim⁡x→af(x)n=Ln,\lim\limits_{x\to a} \sqrt[n]{f(x)} = \sqrt[n]{L}\mathclose{\text{,}} for n=2,3,…,n = 2, 3, \dots\mathclose{\text{,}} if L>0L > 0 when nn is even

The same laws hold for one-sided limits.

In words: the limit of a sum is the sum of the limits, the limit of a product is the product of the limits, and so on, provided that the limits of the pieces exist and, for a quotient, that the limit of the denominator is not 0. The laws say what you would expect: if f(x)f(x) is close to LL and g(x)g(x) is close to M,M\mathclose{\text{,}} then f(x)+g(x)f(x) + g(x) is close to L+ML + M and f(x)g(x)f(x)g(x) is close to LM.LM\mathclose{\text{.}} Turning “close” into a proof needs the precise definition, so the proofs come in Section 2.7, where a Going deeper box proves the sum, product and quotient laws. The other laws follow from those three: f−gf - g is f+(−1)g;f + (-1)g\mathclose{\text{;}} the constant multiple c fc\,f is the product of ff with the constant function c;c\mathclose{\text{;}} and the power law is the product law used n−1n - 1 times. The root law for square roots is Exercise 2.9. Other roots are handled in a similar way, with the difference of nnth powers in place of the difference of squares; the case L=0,L = 0\mathclose{\text{,}} which odd nn allow, is simpler, because ∣f(x)n∣<c\abs{\sqrt[n]{f(x)}} < c whenever ∣f(x)∣<cn.\abs{f(x)} < c^n\mathclose{\text{.}}

Example 2.4Using the limit laws✓ Checked

Find

lim⁡x→22x2−3x+1x+3,\lim_{x\to2}\frac{2x^2 - 3x + 1}{x + 3},

naming the law used at each step.

Start with the numerator. By the sum and difference laws, then the constant multiple law,

lim⁡x→2(2x2−3x+1)=2lim⁡x→2x2−3lim⁡x→2x+lim⁡x→21.\begin{aligned} &\lim_{x\to2}\big(2x^2 - 3x + 1\big) \\ &\quad= 2\lim_{x\to2} x^2 - 3\lim_{x\to2} x + \lim_{x\to2} 1. \end{aligned}

By the power law and the two basic limits, lim⁡x→2x2=22=4,\lim_{x\to2} x^2 = 2^2 = 4\mathclose{\text{,}} lim⁡x→2x=2\lim_{x\to2} x = 2 and lim⁡x→21=1,\lim_{x\to2} 1 = 1\mathclose{\text{,}} so the numerator approaches 2⋅4−3⋅2+1=3.2 \cdot 4 - 3 \cdot 2 + 1 = 3\mathclose{\text{.}} In the same way the denominator approaches 2+3=5.2 + 3 = 5\mathclose{\text{.}} That is not 0, so the quotient law applies:

lim⁡x→22x2−3x+1x+3=35.\lim_{x\to2}\frac{2x^2 - 3x + 1}{x + 3} = \frac{3}{5}.

Direct substitution

The answer of Example 2.4, 35,\tfrac35\mathclose{\text{,}} is the value of the function at 2: 2⋅22−3⋅2+12+3=35.\dfrac{2 \cdot 2^2 - 3 \cdot 2 + 1}{2 + 3} = \dfrac35\mathclose{\text{.}} That is no accident.

Theorem 2.2Direct substitution

If pp is a polynomial, then lim⁡x→ap(x)=p(a)\lim_{x\to a} p(x) = p(a) for every number a.a\mathclose{\text{.}} If r=p/qr = p/q is a rational function and q(a)≠0,q(a) \ne 0\mathclose{\text{,}} then lim⁡x→ar(x)=r(a).\lim_{x\to a} r(x) = r(a)\mathclose{\text{.}}

Proof

Write p(x)=cnxn+⋯+c1x+c0.p(x) = c_n x^n + \dots + c_1 x + c_0\mathclose{\text{.}} By the power law and the basic limit lim⁡x→ax=a,\lim_{x\to a} x = a\mathclose{\text{,}} lim⁡x→axk=ak\lim_{x\to a} x^k = a^k for each k≥1;k \ge 1\mathclose{\text{;}} by the constant multiple law, lim⁡x→ackxk=ckak;\lim_{x\to a} c_k x^k = c_k a^k\mathclose{\text{;}} and by the sum law, used once for each plus sign, together with lim⁡x→ac0=c0,\lim_{x\to a} c_0 = c_0\mathclose{\text{,}}

lim⁡x→ap(x)=cnan+⋯+c1a+c0=p(a).\begin{aligned} \lim_{x\to a} p(x) &= c_n a^n + \dots + c_1 a + c_0 \\ &= p(a). \end{aligned}

If r=p/q,r = p/q\mathclose{\text{,}} then lim⁡x→ap(x)=p(a)\lim_{x\to a} p(x) = p(a) and lim⁡x→aq(x)=q(a),\lim_{x\to a} q(x) = q(a)\mathclose{\text{,}} which is not 0, so the quotient law gives lim⁡x→ar(x)=p(a)/q(a)=r(a).\lim_{x\to a} r(x) = p(a)/q(a) = r(a)\mathclose{\text{.}}

∎

Direct substitution also works for roots, by the root law: for example, lim⁡x→4x=4=2.\lim_{x\to4}\sqrt{x} = \sqrt4 = 2\mathclose{\text{.}} Module 3 shows that it works for every function in Module 1’s catalogue, at every point inside its domain; such functions are called continuous. Until then this module uses direct substitution only for polynomials, rational functions and roots, and Section 2.6 proves by hand that sin⁡θ→0\sin\theta \to 0 and cos⁡θ→1\cos\theta \to 1 as θ→0.\theta \to 0\mathclose{\text{.}}

Watch out

Two misuses of the laws. First, the quotient law needs M≠0.M \ne 0\mathclose{\text{.}} For lim⁡x→1x2−1x−1\lim_{x\to1}\dfrac{x^2 - 1}{x - 1} it would give 00,\dfrac00\mathclose{\text{,}} which is not a number: the law does not apply, and the limit, 2, has to be found another way, as in Section 2.1. Second, the laws work in one direction only. If the pieces have limits, so does the combination; but a combination can have a limit when its pieces do not. Neither sin⁡(1/x)\sin(1/x) nor −sin⁡(1/x)-\sin(1/x) has a limit at 0, yet their sum is 0 for every x≠0,x \ne 0\mathclose{\text{,}} with limit 0.

5

Algebraic techniques

The form 0/0

When direct substitution in a quotient gives 0/0,0/0\mathclose{\text{,}} the limit may still exist, and it can be any number. Each of these four quotients gives 0/00/0 at x=1:x = 1\mathclose{\text{:}}

f(x)f(x) f(x)f(x) for x≠1x \ne 1 lim⁡x→1f(x)\lim\limits_{x\to1} f(x)
x2−1x−1\dfrac{x^2 - 1}{x - 1} x+1x + 1 2
3x−3x−1\dfrac{3x - 3}{x - 1} 33 3
x2−2x+1x−1\dfrac{x^2 - 2x + 1}{x - 1} x−1x - 1 0
x−1x2−2x+1\dfrac{x - 1}{x^2 - 2x + 1} 1x−1\dfrac{1}{x - 1} does not exist

The last one blows up at 1, with huge positive values to the right of 1 and huge negative values to the left. So 0/00/0 is called an indeterminate form: the form alone does not determine the limit. It is a signal to do more work, not an answer. The work is algebra that rewrites the quotient, for x≠a,x \ne a\mathclose{\text{,}} as a function to which direct substitution applies, and this theorem is what makes that legitimate:

Theorem 2.3Functions that agree near a point

If f(x)=g(x)f(x) = g(x) for every x≠ax \ne a in an open interval containing a,a\mathclose{\text{,}} and lim⁡x→ag(x)=L,\lim_{x\to a} g(x) = L\mathclose{\text{,}} then lim⁡x→af(x)=L.\lim_{x\to a} f(x) = L\mathclose{\text{.}} The same holds for a one-sided limit when f(x)=g(x)f(x) = g(x) on an open interval that ends at aa on that side.

Proof

The limit of ff at aa depends only on the values f(x)f(x) for xx close to aa with x≠a.x \ne a\mathclose{\text{.}} Close enough to a,a\mathclose{\text{,}} every such xx lies in the interval, where f(x)=g(x).f(x) = g(x)\mathclose{\text{.}} So f(x)f(x) can be made as close to LL as you like exactly when g(x)g(x) can. (In the language of Section 2.7: a δ\delta that works for g,g\mathclose{\text{,}} made smaller if necessary so that (a−δ,a+δ)(a - \delta, a + \delta) lies inside the interval, works for f.)f\mathclose{\text{.)}} For a one-sided limit, the same argument looks at one side of aa only.

∎

Factor and cancel

If substitution gives 0/00/0 in a quotient of polynomials, then x−ax - a is a factor of both the numerator and the denominator. The reason: if p(a)=0,p(a) = 0\mathclose{\text{,}} then p(x)=p(x)−p(a)=cn(xn−an)+⋯+c1(x−a),p(x) = p(x) - p(a) = c_n(x^n - a^n) + \dots + c_1(x - a)\mathclose{\text{,}} and each xk−akx^k - a^k has the factor x−a:x - a\mathclose{\text{:}}

xk−ak=(x−a)(xk−1+xk−2a+⋯+ak−1).\begin{aligned} &x^k - a^k \\ &\quad= (x - a)\big(x^{k-1} + x^{k-2}a + \dots + a^{k-1}\big). \end{aligned}

So factor the numerator and the denominator, cancel x−ax - a (allowed, since x≠a),x \ne a\mathclose{\text{),}} and substitute; if 0/00/0 appears again, repeat.

Example 2.5The speed of the falling ball✓ Checked

Find the speed of the falling ball, s(t)=4.9t2,s(t) = 4.9t^2\mathclose{\text{,}} at the time t=a:t = a\mathclose{\text{:}}

lim⁡h→0s(a+h)−s(a)h.\lim_{h\to0}\frac{s(a + h) - s(a)}{h}.

Substituting h=0h = 0 gives 0/0.0/0\mathclose{\text{.}} Expand s(a+h)s(a + h) and subtract s(a):s(a)\mathclose{\text{:}}

s(a+h)−s(a)=4.9(a2+2ah+h2)−4.9a2=9.8ah+4.9h2=h(9.8a+4.9h).\begin{aligned} &s(a + h) - s(a) \\ &\quad= 4.9(a^2 + 2ah + h^2) - 4.9a^2 \\ &\quad= 9.8ah + 4.9h^2 = h(9.8a + 4.9h). \end{aligned}

For h≠0h \ne 0 the factor hh cancels:

s(a+h)−s(a)h=9.8a+4.9h.\frac{s(a + h) - s(a)}{h} = 9.8a + 4.9h.

By Theorem 2.3 and direct substitution (in the variable h),h\mathclose{\text{),}}

lim⁡h→0s(a+h)−s(a)h=9.8a.\lim_{h\to0}\frac{s(a + h) - s(a)}{h} = 9.8a.

At time aa the ball falls at 9.8a9.8a m/s: 9.8 m/s after one second, as in Module 1, and 19.6 m/s after two. Its speed grows by 9.8 m/s every second, the acceleration due to gravity of Module 1. Limits of this kind are the derivatives of Module 4.

Example 2.6Factor and cancel✓ Checked

Find

lim⁡x→3x2−x−6x2−9.\lim_{x\to3}\frac{x^2 - x - 6}{x^2 - 9}.

At x=3x = 3 the numerator is 9−3−6=09 - 3 - 6 = 0 and the denominator is 9−9=0,9 - 9 = 0\mathclose{\text{,}} so both have the factor x−3:x - 3\mathclose{\text{:}} x2−x−6=(x−3)(x+2)x^2 - x - 6 = (x - 3)(x + 2) and x2−9=(x−3)(x+3).x^2 - 9 = (x - 3)(x + 3)\mathclose{\text{.}} For x≠3x \ne 3 (and x≠−3),x \ne -3\mathclose{\text{),}}

x2−x−6x2−9=(x−3)(x+2)(x−3)(x+3)=x+2x+3.\frac{x^2 - x - 6}{x^2 - 9} = \frac{(x - 3)(x + 2)}{(x - 3)(x + 3)} = \frac{x + 2}{x + 3}.

The new denominator is 6 at x=3,x = 3\mathclose{\text{,}} not 0, so by Theorem 2.3 and direct substitution

lim⁡x→3x2−x−6x2−9=3+23+3=56.\lim_{x\to3}\frac{x^2 - x - 6}{x^2 - 9} = \frac{3 + 2}{3 + 3} = \frac56.

Rationalise

When the 0/00/0 comes from a difference that contains a square root, multiply the numerator and the denominator by the conjugate, the same two terms with the opposite sign between them. The conjugate of A−B\sqrt{A} - B is A+B,\sqrt{A} + B\mathclose{\text{,}} and their product,

(A−B)(A+B)=A−B2(A≥0),\big(\sqrt{A} - B\big)\big(\sqrt{A} + B\big) = A - B^2 \quad (A \ge 0),

has no square root left.

Example 2.7Rationalise✓ Checked

Find

lim⁡x→0x+9−3x.\lim_{x\to0}\frac{\sqrt{x + 9} - 3}{x}.

Substitution gives (9−3)/0=0/0.(\sqrt9 - 3)/0 = 0/0\mathclose{\text{.}} Multiply the numerator and the denominator by the conjugate x+9+3,\sqrt{x + 9} + 3\mathclose{\text{,}} which is positive. For x≠0x \ne 0 (and x≥−9),x \ge -9\mathclose{\text{),}}

x+9−3x=(x+9−3)(x+9+3)x(x+9+3)=(x+9)−9x(x+9+3)=1x+9+3.\begin{aligned} \frac{\sqrt{x + 9} - 3}{x} &= \frac{\big(\sqrt{x + 9} - 3\big)\big(\sqrt{x + 9} + 3\big)}{x\big(\sqrt{x + 9} + 3\big)} \\ &= \frac{(x + 9) - 9}{x\big(\sqrt{x + 9} + 3\big)} \\ &= \frac{1}{\sqrt{x + 9} + 3}. \end{aligned}

By the root law, x+9→9=3\sqrt{x + 9} \to \sqrt9 = 3 as x→0;x \to 0\mathclose{\text{;}} then the sum and quotient laws give

lim⁡x→0x+9−3x=13+3=16.\lim_{x\to0}\frac{\sqrt{x + 9} - 3}{x} = \frac{1}{3 + 3} = \frac16.

Combine fractions

When the quotient contains fractions of its own, put them over a common denominator first.

Example 2.8Combine fractions✓ Checked

Find

lim⁡x→31x−13x−3.\lim_{x\to3}\frac{\dfrac1x - \dfrac13}{x - 3}.

Substitution gives (13−13)/0=0/0.\big(\tfrac13 - \tfrac13\big)/0 = 0/0\mathclose{\text{.}} Over the common denominator 3x,3x\mathclose{\text{,}} the numerator is

1x−13=3−x3x=−x−33x.\frac1x - \frac13 = \frac{3 - x}{3x} = -\frac{x - 3}{3x}.

So, for x≠3x \ne 3 (and x≠0),x \ne 0\mathclose{\text{),}}

1x−13x−3=−x−33x(x−3)=−13x,\frac{\dfrac1x - \dfrac13}{x - 3} = -\frac{x - 3}{3x(x - 3)} = -\frac{1}{3x},

and by Theorem 2.3 and direct substitution the limit is −13⋅3=−19.-\dfrac{1}{3 \cdot 3} = -\dfrac19\mathclose{\text{.}} This is the rate of change of 1/x1/x at x=3.x = 3\mathclose{\text{.}} Exercise 1.9 found that the difference quotients of 1/x1/x at aa approach −1/a2,-1/a^2\mathclose{\text{,}} and −1/32=−19.-1/3^2 = -\tfrac19\mathclose{\text{.}}

Watch out

Two slips with 0/0.0/0\mathclose{\text{.}} “Substitution gives 0/0,0/0\mathclose{\text{,}} so the limit is 0” (or 1, or “does not exist”) is wrong: 0/00/0 is a form, not a value, and the table at the start of this section shows four 0/00/0 forms with four different outcomes. And cancel factors, never terms: in x2−x−6x2−9\dfrac{x^2 - x - 6}{x^2 - 9} you may cancel the factor x−3x - 3 once both are factored, but you may not cross out x2x^2 above and below to get −x−6−9,\dfrac{-x - 6}{-9}\mathclose{\text{,}} a different function (at x=1x = 1 it gives 79,\tfrac79\mathclose{\text{,}} while the original gives 34).\tfrac34\mathclose{\text{).}}

6

The squeeze theorem

Some limits are found by trapping. Multiply the oscillating sin⁡(1/x)\sin(1/x) of Example 2.3 by x.x\mathclose{\text{.}} Since ∣sin⁡(1/x)∣≤1,\abs{\sin(1/x)} \le 1\mathclose{\text{,}}

∣xsin⁡1x∣=∣x∣ ∣sin⁡1x∣≤∣x∣,that is,\abs{x\sin\frac1x} = \abs{x}\,\abs{\sin\frac1x} \le \abs{x}, \quad\text{that is,}
−∣x∣≤xsin⁡1x≤∣x∣(x≠0).-\abs{x} \le x\sin\frac1x \le \abs{x} \qquad (x \ne 0).

The graph still oscillates infinitely often near 0, but between the lines y=∣x∣y = \abs{x} and y=−∣x∣,y = -\abs{x}\mathclose{\text{,}} which pinch together at the origin (Figure 2.3, left). The values have nowhere to go but 0.

Two squeezes. Left: xsin(1/x) oscillates infinitely often near 0 but stays between y = -abs{x} and y = abs{x} (dashed), which meet at the origin, so its limit at 0 is 0 (Example 2.9). Right: for 0 < abs{theta} < pi/2, dfrac{sintheta}{theta} lies between costheta and 1, and both of these approach 1 as theta to 0 (Theorem 2.5).
Figure 2.3

Two squeezes. Left: xsin⁡(1/x)x\sin(1/x) oscillates infinitely often near 0 but stays between y=−∣x∣y = -\abs{x} and y=∣x∣y = \abs{x} (dashed), which meet at the origin, so its limit at 0 is 0 (Example 2.9). Right: for 0<∣θ∣<π/2,0 < \abs{\theta} < \pi/2\mathclose{\text{,}} sin⁡θθ\dfrac{\sin\theta}{\theta} lies between cos⁡θ\cos\theta and 1, and both of these approach 1 as θ→0\theta \to 0 (Theorem 2.5).

Theorem 2.4The squeeze theorem

Suppose that g(x)≤f(x)≤h(x)g(x) \le f(x) \le h(x) for every x≠ax \ne a in an open interval containing a,a\mathclose{\text{,}} and that

lim⁡x→ag(x)=lim⁡x→ah(x)=L.\lim_{x\to a} g(x) = \lim_{x\to a} h(x) = L.

Then lim⁡x→af(x)=L.\lim_{x\to a} f(x) = L\mathclose{\text{.}} The same holds for one-sided limits, with the inequalities on that side of a.a\mathclose{\text{.}}

The reason: close to a,a\mathclose{\text{,}} the values g(x)g(x) and h(x)h(x) are both as close to LL as you like, and so is every number between them, f(x)f(x) included. The Going deeper box of Section 2.7 writes this out with the precise definition. The theorem is also called the sandwich theorem.

Example 2.9A squeezed oscillation✓ Checked

Show that lim⁡x→0xsin⁡(1/x)=0.\lim_{x\to0} x\sin(1/x) = 0\mathclose{\text{.}}

The function is defined for every x≠0,x \ne 0\mathclose{\text{,}} and for those x,x\mathclose{\text{,}} as shown above, −∣x∣≤xsin⁡(1/x)≤∣x∣.-\abs{x} \le x\sin(1/x) \le \abs{x}\mathclose{\text{.}} Both bounds approach 0. Indeed ∣x∣=−x\abs{x} = -x for x<0x < 0 and ∣x∣=x\abs{x} = x for x>0,x > 0\mathclose{\text{,}} so both one-sided limits of ∣x∣\abs{x} at 0 are 0, and lim⁡x→0∣x∣=0;\lim_{x\to0}\abs{x} = 0\mathclose{\text{;}} then lim⁡x→0(−∣x∣)=0\lim_{x\to0}\big(-\abs{x}\big) = 0 by the constant multiple law. By the squeeze theorem, lim⁡x→0xsin⁡(1/x)=0.\lim_{x\to0} x\sin(1/x) = 0\mathclose{\text{.}} The factor xx tames the oscillation of Example 2.3.

Two trigonometric limits

The most important use of the squeeze theorem is the limit guessed in Example 2.1. It needs one inequality from the geometry of the unit circle. Let 0<θ<π/2.0 < \theta < \pi/2\mathclose{\text{.}} In Figure 2.4, OO is the origin, A=(1,0),A = (1, 0)\mathclose{\text{,}} P=(cos⁡θ,sin⁡θ)P = (\cos\theta, \sin\theta) is the point of the unit circle at angle θ,\theta\mathclose{\text{,}} and Q=(1,tan⁡θ)Q = (1, \tan\theta) is where the line OPOP meets the vertical line x=1.x = 1\mathclose{\text{.}} Three regions sit one inside the next: the triangle OAP,OAP\mathclose{\text{,}} the sector OAPOAP (the slice of the disc between the radii OAOA and OP)OP\mathclose{\text{)}} and the triangle OAQ.OAQ\mathclose{\text{.}} So their areas increase in that order. The triangle OAPOAP has base OA=1OA = 1 and height sin⁡θ.\sin\theta\mathclose{\text{.}} The sector is the fraction θ/(2π)\theta/(2\pi) of the whole disc, whose area is π,\pi\mathclose{\text{,}} so its area is θ/2.\theta/2\mathclose{\text{.}} The triangle OAQOAQ has base 1 and height tan⁡θ.\tan\theta\mathclose{\text{.}} Therefore

12sin⁡θ<12θ<12tan⁡θ,sosin⁡θ<θ<tan⁡θ(0<θ<π2).\begin{aligned} \frac12\sin\theta &< \frac12\theta < \frac12\tan\theta, \quad\text{so} \\ \sin\theta &< \theta < \tan\theta \qquad \Big(0 < \theta < \frac{\pi}{2}\Big). \end{aligned}
The areas behind Theorem 2.5, for an angle theta between 0 and pi/2. The triangle OAP (left) lies inside the sector OAP (middle), which lies inside the triangle OAQ (right), so tfrac12sintheta < tfrac12theta < tfrac12tantheta.
Figure 2.4

The areas behind Theorem 2.5, for an angle θ\theta between 0 and π/2.\pi/2\mathclose{\text{.}} The triangle OAPOAP (left) lies inside the sector OAPOAP (middle), which lies inside the triangle OAQOAQ (right), so 12sin⁡θ<12θ<12tan⁡θ.\tfrac12\sin\theta < \tfrac12\theta < \tfrac12\tan\theta\mathclose{\text{.}}

Example 2.10Sine and cosine near 0✓ Checked

Show that lim⁡θ→0sin⁡θ=0\lim_{\theta\to0}\sin\theta = 0 and lim⁡θ→0cos⁡θ=1.\lim_{\theta\to0}\cos\theta = 1\mathclose{\text{.}}

For 0<θ<π/2,0 < \theta < \pi/2\mathclose{\text{,}} sin⁡θ>0\sin\theta > 0 (the point PP lies above the xx-axis), and the inequality above gives sin⁡θ<θ;\sin\theta < \theta\mathclose{\text{;}} so 0<sin⁡θ<θ.0 < \sin\theta < \theta\mathclose{\text{.}} Sine is odd, so for −π/2<θ<0-\pi/2 < \theta < 0 this becomes θ<sin⁡θ<0.\theta < \sin\theta < 0\mathclose{\text{.}} In both cases

−∣θ∣≤sin⁡θ≤∣θ∣(0<∣θ∣<π2),-\abs{\theta} \le \sin\theta \le \abs{\theta} \qquad \Big(0 < \abs{\theta} < \frac{\pi}{2}\Big),

and both bounds approach 0 (Example 2.9), so lim⁡θ→0sin⁡θ=0\lim_{\theta\to0}\sin\theta = 0 by the squeeze theorem.

For the cosine, use sin⁡2θ+cos⁡2θ=1.\sin^2\theta + \cos^2\theta = 1\mathclose{\text{.}} For 0<∣θ∣<π/20 < \abs{\theta} < \pi/2 the point PP lies to the right of the yy-axis, so cos⁡θ>0\cos\theta > 0 and 1+cos⁡θ>1.1 + \cos\theta > 1\mathclose{\text{.}} Multiply and divide by 1+cos⁡θ:1 + \cos\theta\mathclose{\text{:}}

1−cos⁡θ=(1−cos⁡θ)(1+cos⁡θ)1+cos⁡θ=sin⁡2θ1+cos⁡θ.\begin{aligned} 1 - \cos\theta &= \frac{(1 - \cos\theta)(1 + \cos\theta)}{1 + \cos\theta} \\ &= \frac{\sin^2\theta}{1 + \cos\theta}. \end{aligned}

This lies between 0 and sin⁡2θ,\sin^2\theta\mathclose{\text{,}} because the denominator is greater than 1, and sin⁡2θ≤θ2\sin^2\theta \le \theta^2 by the first part. So 0≤1−cos⁡θ≤θ2.0 \le 1 - \cos\theta \le \theta^2\mathclose{\text{.}} Since θ2→0,\theta^2 \to 0\mathclose{\text{,}} the squeeze theorem gives 1−cos⁡θ→0,1 - \cos\theta \to 0\mathclose{\text{,}} and the difference law gives cos⁡θ=1−(1−cos⁡θ)→1−0=1.\cos\theta = 1 - (1 - \cos\theta) \to 1 - 0 = 1\mathclose{\text{.}}

Theorem 2.5The limit of sin θ/θ

With θ\theta in radians,

lim⁡θ→0sin⁡θθ=1.\lim_{\theta\to0}\frac{\sin\theta}{\theta} = 1.
Proof

Let 0<θ<π/2.0 < \theta < \pi/2\mathclose{\text{.}} Dividing sin⁡θ<θ\sin\theta < \theta by θ>0\theta > 0 gives sin⁡θθ<1.\dfrac{\sin\theta}{\theta} < 1\mathclose{\text{.}} Multiplying θ<tan⁡θ=sin⁡θcos⁡θ\theta < \tan\theta = \dfrac{\sin\theta}{\cos\theta} by cos⁡θθ>0\dfrac{\cos\theta}{\theta} > 0 gives cos⁡θ<sin⁡θθ.\cos\theta < \dfrac{\sin\theta}{\theta}\mathclose{\text{.}} So

cos⁡θ<sin⁡θθ<1.\cos\theta < \frac{\sin\theta}{\theta} < 1.

Cosine is even (Section 1.4), and so is sin⁡θθ\dfrac{\sin\theta}{\theta} (Example 2.1), so the same inequality holds for −π/2<θ<0-\pi/2 < \theta < 0 (Figure 2.3, right). As θ→0,\theta \to 0\mathclose{\text{,}} cos⁡θ→1\cos\theta \to 1 (Example 2.10), and the constant 1 stays at 1. By the squeeze theorem, sin⁡θθ→1.\dfrac{\sin\theta}{\theta} \to 1\mathclose{\text{.}}

∎
Theorem 2.6The limit of (1 − cos θ)/θ

With θ\theta in radians,

lim⁡θ→01−cos⁡θθ=0.\lim_{\theta\to0}\frac{1 - \cos\theta}{\theta} = 0.
Proof

For 0<∣θ∣<π/2,0 < \abs{\theta} < \pi/2\mathclose{\text{,}} 1+cos⁡θ>0.1 + \cos\theta > 0\mathclose{\text{.}} Multiply the numerator and the denominator by 1+cos⁡θ,1 + \cos\theta\mathclose{\text{,}} and use 1−cos⁡2θ=sin⁡2θ:1 - \cos^2\theta = \sin^2\theta\mathclose{\text{:}}

1−cos⁡θθ=1−cos⁡2θθ(1+cos⁡θ)=sin⁡θθ⋅sin⁡θ1+cos⁡θ.\begin{aligned} \frac{1 - \cos\theta}{\theta} &= \frac{1 - \cos^2\theta}{\theta(1 + \cos\theta)} \\ &= \frac{\sin\theta}{\theta}\cdot\frac{\sin\theta}{1 + \cos\theta}. \end{aligned}

As θ→0,\theta \to 0\mathclose{\text{,}} sin⁡θθ→1\dfrac{\sin\theta}{\theta} \to 1 (Theorem 2.5), sin⁡θ→0\sin\theta \to 0 and 1+cos⁡θ→21 + \cos\theta \to 2 (Example 2.10). By the product and quotient laws, the limit is 1⋅02=0.1 \cdot \dfrac02 = 0\mathclose{\text{.}}

∎

Theorem 2.5 says that sin⁡θ≈θ\sin\theta \approx \theta for small θ,\theta\mathclose{\text{,}} with an error that is small even compared with θ\theta itself: at θ=0.1\theta = 0.1 the ratio sin⁡θ/θ\sin\theta/\theta is about 0.99833. Physicists use this small-angle approximation, for instance for a pendulum that swings through small angles, and Module 5 uses Theorems 2.5 and 2.6 to find the rate of change of sin⁡x.\sin x\mathclose{\text{.}}

Example 2.11Using the two limits✓ Checked

Find the limits as x→0x \to 0 of (a) sin⁡3xx\dfrac{\sin 3x}{x} and (b) tan⁡xx.\dfrac{\tan x}{x}\mathclose{\text{.}}

(a) Theorem 2.5 needs the same angle above and below. So put θ=3x\theta = 3x and write

sin⁡3xx=3⋅sin⁡3x3x=3⋅sin⁡θθ.\frac{\sin 3x}{x} = 3\cdot\frac{\sin 3x}{3x} = 3\cdot\frac{\sin\theta}{\theta}.

As x→0x \to 0 with x≠0,x \ne 0\mathclose{\text{,}} θ→0\theta \to 0 with θ≠0,\theta \ne 0\mathclose{\text{,}} so sin⁡θ/θ→1.\sin\theta/\theta \to 1\mathclose{\text{.}} (Section 2.7 makes this step precise: if sin⁡θ/θ\sin\theta/\theta is within ε\varepsilon of 1 whenever 0<∣θ∣<δ,0 < \abs{\theta} < \delta\mathclose{\text{,}} then sin⁡3x/(3x)\sin 3x/(3x) is within ε\varepsilon of 1 whenever 0<∣x∣<δ/3,0 < \abs{x} < \delta/3\mathclose{\text{,}} because then 0<∣3x∣<δ.)0 < \abs{3x} < \delta\mathclose{\text{.)}} By the constant multiple law,

lim⁡x→0sin⁡3xx=3⋅1=3.\lim_{x\to0}\frac{\sin 3x}{x} = 3 \cdot 1 = 3.

(b) Write

tan⁡xx=sin⁡xx⋅1cos⁡x.\frac{\tan x}{x} = \frac{\sin x}{x}\cdot\frac{1}{\cos x}.

The first factor approaches 1 (Theorem 2.5) and cos⁡x→1\cos x \to 1 (Example 2.10), so by the product and quotient laws

lim⁡x→0tan⁡xx=1⋅11=1.\lim_{x\to0}\frac{\tan x}{x} = 1 \cdot \frac11 = 1.
Watch out

Theorem 2.5 needs radians. An angle of xx degrees is πx/180\pi x/180 radians, so in degrees the argument of Example 2.11 gives

lim⁡x→0sin⁡(x∘)x=lim⁡x→0π180⋅sin⁡(πx/180)πx/180=π180≈0.01745,\begin{aligned} \lim_{x\to0}\frac{\sin(x^\circ)}{x} &= \lim_{x\to0}\frac{\pi}{180}\cdot\frac{\sin(\pi x/180)}{\pi x/180} \\ &= \frac{\pi}{180} \approx 0.01745, \end{aligned}

not 1: one reason why calculus works in radians. And only sin⁡θ/θ,\sin\theta/\theta\mathclose{\text{,}} with the same θ\theta above and below, approaches 1: sin⁡3xx\dfrac{\sin 3x}{x} approaches 3.

7

The precise definition

Definition 2.1 rests on two phrases, “as close as you like” and “close enough”. To prove that a limit is L,L\mathclose{\text{,}} or that a function has no limit, you must say exactly what they mean. The answer is the foundation that Cauchy, in the 1820s, and Weierstrass, in the 1860s and 1870s, gave to calculus. It measures closeness by distances: ∣f(x)−L∣\abs{f(x) - L} is the distance between f(x)f(x) and L,L\mathclose{\text{,}} and ∣x−a∣\abs{x - a} is the distance between xx and aa (Section 1.3). For a positive number δ,\delta\mathclose{\text{,}}

∣x−a∣<δmeansa−δ<x<a+δ,\abs{x - a} < \delta \quad\text{means}\quad a - \delta < x < a + \delta,

and 0<∣x−a∣<δ0 < \abs{x - a} < \delta says, in addition, that x≠a.x \ne a\mathclose{\text{.}} In the same way, ∣f(x)−L∣<ε\abs{f(x) - L} < \varepsilon means L−ε<f(x)<L+ε.L - \varepsilon < f(x) < L + \varepsilon\mathclose{\text{.}} The Greek letters ε\varepsilon (“epsilon”) and δ\delta (“delta”) are the traditional names of these two distances.

Definition 2.3Limit, precisely

Let ff be defined on an open interval containing a,a\mathclose{\text{,}} except possibly at aa itself. Then lim⁡x→af(x)=L\lim_{x\to a} f(x) = L means: for every number ε>0\varepsilon > 0 there is a number δ>0\delta > 0 such that, for every xx with 0<∣x−a∣<δ,0 < \abs{x - a} < \delta\mathclose{\text{,}}

∣f(x)−L∣<ε.\abs{f(x) - L} < \varepsilon.

Each phrase of Definition 2.1 has its precise counterpart:

Definition 2.1 Definition 2.3
f(x)f(x) as close to LL as you like for every ε>0,\varepsilon > 0\mathclose{\text{,}} ∣f(x)−L∣<ε\abs{f(x) - L} < \varepsilon
by taking xx close enough to aa there is a δ>0\delta > 0 with ∣x−a∣<δ\abs{x - a} < \delta
but not equal to aa 0<∣x−a∣0 < \abs{x - a}

One-sided limits are made precise in the same way: for lim⁡x→a−f(x)=L,\lim_{x\to a^-} f(x) = L\mathclose{\text{,}} replace 0<∣x−a∣<δ0 < \abs{x - a} < \delta by a−δ<x<a,a - \delta < x < a\mathclose{\text{,}} and for lim⁡x→a+f(x)=L\lim_{x\to a^+} f(x) = L by a<x<a+δ.a < x < a + \delta\mathclose{\text{.}}

Challenge and response

Read Definition 2.3 as a game for two players. The challenger names a tolerance ε>0,\varepsilon > 0\mathclose{\text{,}} as small as they like. You respond with a δ>0.\delta > 0\mathclose{\text{.}} You win the round if every xx with 0<∣x−a∣<δ0 < \abs{x - a} < \delta gives ∣f(x)−L∣<ε.\abs{f(x) - L} < \varepsilon\mathclose{\text{.}} On the graph (Figure 2.5): over the strip a−δ<x<a+δ,a - \delta < x < a + \delta\mathclose{\text{,}} apart from x=ax = a itself, the graph must stay inside the band L−ε<y<L+ε.L - \varepsilon < y < L + \varepsilon\mathclose{\text{.}}

  • lim⁡x→af(x)=L\lim_{x\to a} f(x) = L means that you can win every round: whatever ε\varepsilon the challenger names, you have a winning δ.\delta\mathclose{\text{.}}
  • Your δ\delta is chosen after ε,\varepsilon\mathclose{\text{,}} and may depend on it; usually a smaller ε\varepsilon needs a smaller δ.\delta\mathclose{\text{.}}
  • Once a δ\delta wins, every smaller positive δ\delta wins too, since it lets in fewer x.x\mathclose{\text{.}}
  • To show that LL is not the limit, the challenger needs one ε\varepsilon that no δ\delta can answer.
The game for y = x^2 near a = 3, with L = 9 and the challenge varepsilon = 3. The orange band is L - varepsilon < y < L + varepsilon; the green strip is a - delta < x < a + delta. Left: with delta = 0.4 the graph over the strip stays in the band, so delta = 0.4 wins. Right: with delta = 0.8 the graph leaves the band near both edges of the strip (red), so delta = 0.8 loses.
Figure 2.5

The game for y=x2y = x^2 near a=3,a = 3\mathclose{\text{,}} with L=9L = 9 and the challenge ε=3.\varepsilon = 3\mathclose{\text{.}} The orange band is L−ε<y<L+ε;L - \varepsilon < y < L + \varepsilon\mathclose{\text{;}} the green strip is a−δ<x<a+δ.a - \delta < x < a + \delta\mathclose{\text{.}} Left: with δ=0.4\delta = 0.4 the graph over the strip stays in the band, so δ=0.4\delta = 0.4 wins. Right: with δ=0.8\delta = 0.8 the graph leaves the band near both edges of the strip (red), so δ=0.8\delta = 0.8 loses.

Think of it like this

A machine cuts square tiles that should have an area of 400 cm², and so a side of 20 cm. The customer’s tolerance on the area is the challenge ε;\varepsilon\mathclose{\text{;}} the accuracy to which the side must be cut is the response δ.\delta\mathclose{\text{.}} A tighter tolerance needs a more accurate cut, but every tolerance can be met by a cut that is accurate enough: that is what lim⁡s→20s2=400\lim_{s\to20} s^2 = 400 means. Exercise 2.8 works out the accuracy needed for a tolerance of 1 cm².

Try it

Play the game. With x2−1x−1\dfrac{x^2 - 1}{x - 1} at a=1,a = 1\mathclose{\text{,}} set ε=0.5\varepsilon = 0.5 and find the largest δ\delta on the slider that wins; then make ε\varepsilon smaller and find δ\delta again. What is the pattern? Do the same for sin⁡xx,\dfrac{\sin x}{x}\mathclose{\text{,}} where δ\delta can be much larger than ε,\varepsilon\mathclose{\text{,}} and for xsin⁡(1/x),x\sin(1/x)\mathclose{\text{,}} where δ=ε\delta = \varepsilon always wins (Example 2.9 shows why). Zoom in to see the graph close to the point. Then choose ∣x∣/x\abs{x}/x or sin⁡(1/x),\sin(1/x)\mathclose{\text{,}} which have no limit at 0: try each candidate L,L\mathclose{\text{,}} and check that once ε≤1\varepsilon \le 1 no δ\delta wins.

Proofs with ε and δ

A proof that lim⁡x→af(x)=L\lim_{x\to a} f(x) = L is a strategy for the game: a rule that turns any ε\varepsilon into a winning δ.\delta\mathclose{\text{.}} You find it in two stages. In the scratch work you start from ∣f(x)−L∣<ε\abs{f(x) - L} < \varepsilon and work backwards to a condition on ∣x−a∣.\abs{x - a}\mathclose{\text{.}} In the proof you run the argument forwards, from 0<∣x−a∣<δ0 < \abs{x - a} < \delta to ∣f(x)−L∣<ε.\abs{f(x) - L} < \varepsilon\mathclose{\text{.}}

Example 2.12An ε–δ proof for a line✓ Checked

Prove that lim⁡x→2(3x−1)=5.\lim_{x\to2}(3x - 1) = 5\mathclose{\text{.}}

Scratch work. ∣(3x−1)−5∣=∣3x−6∣=3∣x−2∣,\abs{(3x - 1) - 5} = \abs{3x - 6} = 3\abs{x - 2}\mathclose{\text{,}} and this is less than ε\varepsilon exactly when ∣x−2∣<ε/3.\abs{x - 2} < \varepsilon/3\mathclose{\text{.}} So try δ=ε/3.\delta = \varepsilon/3\mathclose{\text{.}}

Proof. Let ε>0,\varepsilon > 0\mathclose{\text{,}} and choose δ=ε/3.\delta = \varepsilon/3\mathclose{\text{.}} If 0<∣x−2∣<δ,0 < \abs{x - 2} < \delta\mathclose{\text{,}} then

∣(3x−1)−5∣=3∣x−2∣<3δ=ε.\abs{(3x - 1) - 5} = 3\abs{x - 2} < 3\delta = \varepsilon.

So every challenge is met, and lim⁡x→2(3x−1)=5.\lim_{x\to2}(3x - 1) = 5\mathclose{\text{.}} For example, the challenge ε=0.3\varepsilon = 0.3 is met by δ=0.1:\delta = 0.1\mathclose{\text{:}} if xx is within 0.1 of 2, then 3x−13x - 1 is within 0.3 of 5.

The same argument proves that lim⁡x→a(mx+b)=ma+b\lim_{x\to a}(mx + b) = ma + b for every line with slope m≠0:m \ne 0\mathclose{\text{:}} since ∣(mx+b)−(ma+b)∣=∣m∣ ∣x−a∣,\abs{(mx + b) - (ma + b)} = \abs{m}\,\abs{x - a}\mathclose{\text{,}} the response δ=ε/∣m∣\delta = \varepsilon/\abs{m} wins. If m=0,m = 0\mathclose{\text{,}} the function is the constant b,b\mathclose{\text{,}} ∣f(x)−b∣=0<ε\abs{f(x) - b} = 0 < \varepsilon for every x,x\mathclose{\text{,}} and every δ\delta wins. With m=0m = 0 and b=c,b = c\mathclose{\text{,}} and with m=1m = 1 and b=0,b = 0\mathclose{\text{,}} this proves the two basic limits of Section 2.4, lim⁡x→ac=c\lim_{x\to a} c = c and lim⁡x→ax=a.\lim_{x\to a} x = a\mathclose{\text{.}}

Example 2.13An ε–δ proof for a parabola✓ Checked

Prove that lim⁡x→3x2=9.\lim_{x\to3} x^2 = 9\mathclose{\text{.}}

Scratch work. ∣x2−9∣=∣x−3∣ ∣x+3∣.\abs{x^2 - 9} = \abs{x - 3}\,\abs{x + 3}\mathclose{\text{.}} The factor ∣x−3∣\abs{x - 3} can be made as small as you like; the factor ∣x+3∣\abs{x + 3} is not constant, but it is not large when xx is near 3. So agree in advance to take δ≤1.\delta \le 1\mathclose{\text{.}} Then ∣x−3∣<1\abs{x - 3} < 1 means 2<x<4,2 < x < 4\mathclose{\text{,}} so 5<x+3<75 < x + 3 < 7 and ∣x+3∣<7.\abs{x + 3} < 7\mathclose{\text{.}} With that, ∣x2−9∣<7∣x−3∣,\abs{x^2 - 9} < 7\abs{x - 3}\mathclose{\text{,}} which is less than ε\varepsilon when ∣x−3∣<ε/7.\abs{x - 3} < \varepsilon/7\mathclose{\text{.}} Both requirements hold if δ\delta is the smaller of 1 and ε/7,\varepsilon/7\mathclose{\text{,}} written δ=min⁡(1,ε/7).\delta = \min(1, \varepsilon/7)\mathclose{\text{.}}

Proof. Let ε>0\varepsilon > 0 and δ=min⁡(1,ε/7).\delta = \min(1, \varepsilon/7)\mathclose{\text{.}} Suppose that 0<∣x−3∣<δ.0 < \abs{x - 3} < \delta\mathclose{\text{.}} Since δ≤1,\delta \le 1\mathclose{\text{,}} 2<x<4,2 < x < 4\mathclose{\text{,}} and so ∣x+3∣<7.\abs{x + 3} < 7\mathclose{\text{.}} Since δ≤ε/7,\delta \le \varepsilon/7\mathclose{\text{,}} ∣x−3∣<ε/7.\abs{x - 3} < \varepsilon/7\mathclose{\text{.}} Therefore

∣x2−9∣=∣x+3∣ ∣x−3∣<7⋅ε7=ε.\abs{x^2 - 9} = \abs{x + 3}\,\abs{x - 3} < 7 \cdot \frac{\varepsilon}{7} = \varepsilon.

For the challenge ε=0.5\varepsilon = 0.5 the proof gives δ=min⁡(1,0.57)=114≈0.0714.\delta = \min(1, \tfrac{0.5}{7}) = \tfrac{1}{14} \approx 0.0714\mathclose{\text{.}} That is not the largest δ\delta that wins: x2<9.5x^2 < 9.5 when x<9.5≈3.0822,x < \sqrt{9.5} \approx 3.0822\mathclose{\text{,}} and x2>8.5x^2 > 8.5 when x>8.5≈2.9155,x > \sqrt{8.5} \approx 2.9155\mathclose{\text{,}} so every δ\delta up to 9.5−3≈0.0822\sqrt{9.5} - 3 \approx 0.0822 wins. A proof does not need the best δ,\delta\mathclose{\text{,}} only one that wins.

Proving that a limit does not exist

lim⁡x→af(x)=L\lim_{x\to a} f(x) = L is false when the challenger has a winning move: some ε>0\varepsilon > 0 such that, for every δ>0,\delta > 0\mathclose{\text{,}} some xx with 0<∣x−a∣<δ0 < \abs{x - a} < \delta has ∣f(x)−L∣≥ε.\abs{f(x) - L} \ge \varepsilon\mathclose{\text{.}} To show that a limit does not exist, show this for every number L.L\mathclose{\text{.}} The main tool is the triangle inequality:

∣p+q∣≤∣p∣+∣q∣,\abs{p + q} \le \abs{p} + \abs{q},

for all real numbers pp and q.q\mathclose{\text{.}} It holds because −∣p∣≤p≤∣p∣-\abs{p} \le p \le \abs{p} and −∣q∣≤q≤∣q∣;-\abs{q} \le q \le \abs{q}\mathclose{\text{;}} adding gives −(∣p∣+∣q∣)≤p+q≤∣p∣+∣q∣,-\big(\abs{p} + \abs{q}\big) \le p + q \le \abs{p} + \abs{q}\mathclose{\text{,}} which says that ∣p+q∣≤∣p∣+∣q∣.\abs{p + q} \le \abs{p} + \abs{q}\mathclose{\text{.}}

Example 2.14Proving that a limit does not exist✓ Checked

Prove that ∣x∣x\dfrac{\abs{x}}{x} has no limit at 0.

Let LL be any number. The challenger names ε=1;\varepsilon = 1\mathclose{\text{;}} let δ>0\delta > 0 be any response. The points x=δ/2x = \delta/2 and x=−δ/2x = -\delta/2 both satisfy 0<∣x∣<δ,0 < \abs{x} < \delta\mathclose{\text{,}} and f(δ/2)=1f(\delta/2) = 1 while f(−δ/2)=−1f(-\delta/2) = -1 (Example 2.2). If both values were within 1 of L,L\mathclose{\text{,}} the triangle inequality would give

2=∣1−(−1)∣=∣(1−L)+(L+1)∣≤∣1−L∣+∣L+1∣<1+1=2,\begin{aligned} 2 &= \abs{1 - (-1)} = \abs{(1 - L) + (L + 1)} \\ &\le \abs{1 - L} + \abs{L + 1} < 1 + 1 = 2, \end{aligned}

which is impossible. So at least one of the two points lies outside the band L−1<y<L+1,L - 1 < y < L + 1\mathclose{\text{,}} and δ\delta loses. Since δ\delta was any response and LL any number, no number is the limit of ∣x∣/x\abs{x}/x at 0.

The same strategy, with the points of Example 2.3, proves that sin⁡(1/x)\sin(1/x) has no limit at 0 (Exercise 2.10). It also shows that a limit, when it exists, is a single number. Suppose f(x)f(x) tended to LL and to M≠L,M \ne L\mathclose{\text{,}} and challenge both limits with ε=∣L−M∣/2.\varepsilon = \abs{L - M}/2\mathclose{\text{.}} For x≠ax \ne a close enough to a,a\mathclose{\text{,}} both ∣f(x)−L∣<ε\abs{f(x) - L} < \varepsilon and ∣f(x)−M∣<ε,\abs{f(x) - M} < \varepsilon\mathclose{\text{,}} and then, by the triangle inequality,

∣L−M∣=∣(L−f(x))+(f(x)−M)∣≤∣L−f(x)∣+∣f(x)−M∣<ε+ε=∣L−M∣,\begin{aligned} \abs{L - M} &= \abs{\big(L - f(x)\big) + \big(f(x) - M\big)} \\ &\le \abs{L - f(x)} + \abs{f(x) - M} \\ &< \varepsilon + \varepsilon = \abs{L - M}, \end{aligned}

which is impossible. The precise definitions also prove the key idea of Section 2.2:

Theorem 2.7One-sided and two-sided limits

lim⁡x→af(x)=L\lim_{x\to a} f(x) = L exactly when lim⁡x→a−f(x)=L\lim_{x\to a^-} f(x) = L and lim⁡x→a+f(x)=L.\lim_{x\to a^+} f(x) = L\mathclose{\text{.}}

Proof

Suppose that lim⁡x→af(x)=L,\lim_{x\to a} f(x) = L\mathclose{\text{,}} and let ε>0.\varepsilon > 0\mathclose{\text{.}} A δ\delta that wins for the two-sided limit wins for each one-sided limit, since a−δ<x<aa - \delta < x < a and a<x<a+δa < x < a + \delta both imply 0<∣x−a∣<δ.0 < \abs{x - a} < \delta\mathclose{\text{.}} Conversely, suppose that both one-sided limits are L,L\mathclose{\text{,}} and let ε>0.\varepsilon > 0\mathclose{\text{.}} There is a δ1>0\delta_1 > 0 that wins for the xx with a−δ1<x<a,a - \delta_1 < x < a\mathclose{\text{,}} and a δ2>0\delta_2 > 0 that wins for the xx with a<x<a+δ2.a < x < a + \delta_2\mathclose{\text{.}} Let δ=min⁡(δ1,δ2).\delta = \min(\delta_1, \delta_2)\mathclose{\text{.}} Every xx with 0<∣x−a∣<δ0 < \abs{x - a} < \delta satisfies a−δ1<x<aa - \delta_1 < x < a or a<x<a+δ2,a < x < a + \delta_2\mathclose{\text{,}} so ∣f(x)−L∣<ε.\abs{f(x) - L} < \varepsilon\mathclose{\text{.}}

∎
Watch out

The order of the words matters. “For every ε\varepsilon there is a δ\delta” lets δ\delta depend on ε.\varepsilon\mathclose{\text{.}} “There is a δ\delta that wins for every ε\varepsilon” says much more: then ∣f(x)−L∣\abs{f(x) - L} is less than every positive number, so f(x)=Lf(x) = L for every xx with 0<∣x−a∣<δ.0 < \abs{x - a} < \delta\mathclose{\text{.}} And winning one round proves nothing: δ=0.1\delta = 0.1 answers ε=0.3\varepsilon = 0.3 for 3x−13x - 1 at 2, but a proof must answer every ε,\varepsilon\mathclose{\text{,}} as δ=ε/3\delta = \varepsilon/3 does.

Going deeperProofs of the squeeze theorem and the limit laws

A first reading may skip this box. In each proof, ε>0\varepsilon > 0 is a challenge, and the task is to find a winning δ.\delta\mathclose{\text{.}}

Squeeze theorem. Suppose that g(x)≤f(x)≤h(x)g(x) \le f(x) \le h(x) for x≠ax \ne a in an open interval containing a,a\mathclose{\text{,}} and that g(x)→Lg(x) \to L and h(x)→L.h(x) \to L\mathclose{\text{.}} Choose δ>0\delta > 0 so small that (a−δ,a+δ)(a - \delta, a + \delta) lies in that interval and that ∣g(x)−L∣<ε\abs{g(x) - L} < \varepsilon and ∣h(x)−L∣<ε\abs{h(x) - L} < \varepsilon for 0<∣x−a∣<δ0 < \abs{x - a} < \delta (the smallest of three δ\deltas will do). For such x,x\mathclose{\text{,}}

L−ε<g(x)≤f(x)≤h(x)<L+ε,L - \varepsilon < g(x) \le f(x) \le h(x) < L + \varepsilon,

so ∣f(x)−L∣<ε.\abs{f(x) - L} < \varepsilon\mathclose{\text{.}}

From here on, lim⁡x→af(x)=L\lim_{x\to a} f(x) = L and lim⁡x→ag(x)=M.\lim_{x\to a} g(x) = M\mathclose{\text{.}}

Sum law. Challenge ff with ε/2:\varepsilon/2\mathclose{\text{:}} there is a δ1>0\delta_1 > 0 such that ∣f(x)−L∣<ε/2\abs{f(x) - L} < \varepsilon/2 whenever 0<∣x−a∣<δ1.0 < \abs{x - a} < \delta_1\mathclose{\text{.}} In the same way there is a δ2>0\delta_2 > 0 for g.g\mathclose{\text{.}} Let δ=min⁡(δ1,δ2).\delta = \min(\delta_1, \delta_2)\mathclose{\text{.}} If 0<∣x−a∣<δ,0 < \abs{x - a} < \delta\mathclose{\text{,}} both inequalities hold, and by the triangle inequality

∣(f(x)+g(x))−(L+M)∣≤∣f(x)−L∣+∣g(x)−M∣<ε2+ε2=ε.\begin{aligned} &\abs{\big(f(x) + g(x)\big) - (L + M)} \\ &\quad\le \abs{f(x) - L} + \abs{g(x) - M} \\ &\quad< \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon. \end{aligned}

Product law. First, gg stays bounded near a:a\mathclose{\text{:}} the challenge 1 gives a δ0>0\delta_0 > 0 with ∣g(x)−M∣<1,\abs{g(x) - M} < 1\mathclose{\text{,}} and so ∣g(x)∣<∣M∣+1,\abs{g(x)} < \abs{M} + 1\mathclose{\text{,}} for 0<∣x−a∣<δ0.0 < \abs{x - a} < \delta_0\mathclose{\text{.}} Next,

f(x)g(x)−LM=(f(x)−L)g(x)+L(g(x)−M),\begin{aligned} &f(x)g(x) - LM \\ &\quad= \big(f(x) - L\big)g(x) + L\big(g(x) - M\big), \end{aligned}

so, by the triangle inequality, for those xx

∣f(x)g(x)−LM∣≤∣f(x)−L∣(∣M∣+1)+∣L∣ ∣g(x)−M∣.\begin{aligned} &\abs{f(x)g(x) - LM} \\ &\quad\le \abs{f(x) - L}\big(\abs{M} + 1\big) \\ &\qquad + \abs{L}\,\abs{g(x) - M}. \end{aligned}

Now choose δ≤δ0\delta \le \delta_0 so small that ∣f(x)−L∣<ε2(∣M∣+1)\abs{f(x) - L} < \dfrac{\varepsilon}{2(\abs{M} + 1)} and ∣g(x)−M∣<ε2(∣L∣+1)\abs{g(x) - M} < \dfrac{\varepsilon}{2(\abs{L} + 1)} for 0<∣x−a∣<δ.0 < \abs{x - a} < \delta\mathclose{\text{.}} Then

∣f(x)g(x)−LM∣<ε2+∣L∣∣L∣+1⋅ε2<ε2+ε2=ε.\begin{aligned} \abs{f(x)g(x) - LM} &< \frac{\varepsilon}{2} + \frac{\abs{L}}{\abs{L} + 1}\cdot\frac{\varepsilon}{2} \\ &< \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon. \end{aligned}

Quotient law. Since f/g=f⋅(1/g),f/g = f \cdot (1/g)\mathclose{\text{,}} the product law reduces this to lim⁡x→a1/g(x)=1/M,\lim_{x\to a} 1/g(x) = 1/M\mathclose{\text{,}} for M≠0.M \ne 0\mathclose{\text{.}} The challenge ∣M∣/2\abs{M}/2 gives a δ0>0\delta_0 > 0 with ∣g(x)−M∣<∣M∣/2\abs{g(x) - M} < \abs{M}/2 for 0<∣x−a∣<δ0.0 < \abs{x - a} < \delta_0\mathclose{\text{.}} For those x,x\mathclose{\text{,}} the triangle inequality ∣M∣≤∣M−g(x)∣+∣g(x)∣\abs{M} \le \abs{M - g(x)} + \abs{g(x)} gives ∣g(x)∣>∣M∣/2;\abs{g(x)} > \abs{M}/2\mathclose{\text{;}} in particular g(x)≠0,g(x) \ne 0\mathclose{\text{,}} so 1/g(x)1/g(x) is defined, and

∣1g(x)−1M∣=∣M−g(x)∣∣g(x)∣ ∣M∣≤2∣M∣2 ∣g(x)−M∣.\begin{aligned} \abs{\frac{1}{g(x)} - \frac1M} &= \frac{\abs{M - g(x)}}{\abs{g(x)}\,\abs{M}} \\ &\le \frac{2}{\abs{M}^2}\,\abs{g(x) - M}. \end{aligned}

Choose δ≤δ0\delta \le \delta_0 so small that ∣g(x)−M∣<12ε∣M∣2\abs{g(x) - M} < \tfrac12\varepsilon\abs{M}^2 for 0<∣x−a∣<δ;0 < \abs{x - a} < \delta\mathclose{\text{;}} then ∣1/g(x)−1/M∣<ε.\abs{1/g(x) - 1/M} < \varepsilon\mathclose{\text{.}}

8

Limits on a computer

Testing a δ

The explorer of Section 2.7 decides whether a δ\delta wins by computing ff at thousands of points of the strip. The same test takes a few lines of Python with NumPy.

Compute itTesting a δ at many points

The function wins checks ∣f(x)−L∣<ε\abs{f(x) - L} < \varepsilon at many points xx with 0<∣x−a∣<δ;0 < \abs{x - a} < \delta\mathclose{\text{;}} here it tests the parabola of Example 2.13 against the challenge ε=0.5:\varepsilon = 0.5\mathclose{\text{:}}

Python
import numpy as np

def wins(f, a, L, eps, delta, n=200_000):
    # n points strictly inside (a - delta, a + delta), none of them equal to a
    xs = a + delta*np.linspace(-1, 1, n + 2)[1:-1]
    xs = xs[xs != a]
    return bool(np.all(np.abs(f(xs) - L) < eps))

for delta in [0.1, 0.0825, 0.082, 1/14]:
    print(f"delta = {delta:.4f}: {wins(lambda x: x**2, 3, 9, 0.5, delta)}")
Output
delta = 0.1000: False
delta = 0.0825: False
delta = 0.0820: True
delta = 0.0714: True

The test agrees with Example 2.13: the proof’s δ=114≈0.0714\delta = \tfrac{1}{14} \approx 0.0714 wins, and the best δ\delta lies between 0.082 and 0.0825; it is 9.5−3≈0.0822.\sqrt{9.5} - 3 \approx 0.0822\mathclose{\text{.}} But a computer test, like a table, looks at finitely many points and one ε\varepsilon at a time, so it gives evidence, not proof: a function such as sin⁡(1/x)\sin(1/x) can misbehave between the points tested. The proof of Example 2.13 covers every xx and every ε\varepsilon at once.

Cancellation

At the end of Module 1, Python computed the falling ball’s average speed over [1,1.001][1, 1.001] as 9.804899999998895, where the exact value is 9.8049, and the series promised an explanation. A computer stores a real number in floating point: in binary, rounded to about 16 significant decimal digits. So almost every number is stored slightly wrong, typically in its 16th digit (even 4.9 has no exact binary form). That is harmless until two nearly equal numbers are subtracted. Here s(1.001)=4.9098049s(1.001) = 4.9098049 and s(1)=4.9s(1) = 4.9 agree in their first three digits; in the difference, 0.0098049, those digits cancel, and the rounding errors, which were in the 16th digit of s(1.001),s(1.001)\mathclose{\text{,}} are now in the 13th digit of the result. Dividing by h=0.001h = 0.001 does not repair them. This loss of accuracy when nearly equal numbers are subtracted is called cancellation error. The closer the two numbers, the more digits cancel: subtracting numbers that agree in their first kk digits loses about kk of the 16.

Compute itCancellation in floating point

First the falling ball, with hh shrinking further than in Module 1:

Python
def s(t):
    return 4.9*t**2

for h in [1e-3, 1e-6, 1e-9, 1e-12, 1e-15]:
    print(h, (s(1 + h) - s(1))/h)
Output
0.001 9.804899999998895
1e-06 9.80000490002908
1e-09 9.800000810855636
1e-12 9.801048861390882
1e-15 10.658141036401503

The exact values are 9.8+4.9h:9.8 + 4.9h\mathclose{\text{:}} 9.8049, 9.8000049, 9.8000000049, and so on. As hh shrinks, s(1+h)s(1 + h) and s(1)s(1) share more digits, more of them cancel, and the error grows, from about 10−1210^{-12} at h=10−3h = 10^{-3} to about 10−310^{-3} at h=10−12;h = 10^{-12}\mathclose{\text{;}} at h=10−15h = 10^{-15} the answer is 10.66 instead of 9.8. A smaller hh helps the formula but hurts the arithmetic, and Module 4 finds the best compromise.

Now 1−cos⁡xx2,\dfrac{1 - \cos x}{x^2}\mathclose{\text{,}} whose limit at 0 is 12,\tfrac12\mathclose{\text{,}} as you will see below. The second column computes the same function from a rearranged formula:

Python
import math
for k in range(1, 10):
    x = 10.0**(-k)
    direct = (1 - math.cos(x))/x**2
    rearranged = (math.sin(x)/x)**2/(1 + math.cos(x))
    print(f"x = {x:.0e}:  {direct:.12f}  {rearranged:.12f}")
Output
x = 1e-01:  0.499583472197  0.499583472197
x = 1e-02:  0.499995833347  0.499995833347
x = 1e-03:  0.499999958326  0.499999958333
x = 1e-04:  0.499999996961  0.499999999583
x = 1e-05:  0.500000041370  0.499999999996
x = 1e-06:  0.500044450291  0.500000000000
x = 1e-07:  0.499600361081  0.500000000000
x = 1e-08:  0.000000000000  0.500000000000
x = 1e-09:  0.000000000000  0.500000000000

The two columns agree at x=0.1x = 0.1 and x=0.01.x = 0.01\mathclose{\text{.}} Then the direct formula drifts: at x=10−6x = 10^{-6} it is off by about 4×10−5,4 \times 10^{-5}\mathclose{\text{,}} and from x=10−8x = 10^{-8} on it gives 0, a completely wrong answer. The reason:

Python
print(math.cos(1e-8), math.cos(1e-8) == 1)
Output
1.0 True

cos⁡(10−8)=1−5×10−17+…\cos(10^{-8}) = 1 - 5 \times 10^{-17} + \dots is closer to 1 than to any other floating-point number, so the computer stores exactly 1, and 1−cos⁡x1 - \cos x comes out as 0: every digit has cancelled. The rearranged formula comes from the proof of Theorem 2.6. Multiply the numerator and the denominator by 1+cos⁡x,1 + \cos x\mathclose{\text{,}} which is positive for ∣x∣<π.\abs{x} < \pi\mathclose{\text{.}} For 0<∣x∣<π,0 < \abs{x} < \pi\mathclose{\text{,}}

1−cos⁡xx2=1−cos⁡2xx2(1+cos⁡x)=(sin⁡xx)2⋅11+cos⁡x.\begin{aligned} \frac{1 - \cos x}{x^2} &= \frac{1 - \cos^2 x}{x^2(1 + \cos x)} \\ &= \Big(\frac{\sin x}{x}\Big)^2\cdot\frac{1}{1 + \cos x}. \end{aligned}

This formula subtracts nothing, and every digit that it prints above is correct. It also gives the limit: by Theorem 2.5 and Example 2.10, it approaches 12⋅12=12.1^2 \cdot \tfrac12 = \tfrac12\mathclose{\text{.}}

Exercise 2.11 gives another formula that fools the computer, and its cure.

Limits with SymPy

Compute itLimits with SymPy

SymPy computes limits exactly with sp.limit(f, x, a, '+-'). Its arguments are the expression, the variable, the point and the side: '+-' asks for the two-sided limit of Definition 2.1, with xx approaching aa from both sides.

Python
import sympy as sp
x = sp.symbols('x')
print(sp.limit((x**2 - 1)/(x - 1), x, 1, '+-'))
print(sp.limit((sp.sqrt(x + 9) - 3)/x, x, 0, '+-'))
print(sp.limit(sp.sin(x)/x, x, 0, '+-'))
print(sp.limit((1 - sp.cos(x))/x**2, x, 0, '+-'))
Output
2
1/6
1
1/2

These are the limits of Section 2.1, Example 2.7, Theorem 2.5 and the box above, and they are exact: 1/6, not 0.1666…. For a one-sided limit, write '-' (from the left) or '+' (from the right) instead. Leave the side out, and something surprising happens:

Python
f = sp.Abs(x)/x
print(sp.limit(f, x, 0, '-'), sp.limit(f, x, 0, '+'))
print(sp.limit(f, x, 0))
Output
-1 1
1

Look at the second line: without a fourth argument SymPy computes the limit from the right, and says nothing about the left. The two-sided limit does not exist, and with '+-' SymPy says so:

Pythonraises an error on purpose
print(sp.limit(f, x, 0, '+-'))
Error
ValueError: The limit does not exist since left hand limit = -1 and right hand limit = 1

SymPy explains why the limit does not exist. For the other two ways of failing, it describes what the values do:

Python
print(sp.limit(1/x**2, x, 0, '+-'))
print(sp.limit(sp.sin(1/x), x, 0, '+-'))
Output
oo
AccumBounds(-1, 1)

oo, two letters o, is SymPy’s ∞\infty (sp.oo in a program): the values of 1/x21/x^2 grow beyond every bound, the blow-up that Module 3 writes as lim⁡x→01/x2=∞.\lim_{x\to0} 1/x^2 = \infty\mathclose{\text{.}} AccumBounds(-1, 1), short for “accumulation bounds”, says that near 0 the values of sin⁡(1/x)\sin(1/x) keep swinging between −1-1 and 1 without settling: the oscillation of Example 2.3. Neither is a limit in the sense of Definition 2.1.

Watch out

sp.limit(f, x, a) on its own is a one-sided limit: without a fourth argument, SymPy goes from the right. So sp.limit(sp.Abs(x)/x, x, 0) gives 1 and sp.limit(1/x, x, 0) gives oo, although neither function has a limit at 0: ∣x∣/x\abs{x}/x jumps there, and 1/x1/x is hugely positive to the right of 0 but hugely negative to the left. Write '+-' whenever you mean the limit of Definition 2.1; for 1/x,1/x\mathclose{\text{,}} SymPy then answers zoo, its symbol for an infinite value without a definite sign.

9

What you learned

  • lim⁡x→af(x)=L\lim_{x\to a} f(x) = L means that f(x)f(x) can be made as close to LL as you like by taking xx close enough to a,a\mathclose{\text{,}} but not equal to a.a\mathclose{\text{.}} The value f(a),f(a)\mathclose{\text{,}} if there is one, plays no part.
  • Tables and graphs suggest limits but can mislead; algebra and proofs confirm them.
  • One-sided limits, x→a−x \to a^- and x→a+,x \to a^+\mathclose{\text{,}} look at one side only. The limit exists exactly when both one-sided limits exist and are equal.
  • A limit can fail to exist through a jump, a blow-up or an oscillation.
  • The limit laws give the limits of sums, differences, constant multiples, products, quotients (when the limit of the denominator is not 0), powers and roots. For polynomials, and for rational functions whose denominator is not 0 at a,a\mathclose{\text{,}} the limit is the value: direct substitution.
  • 0/00/0 is an indeterminate form, a signal to do more work: factor and cancel, rationalise with the conjugate, or combine fractions, then substitute.
  • The squeeze theorem traps a function between two functions with the same limit. With areas in the unit circle it proves lim⁡θ→0sin⁡θθ=1\lim_{\theta\to0}\dfrac{\sin\theta}{\theta} = 1 and lim⁡θ→01−cos⁡θθ=0,\lim_{\theta\to0}\dfrac{1 - \cos\theta}{\theta} = 0\mathclose{\text{,}} with θ\theta in radians.
  • Precisely, lim⁡x→af(x)=L\lim_{x\to a} f(x) = L means that for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that 0<∣x−a∣<δ0 < \abs{x - a} < \delta implies ∣f(x)−L∣<ε.\abs{f(x) - L} < \varepsilon\mathclose{\text{.}} A proof is a rule that turns any ε\varepsilon into a winning δ;\delta\mathclose{\text{;}} to disprove a limit, find one ε\varepsilon that no δ\delta answers.
  • Floating-point numbers keep about 16 significant digits, and subtracting nearly equal numbers loses them: cancellation error. Rearranging the formula can avoid it. SymPy’s sp.limit computes limits exactly; without a fourth argument it computes the limit from the right, so write '+-' for the two-sided limit.
10

Exercises

Exercise 2.1★Reading a piecewise function

Let

f(x)={2x+1if x<1,5if x=1,4−x2if x>1.f(x) = \begin{cases} 2x + 1 & \text{if } x < 1, \\ 5 & \text{if } x = 1, \\ 4 - x^2 & \text{if } x > 1. \end{cases}
  • (a) Find lim⁡x→1−f(x)\lim_{x\to1^-} f(x) and lim⁡x→1+f(x).\lim_{x\to1^+} f(x)\mathclose{\text{.}} Does lim⁡x→1f(x)\lim_{x\to1} f(x) exist?
  • (b) Is the limit at 1 equal to f(1)?f(1)\mathclose{\text{?}} Describe the graph near x=1.x = 1\mathclose{\text{.}}
  • (c) Find lim⁡x→−2f(x)\lim_{x\to-2} f(x) and lim⁡x→2f(x).\lim_{x\to2} f(x)\mathclose{\text{.}}
Show solution✓ Checked

(a) To the left of 1, f(x)=2x+1,f(x) = 2x + 1\mathclose{\text{,}} which approaches 2⋅1+1=32 \cdot 1 + 1 = 3 (Theorem 2.3 for one side, and direct substitution in the linear formula). To the right, f(x)=4−x2,f(x) = 4 - x^2\mathclose{\text{,}} which approaches 4−1=3.4 - 1 = 3\mathclose{\text{.}} Both one-sided limits are 3, so lim⁡x→1f(x)=3.\lim_{x\to1} f(x) = 3\mathclose{\text{.}}

(b) No: f(1)=5,f(1) = 5\mathclose{\text{,}} while the limit is 3. The graph is the line y=2x+1y = 2x + 1 on the left and the parabola y=4−x2y = 4 - x^2 on the right. They meet at (1,3),(1, 3)\mathclose{\text{,}} which is not on the graph (a hollow dot), and the graph has a single filled dot at (1,5),(1, 5)\mathclose{\text{,}} above the hole. The limit ignores that dot.

(c) On the open interval (−∞,1),(-\infty, 1)\mathclose{\text{,}} which contains −2,-2\mathclose{\text{,}} f(x)=2x+1;f(x) = 2x + 1\mathclose{\text{;}} so by Theorem 2.3 and direct substitution, lim⁡x→−2f(x)=2(−2)+1=−3.\lim_{x\to-2} f(x) = 2(-2) + 1 = -3\mathclose{\text{.}} On (1,∞),(1, \infty)\mathclose{\text{,}} which contains 2, f(x)=4−x2,f(x) = 4 - x^2\mathclose{\text{,}} so lim⁡x→2f(x)=4−4=0.\lim_{x\to2} f(x) = 4 - 4 = 0\mathclose{\text{.}}

Exercise 2.2★The limit laws in action

Suppose that lim⁡x→af(x)=4\lim_{x\to a} f(x) = 4 and lim⁡x→ag(x)=−2.\lim_{x\to a} g(x) = -2\mathclose{\text{.}} Find each limit, naming the laws you use, or explain why the laws do not give it.

  • (a) lim⁡x→a(3f(x)−g(x))\lim_{x\to a}\big(3f(x) - g(x)\big)
  • (b) lim⁡x→af(x)(g(x))2\lim_{x\to a} f(x)\big(g(x)\big)^2
  • (c) lim⁡x→af(x)g(x)\lim_{x\to a}\dfrac{\sqrt{f(x)}}{g(x)}
  • (d) lim⁡x→af(x)f(x)+2g(x)\lim_{x\to a}\dfrac{f(x)}{f(x) + 2g(x)}
Show solution✓ Checked

(a) By the difference and constant multiple laws, the limit is 3⋅4−(−2)=14.3 \cdot 4 - (-2) = 14\mathclose{\text{.}}

(b) By the power law, (g(x))2→(−2)2=4;\big(g(x)\big)^2 \to (-2)^2 = 4\mathclose{\text{;}} then by the product law the limit is 4⋅4=16.4 \cdot 4 = 16\mathclose{\text{.}}

(c) By the root law (the limit of ff is 4>0),4 > 0\mathclose{\text{),}} f(x)→4=2.\sqrt{f(x)} \to \sqrt4 = 2\mathclose{\text{.}} The limit of the denominator is −2,-2\mathclose{\text{,}} not 0, so by the quotient law the limit is 2/(−2)=−1.2/(-2) = -1\mathclose{\text{.}}

(d) The denominator approaches 4+2(−2)=0,4 + 2(-2) = 0\mathclose{\text{,}} so the quotient law does not apply. In fact this limit does not exist. Call the quotient q(x).q(x)\mathclose{\text{.}} If q(x)q(x) had a limit K,K\mathclose{\text{,}} the product law would give f(x)=q(x)(f(x)+2g(x))→K⋅0=0;f(x) = q(x)\big(f(x) + 2g(x)\big) \to K \cdot 0 = 0\mathclose{\text{;}} but f(x)→4.f(x) \to 4\mathclose{\text{.}} For example, f(x)=4+xf(x) = 4 + x and g(x)=−2+xg(x) = -2 + x at a=0a = 0 give q(x)=4+x3x,q(x) = \dfrac{4 + x}{3x}\mathclose{\text{,}} which blows up at 0.

Exercise 2.3★Does the limit exist?

Find each limit, or explain why it does not exist.

  • (a) lim⁡x→2x2+x−6x−2\lim_{x\to2}\dfrac{x^2 + x - 6}{x - 2}
  • (b) lim⁡x→01x\lim_{x\to0}\dfrac1x
  • (c) lim⁡x→0cos⁡1x\lim_{x\to0}\cos\dfrac1x
  • (d) lim⁡x→0x2cos⁡1x\lim_{x\to0} x^2\cos\dfrac1x

Then (e) estimate lim⁡x→0+xx\lim_{x\to0^+} x^x from a table of values. Why does only the limit from the right make sense here?

Show solution✓ Checked

(a) Substitution gives 0/0.0/0\mathclose{\text{.}} Factor: x2+x−6=(x−2)(x+3),x^2 + x - 6 = (x - 2)(x + 3)\mathclose{\text{,}} so for x≠2x \ne 2 the quotient is x+3,x + 3\mathclose{\text{,}} and the limit is 2+3=5.2 + 3 = 5\mathclose{\text{.}}

(b) It does not exist: a blow-up. To the right of 0, 1/x1/x is huge and positive (1/0.001=1000);1/0.001 = 1000\mathclose{\text{);}} to the left, it is huge and negative (1/(−0.001)=−1000).1/(-0.001) = -1000\mathclose{\text{).}} As for 1/x21/x^2 in Section 2.3, whatever number LL you name, 1/x>∣L∣+11/x > \abs{L} + 1 for 0<x<1/(∣L∣+1),0 < x < 1/(\abs{L} + 1)\mathclose{\text{,}} so close to 0 there are values more than 1 away from L:L\mathclose{\text{:}} no number is the limit.

(c) It does not exist: an oscillation. cos⁡(1/x)=1\cos(1/x) = 1 at x=1/(2kπ)x = 1/(2k\pi) and cos⁡(1/x)=−1\cos(1/x) = -1 at x=1/((2k+1)π),x = 1/\big((2k + 1)\pi\big)\mathclose{\text{,}} for k=1,2,3,…,k = 1, 2, 3, \dots\mathclose{\text{,}} and these points come as close to 0 as you like. As in Example 2.3, the values 1 and −1,-1\mathclose{\text{,}} which are 2 apart, cannot both stay within 12\tfrac12 of one number.

(d) It is 0, by the squeeze theorem: ∣cos⁡(1/x)∣≤1,\abs{\cos(1/x)} \le 1\mathclose{\text{,}} so −x2≤x2cos⁡(1/x)≤x2-x^2 \le x^2\cos(1/x) \le x^2 for x≠0,x \ne 0\mathclose{\text{,}} and both bounds approach 0.

(e) xxx^x is a power with a variable exponent, which needs a positive base (Section 1.4). So xxx^x is defined for every x>0,x > 0\mathclose{\text{,}} but on no interval to the left of 0 (at x=−12,x = -\tfrac12\mathclose{\text{,}} for example, it would be 1/−1/2),1/\sqrt{-1/2}\mathclose{\text{),}} and only the limit from the right makes sense. Its values near 0:

xxxxx^x
0.10.10.7943280.794328
0.010.010.9549930.954993
0.0010.0010.9931160.993116
0.00010.00010.9990790.999079
0.000010.000010.9998850.999885

The values climb towards 1, and a good guess is lim⁡x→0+xx=1.\lim_{x\to0^+} x^x = 1\mathclose{\text{.}} They climb slowly: at x=0.1x = 0.1 the value is still below 0.8, so only values much closer to 0 show where they are heading. The table does not prove the guess; Module 7 does.

Exercise 2.4★★Three algebraic techniques

Find each limit, showing the algebra.

  • (a) lim⁡x→−2x2+5x+6x2−4\lim_{x\to-2}\dfrac{x^2 + 5x + 6}{x^2 - 4}
  • (b) lim⁡x→9x−9x−3\lim_{x\to9}\dfrac{x - 9}{\sqrt x - 3}
  • (c) lim⁡h→01h(1(1+h)2−1)\lim_{h\to0}\dfrac{1}{h}\Big(\dfrac{1}{(1 + h)^2} - 1\Big)
Show solution✓ Checked

(a) At x=−2x = -2 the numerator is 4−10+6=04 - 10 + 6 = 0 and the denominator is 4−4=0.4 - 4 = 0\mathclose{\text{.}} Factor: x2+5x+6=(x+2)(x+3)x^2 + 5x + 6 = (x + 2)(x + 3) and x2−4=(x+2)(x−2).x^2 - 4 = (x + 2)(x - 2)\mathclose{\text{.}} For x≠−2x \ne -2 (and x≠2),x \ne 2\mathclose{\text{),}}

x2+5x+6x2−4=x+3x−2→−2+3−2−2=−14.\begin{aligned} \frac{x^2 + 5x + 6}{x^2 - 4} &= \frac{x + 3}{x - 2} \\ &\to \frac{-2 + 3}{-2 - 2} = -\frac14. \end{aligned}

(b) Substitution gives 0/0.0/0\mathclose{\text{.}} Multiply the numerator and the denominator by the conjugate x+3,\sqrt x + 3\mathclose{\text{,}} or notice that for x≥0,x \ge 0\mathclose{\text{,}} x−9=(x−3)(x+3).x - 9 = \big(\sqrt x - 3\big)\big(\sqrt x + 3\big)\mathclose{\text{.}} Either way, for x≥0x \ge 0 with x≠9,x \ne 9\mathclose{\text{,}}

x−9x−3=x+3→9+3=6\begin{aligned} \frac{x - 9}{\sqrt x - 3} &= \sqrt x + 3 \\ &\to \sqrt9 + 3 = 6 \end{aligned}

by the root and sum laws.

(c) Substitution gives 0/0.0/0\mathclose{\text{.}} Put the bracket over the common denominator (1+h)2(1 + h)^2 and expand:

1(1+h)2−1=1−(1+h)2(1+h)2=−2h−h2(1+h)2=−h(2+h)(1+h)2.\begin{aligned} \frac{1}{(1 + h)^2} - 1 &= \frac{1 - (1 + h)^2}{(1 + h)^2} \\ &= \frac{-2h - h^2}{(1 + h)^2} \\ &= \frac{-h(2 + h)}{(1 + h)^2}. \end{aligned}

So, for h≠0h \ne 0 (and h≠−1),h \ne -1\mathclose{\text{),}}

1h(1(1+h)2−1)=−2+h(1+h)2→−21=−2.\begin{aligned} \frac{1}{h}\Big(\frac{1}{(1 + h)^2} - 1\Big) &= -\frac{2 + h}{(1 + h)^2} \\ &\to -\frac{2}{1} = -2. \end{aligned}

This is the rate of change of 1/x21/x^2 at x=1.x = 1\mathclose{\text{.}}

Exercise 2.5★★Trigonometric limits

With xx in radians, find

  • (a) lim⁡x→0sin⁡5x2x\lim_{x\to0}\dfrac{\sin 5x}{2x}
  • (b) lim⁡x→0sin⁡3xsin⁡2x\lim_{x\to0}\dfrac{\sin 3x}{\sin 2x}
  • (c) lim⁡x→01−cos⁡xxsin⁡x\lim_{x\to0}\dfrac{1 - \cos x}{x\sin x}
Show solution✓ Checked

(a) Make the angle appear below: sin⁡5x2x=52⋅sin⁡5x5x.\dfrac{\sin 5x}{2x} = \dfrac52\cdot\dfrac{\sin 5x}{5x}\mathclose{\text{.}} As in Example 2.11, sin⁡5x5x→1,\dfrac{\sin 5x}{5x} \to 1\mathclose{\text{,}} so the limit is 52.\dfrac52\mathclose{\text{.}}

(b) Divide the numerator and the denominator by x,x\mathclose{\text{,}} and arrange both as in (a):

sin⁡3xsin⁡2x=sin⁡3xxsin⁡2xx=3⋅sin⁡3x3x2⋅sin⁡2x2x→3⋅12⋅1=32,\begin{aligned} \frac{\sin 3x}{\sin 2x} &= \frac{\dfrac{\sin 3x}{x}}{\dfrac{\sin 2x}{x}} = \frac{3\cdot\dfrac{\sin 3x}{3x}}{2\cdot\dfrac{\sin 2x}{2x}} \\ &\to \frac{3 \cdot 1}{2 \cdot 1} = \frac32, \end{aligned}

by the quotient law, since the limit of the denominator, 2, is not 0. A common wrong answer is 1, from the idea that a quotient of two quantities that both approach 0 approaches 1: that is the 0/00/0 slip of Section 2.5.

(c) Multiply the numerator and the denominator by 1+cos⁡x,1 + \cos x\mathclose{\text{,}} as in the proof of Theorem 2.6. For 0<∣x∣<π/2,0 < \abs{x} < \pi/2\mathclose{\text{,}} where sin⁡x≠0\sin x \ne 0 and 1+cos⁡x>0,1 + \cos x > 0\mathclose{\text{,}}

1−cos⁡xxsin⁡x=sin⁡2xxsin⁡x (1+cos⁡x)=sin⁡xx⋅11+cos⁡x→1⋅12=12.\begin{aligned} \frac{1 - \cos x}{x\sin x} &= \frac{\sin^2 x}{x\sin x\,(1 + \cos x)} \\ &= \frac{\sin x}{x}\cdot\frac{1}{1 + \cos x} \\ &\to 1 \cdot \frac12 = \frac12. \end{aligned}
Exercise 2.6★★Choosing a constant

Let

f(x)={x2+cif x<2,3x−1if x≥2,f(x) = \begin{cases} x^2 + c & \text{if } x < 2, \\ 3x - 1 & \text{if } x \ge 2, \end{cases}

where cc is a constant.

  • (a) Find the one-sided limits of ff at 2, in terms of c.c\mathclose{\text{.}}
  • (b) For which value of cc does lim⁡x→2f(x)\lim_{x\to2} f(x) exist? What is the limit then?
  • (c) Describe the graph near x=2x = 2 when c=3.c = 3\mathclose{\text{.}}
Show solution✓ Checked

(a) From the left, f(x)=x2+c→4+c;f(x) = x^2 + c \to 4 + c\mathclose{\text{;}} from the right, f(x)=3x−1→5f(x) = 3x - 1 \to 5 (direct substitution in each formula).

(b) The limit exists exactly when the one-sided limits are equal: 4+c=5,4 + c = 5\mathclose{\text{,}} so c=1.c = 1\mathclose{\text{.}} Then lim⁡x→2f(x)=5,\lim_{x\to2} f(x) = 5\mathclose{\text{,}} which is also f(2):f(2)\mathclose{\text{:}} the two pieces join without a gap.

(c) With c=3c = 3 the limit from the left is 7 and the limit from the right is 5. The graph jumps down by 2 at x=2:x = 2\mathclose{\text{:}} the parabola ends at a hollow dot at (2,7),(2, 7)\mathclose{\text{,}} and the line starts at the filled dot (2,5).(2, 5)\mathclose{\text{.}}

Exercise 2.7★★An ε–δ proof for a line
  • (a) Prove from Definition 2.3 that lim⁡x→−1(5−2x)=7.\lim_{x\to-1}(5 - 2x) = 7\mathclose{\text{.}}
  • (b) Which δ\delta does your proof give for ε=0.01?\varepsilon = 0.01\mathclose{\text{?}} Does any larger δ\delta also win?
Show solution✓ Checked

(a) Scratch work. ∣(5−2x)−7∣=∣−2x−2∣=2∣x+1∣,\abs{(5 - 2x) - 7} = \abs{-2x - 2} = 2\abs{x + 1}\mathclose{\text{,}} which is less than ε\varepsilon exactly when ∣x+1∣<ε/2.\abs{x + 1} < \varepsilon/2\mathclose{\text{.}}

Proof. Let ε>0\varepsilon > 0 and δ=ε/2.\delta = \varepsilon/2\mathclose{\text{.}} If 0<∣x−(−1)∣<δ,0 < \abs{x - (-1)} < \delta\mathclose{\text{,}} that is, 0<∣x+1∣<δ,0 < \abs{x + 1} < \delta\mathclose{\text{,}} then

∣(5−2x)−7∣=2∣x+1∣<2δ=ε.\begin{aligned} \abs{(5 - 2x) - 7} &= 2\abs{x + 1} \\ &< 2\delta = \varepsilon. \end{aligned}

(b) δ=0.01/2=0.005.\delta = 0.01/2 = 0.005\mathclose{\text{.}} No larger δ\delta wins: if δ>0.005,\delta > 0.005\mathclose{\text{,}} the point x=−1.005x = -1.005 satisfies 0<∣x+1∣=0.005<δ,0 < \abs{x + 1} = 0.005 < \delta\mathclose{\text{,}} but ∣(5−2x)−7∣=∣7.01−7∣=0.01,\abs{(5 - 2x) - 7} = \abs{7.01 - 7} = 0.01\mathclose{\text{,}} which is not less than ε.\varepsilon\mathclose{\text{.}} For a line, the “exactly when” of the scratch work makes the proof’s δ\delta the best possible; for the parabola of Example 2.13 it was not.

Exercise 2.8★★How accurately must a tile be cut?

A square tile should have an area of 400 cm², and the customer accepts any area between 399 and 401 cm². In the language of Section 2.7, this is the challenge ε=1\varepsilon = 1 for lim⁡s→20s2=400,\lim_{s\to20} s^2 = 400\mathclose{\text{,}} where ss is the side in centimetres.

  • (a) Use the method of Example 2.13, agreeing first on δ≤1,\delta \le 1\mathclose{\text{,}} to find a δ\delta such that ∣s−20∣<δ\abs{s - 20} < \delta guarantees the tolerance.
  • (b) Find the largest such δ,\delta\mathclose{\text{,}} to three significant figures, and say what it means in millimetres.
  • (c) Turn (a) into a proof from Definition 2.3 that lim⁡s→20s2=400:\lim_{s\to20} s^2 = 400\mathclose{\text{:}} give a δ\delta that wins against every ε>0.\varepsilon > 0\mathclose{\text{.}}
Show solution✓ Checked

(a) ∣s2−400∣=∣s−20∣ ∣s+20∣.\abs{s^2 - 400} = \abs{s - 20}\,\abs{s + 20}\mathclose{\text{.}} If ∣s−20∣<1,\abs{s - 20} < 1\mathclose{\text{,}} then 19<s<21,19 < s < 21\mathclose{\text{,}} so 39<s+20<4139 < s + 20 < 41 and ∣s+20∣<41.\abs{s + 20} < 41\mathclose{\text{.}} Then ∣s2−400∣<41∣s−20∣,\abs{s^2 - 400} < 41\abs{s - 20}\mathclose{\text{,}} which is less than 1 when ∣s−20∣<141.\abs{s - 20} < \tfrac{1}{41}\mathclose{\text{.}} So δ=min⁡(1,141)=141≈0.0244\delta = \min\big(1, \tfrac{1}{41}\big) = \tfrac{1}{41} \approx 0.0244 cm works.

(b) For s>0,s > 0\mathclose{\text{,}} the tolerance 399<s2<401399 < s^2 < 401 holds exactly when 399<s<401,\sqrt{399} < s < \sqrt{401}\mathclose{\text{,}} that is, approximately 19.97498<s<20.02498.19.97498 < s < 20.02498\mathclose{\text{.}} The interval around 20 must fit on both sides, and the two sides are not equal: 20−399≈0.02501620 - \sqrt{399} \approx 0.025016 and 401−20≈0.024984.\sqrt{401} - 20 \approx 0.024984\mathclose{\text{.}} The largest δ\delta is the smaller, 401−20≈0.0250\sqrt{401} - 20 \approx 0.0250 cm: the side must be cut to within about a quarter of a millimetre. The δ\delta of (a) is a little smaller, as Example 2.13 led you to expect.

(c) Replace the tolerance 1 by any ε>0\varepsilon > 0 in (a). Proof. Let ε>0\varepsilon > 0 and δ=min⁡(1,ε/41).\delta = \min(1, \varepsilon/41)\mathclose{\text{.}} Suppose that 0<∣s−20∣<δ.0 < \abs{s - 20} < \delta\mathclose{\text{.}} Since δ≤1,\delta \le 1\mathclose{\text{,}} 19<s<21,19 < s < 21\mathclose{\text{,}} and so ∣s+20∣<41.\abs{s + 20} < 41\mathclose{\text{.}} Since δ≤ε/41,\delta \le \varepsilon/41\mathclose{\text{,}} ∣s−20∣<ε/41.\abs{s - 20} < \varepsilon/41\mathclose{\text{.}} Therefore

∣s2−400∣=∣s+20∣ ∣s−20∣<41⋅ε41=ε.\begin{aligned} \abs{s^2 - 400} &= \abs{s + 20}\,\abs{s - 20} \\ &< 41 \cdot \frac{\varepsilon}{41} = \varepsilon. \end{aligned}

So every challenge is met, and lim⁡s→20s2=400.\lim_{s\to20} s^2 = 400\mathclose{\text{.}} For ε=1\varepsilon = 1 the proof gives the δ=141\delta = \tfrac{1}{41} of (a).

Exercise 2.9★★★The root law for square roots

Suppose that lim⁡x→af(x)=L,\lim_{x\to a} f(x) = L\mathclose{\text{,}} with L>0.L > 0\mathclose{\text{.}}

  • (a) Show that there is a δ0>0\delta_0 > 0 such that f(x)>L/2f(x) > L/2 whenever 0<∣x−a∣<δ0.0 < \abs{x - a} < \delta_0\mathclose{\text{.}} (So f(x)\sqrt{f(x)} is defined for those x.)x\mathclose{\text{.)}}
  • (b) Show that, for those x,x\mathclose{\text{,}} ∣f(x)−L∣≤∣f(x)−L∣L.\big\lvert\sqrt{f(x)} - \sqrt{L}\big\rvert \le \dfrac{\abs{f(x) - L}}{\sqrt L}\mathclose{\text{.}} (Rationalise.)
  • (c) Prove that lim⁡x→af(x)=L.\lim_{x\to a}\sqrt{f(x)} = \sqrt L\mathclose{\text{.}} Deduce that lim⁡x→ax=a\lim_{x\to a}\sqrt x = \sqrt a for every a>0.a > 0\mathclose{\text{.}}
Show solution✓ Checked

(a) Use the challenge ε=L/2\varepsilon = L/2 in Definition 2.3: there is a δ0>0\delta_0 > 0 such that ∣f(x)−L∣<L/2\abs{f(x) - L} < L/2 whenever 0<∣x−a∣<δ0.0 < \abs{x - a} < \delta_0\mathclose{\text{.}} Then f(x)>L−L/2=L/2>0.f(x) > L - L/2 = L/2 > 0\mathclose{\text{.}}

(b) For such x,x\mathclose{\text{,}} both f(x)\sqrt{f(x)} and L\sqrt L are defined, and their sum is at least L>0.\sqrt L > 0\mathclose{\text{.}} Multiply and divide by the conjugate f(x)+L;\sqrt{f(x)} + \sqrt L\mathclose{\text{;}} since (f(x)−L)(f(x)+L)=f(x)−L,\big(\sqrt{f(x)} - \sqrt L\big)\big(\sqrt{f(x)} + \sqrt L\big) = f(x) - L\mathclose{\text{,}}

f(x)−L=f(x)−Lf(x)+L.\sqrt{f(x)} - \sqrt L = \frac{f(x) - L}{\sqrt{f(x)} + \sqrt L}.

Take absolute values, and use f(x)+L≥L:\sqrt{f(x)} + \sqrt L \ge \sqrt L\mathclose{\text{:}}

∣f(x)−L∣=∣f(x)−L∣f(x)+L≤∣f(x)−L∣L.\begin{aligned} \big\lvert\sqrt{f(x)} - \sqrt L\big\rvert &= \frac{\abs{f(x) - L}}{\sqrt{f(x)} + \sqrt L} \\ &\le \frac{\abs{f(x) - L}}{\sqrt L}. \end{aligned}

(c) Let ε>0.\varepsilon > 0\mathclose{\text{.}} Challenge ff with εL:\varepsilon\sqrt L\mathclose{\text{:}} there is a δ1>0\delta_1 > 0 with ∣f(x)−L∣<εL\abs{f(x) - L} < \varepsilon\sqrt L whenever 0<∣x−a∣<δ1.0 < \abs{x - a} < \delta_1\mathclose{\text{.}} Let δ=min⁡(δ0,δ1).\delta = \min(\delta_0, \delta_1)\mathclose{\text{.}} If 0<∣x−a∣<δ,0 < \abs{x - a} < \delta\mathclose{\text{,}} then by (b)

∣f(x)−L∣≤∣f(x)−L∣L<εLL=ε.\begin{aligned} \big\lvert\sqrt{f(x)} - \sqrt L\big\rvert &\le \frac{\abs{f(x) - L}}{\sqrt L} \\ &< \frac{\varepsilon\sqrt L}{\sqrt L} = \varepsilon. \end{aligned}

So lim⁡x→af(x)=L.\lim_{x\to a}\sqrt{f(x)} = \sqrt L\mathclose{\text{.}} For f(x)=x,f(x) = x\mathclose{\text{,}} whose limit at aa is aa (Section 2.7), this gives lim⁡x→ax=a\lim_{x\to a}\sqrt x = \sqrt a for every a>0.a > 0\mathclose{\text{.}}

Exercise 2.10★★★No limit for sin(1/x)

Prove from Definition 2.3 that lim⁡x→0sin⁡(1/x)\lim_{x\to0}\sin(1/x) does not exist. (Use the points of Example 2.3 and the strategy of Example 2.14.)

Show solution✓ Checked

Let LL be any number; the challenge ε=1\varepsilon = 1 will defeat it. Let δ>0\delta > 0 be any response, and choose a whole number k≥1k \ge 1 with k≥1/δ.k \ge 1/\delta\mathclose{\text{.}} The points

x1=2(4k+1)π,x2=2(4k+3)π\begin{aligned} x_1 &= \frac{2}{(4k + 1)\pi}, \\ x_2 &= \frac{2}{(4k + 3)\pi} \end{aligned}

are positive, and

x2<x1<24kπ=12kπ≤δ2π<δ,\begin{aligned} x_2 < x_1 &< \frac{2}{4k\pi} = \frac{1}{2k\pi} \\ &\le \frac{\delta}{2\pi} < \delta, \end{aligned}

so both satisfy 0<∣x∣<δ.0 < \abs{x} < \delta\mathclose{\text{.}} At these points sin⁡(1/x1)=sin⁡(4k+1)π2=1\sin(1/x_1) = \sin\dfrac{(4k + 1)\pi}{2} = 1 and sin⁡(1/x2)=sin⁡(4k+3)π2=−1.\sin(1/x_2) = \sin\dfrac{(4k + 3)\pi}{2} = -1\mathclose{\text{.}} If both values were within 1 of L,L\mathclose{\text{,}} the triangle inequality would give

2=∣(1−L)+(L+1)∣≤∣1−L∣+∣L+1∣<1+1=2,\begin{aligned} 2 &= \abs{(1 - L) + (L + 1)} \\ &\le \abs{1 - L} + \abs{L + 1} \\ &< 1 + 1 = 2, \end{aligned}

which is impossible. So at least one of x1x_1 and x2x_2 gives ∣sin⁡(1/x)−L∣≥1,\abs{\sin(1/x) - L} \ge 1\mathclose{\text{,}} and δ\delta loses. Since δ\delta and LL were arbitrary, sin⁡(1/x)\sin(1/x) has no limit at 0.

Exercise 2.11★★★A formula that fools the computer

Let f(x)=x2+1−1x2f(x) = \dfrac{\sqrt{x^2 + 1} - 1}{x^2} for x≠0.x \ne 0\mathclose{\text{.}}

  • (a) Find lim⁡x→0f(x)\lim_{x\to0} f(x) by rationalising.
  • (b) In Python, (math.sqrt(x**2 + 1) - 1)/x**2 gives 0.0 for x = 1e-8. Explain why.
  • (c) Find a formula for f(x)f(x) that a computer evaluates accurately for small x,x\mathclose{\text{,}} and compare the two formulas in Python.
Show solution✓ Checked

(a) Multiply the numerator and the denominator by the conjugate x2+1+1:\sqrt{x^2 + 1} + 1\mathclose{\text{:}}

f(x)=(x2+1)−1x2(x2+1+1)=1x2+1+1(x≠0).\begin{aligned} f(x) &= \frac{(x^2 + 1) - 1}{x^2\big(\sqrt{x^2 + 1} + 1\big)} \\ &= \frac{1}{\sqrt{x^2 + 1} + 1} \qquad (x \ne 0). \end{aligned}

By the root law, x2+1→1,\sqrt{x^2 + 1} \to 1\mathclose{\text{,}} so f(x)→11+1=12.f(x) \to \dfrac{1}{1 + 1} = \dfrac12\mathclose{\text{.}}

(b) For x=10−8,x = 10^{-8}\mathclose{\text{,}} x2+1=1+10−16.x^2 + 1 = 1 + 10^{-16}\mathclose{\text{.}} The next floating-point number after 1 is about 1+2.2×10−16,1 + 2.2 \times 10^{-16}\mathclose{\text{,}} so 1+10−16,1 + 10^{-16}\mathclose{\text{,}} which is nearer to 1, is stored as exactly 1. Then 1−1=0:\sqrt1 - 1 = 0\mathclose{\text{:}} every digit has cancelled, and the quotient is 0/10−16=0.0/10^{-16} = 0\mathclose{\text{.}}

(c) The rationalised formula of (a), 1x2+1+1,\dfrac{1}{\sqrt{x^2 + 1} + 1}\mathclose{\text{,}} adds instead of subtracting, so nothing cancels:

Python
import math
for x in [1e-2, 1e-4, 1e-6, 1e-7, 1e-8]:
    direct = (math.sqrt(x**2 + 1) - 1)/x**2
    rationalised = 1/(math.sqrt(x**2 + 1) + 1)
    print(f"x = {x:.0e}:  {direct:.12f}  {rationalised:.12f}")
Output
x = 1e-02:  0.499987500624  0.499987500625
x = 1e-04:  0.499999996961  0.499999998750
x = 1e-06:  0.500044450291  0.500000000000
x = 1e-07:  0.488498130835  0.500000000000
x = 1e-08:  0.000000000000  0.500000000000

The direct formula loses digits as xx shrinks and gives 0 at x=10−8;x = 10^{-8}\mathclose{\text{;}} the rationalised one stays accurate and approaches 12,\tfrac12\mathclose{\text{,}} as (a) says.

11

Check yourself

1
If f(x)=x+1f(x) = x + 1 for every x≠1,x \ne 1\mathclose{\text{,}} and f(1)=5,f(1) = 5\mathclose{\text{,}} then lim⁡x→1f(x)\lim_{x\to1} f(x) is
2
lim⁡x→2−∣x−2∣x−2\lim_{x\to2^-}\dfrac{\abs{x - 2}}{x - 2} equals
3
Direct substitution in lim⁡x→2x2−4x−2\lim_{x\to2}\dfrac{x^2 - 4}{x - 2} gives 00.\dfrac00\mathclose{\text{.}} So the limit
4
lim⁡x→01+x−1x\lim_{x\to0}\dfrac{\sqrt{1 + x} - 1}{x} equals
5
With xx in radians, lim⁡x→0sin⁡4xx\lim_{x\to0}\dfrac{\sin 4x}{x} is
6
If 1−x2≤f(x)≤1+x21 - x^2 \le f(x) \le 1 + x^2 for every x,x\mathclose{\text{,}} then lim⁡x→0f(x)\lim_{x\to0} f(x)
7
For lim⁡x→1(4x+3)=7,\lim_{x\to1}(4x + 3) = 7\mathclose{\text{,}} which response δ\delta wins against every challenge ε>0?\varepsilon > 0\mathclose{\text{?}}
8
In floating-point arithmetic, (1 - math.cos(x))/x**2 gives 0.0 at x = 1e-8, although the limit at 0 is 12.\tfrac12\mathclose{\text{.}} Why?
Finished this module?