TExcelTAD
Home › Calculus in Depth › Calculating Limits Using the Limit Laws

Calculating Limits Using the Limit Laws

Tables only suggest limits; the limit laws let us compute them exactly. This lesson lists the laws, shows the direct substitution property for polynomials and rational functions, works through the standard algebraic tricks for 0/00/0, and proves the Squeeze Theorem's most famous use.

The survey version is Limit Laws and Limits at Infinity. Here we add the precise statements, the conditions under which each law applies, and a proof of the sum law.

The laws

Suppose cc is a constant and both lim⁡f(x)=L\lim f(x) = L and lim⁡g(x)=M\lim g(x) = M exist as x→ax \to a. Then:

Law Statement (all limits as x→ax \to a)
Sum lim⁡[f+g]=L+M\lim [f + g] = L + M
Difference lim⁡[f−g]=L−M\lim [f - g] = L - M
Constant multiple lim⁡[c⋅f]=c⋅L\lim [c \cdot f] = c \cdot L
Product lim⁡[f⋅g]=L⋅M\lim [f \cdot g] = L \cdot M
Quotient lim⁡[f/g]=L/M\lim [f/g] = L/M, provided M≠0M \ne 0
Power lim⁡[f]n=Ln\lim [f]^n = L^n for positive integers nn
Root lim⁡fn=Ln\lim \sqrt[n]{f} = \sqrt[n]{L} (for even nn, assume L>0L > 0)
Basic limits lim⁡c=c\lim c = c, lim⁡x=a\lim x = a

The hypothesis "both limits exist" matters. lim⁡[1/x−1/x]=0\lim [1/x - 1/x] = 0 at 00, but the sum law cannot be used because lim⁡1/x\lim 1/x does not exist.

Proof of the sum law

We use the precise definition from The Precise Definition of a Limit. Let ε>0\varepsilon > 0. Since f→Lf \to L, there is δ1>0\delta_1 > 0 with ∣f(x)−L∣<ε/2\lvert f(x) - L \rvert < \varepsilon/2 whenever 0<∣x−a∣<δ10 < \lvert x - a \rvert < \delta_1. Since g→Mg \to M, there is δ2>0\delta_2 > 0 with ∣g(x)−M∣<ε/2\lvert g(x) - M \rvert < \varepsilon/2 whenever 0<∣x−a∣<δ20 < \lvert x - a \rvert < \delta_2. Let δ=min⁡(δ1,δ2)\delta = \min(\delta_1, \delta_2). For 0<∣x−a∣<δ0 < \lvert x - a \rvert < \delta, the triangle inequality gives

∣(f(x)+g(x))−(L+M)∣≤∣f(x)−L∣+∣g(x)−M∣<ε/2+ε/2=ε\lvert (f(x) + g(x)) - (L + M) \rvert \le \lvert f(x) - L \rvert + \lvert g(x) - M \rvert < \varepsilon/2 + \varepsilon/2 = \varepsilon

which is exactly the statement lim⁡[f+g]=L+M\lim [f + g] = L + M. The "split ε\varepsilon in half" move is the template for most limit proofs.

Direct substitution

Repeated use of the sum, product and constant laws with lim⁡x=a\lim x = a gives:

Direct substitution property. If ff is a polynomial, or a rational function with aa in its domain, then lim⁡f(x)=f(a)\lim f(x) = f(a) as x→ax \to a.

Functions with this property are called continuous at aa (Continuity). When substitution gives 0/00/0, the form is indeterminate: the limit may be any number or may not exist, and the expression must be rewritten first.

Four tricks for 0/00/0

Trick When Example
Factor and cancel polynomial ratio (x3−8)/(x−2)=x2+2x+4→12(x^3 - 8)/(x - 2) = x^2 + 2x + 4 \to 12
Rationalize square roots (x+16−4)/x=1/(x+16+4)→1/8(\sqrt{x + 16} - 4)/x = 1/(\sqrt{x + 16} + 4) \to 1/8
Common denominator nested fractions (1/(3+h)−1/3)/h=−1/(3(3+h))→−1/9(1/(3 + h) - 1/3)/h = -1/(3(3 + h)) \to -1/9
Split a piecewise / absolute value ∣⋅∣\lvert \cdot \rvert, cases ∣x∣\lvert x \rvert → one-sided limits

Cancelling is legitimate because the limit only uses x≠ax \ne a: if f(x)=g(x)f(x) = g(x) for all x≠ax \ne a near aa, then ff and gg have the same limit at aa.

python · try it yourself
import sympy as sp

x, h = sp.symbols('x h')
cases = [  # (original, hand-simplified form, variable, point)
    ((x**3 - 8)/(x - 2),                  x**2 + 2*x + 4,          x, 2),
    ((sp.sqrt(x + 16) - 4)/x,             1/(sp.sqrt(x + 16) + 4), x, 0),
    ((1/(3 + h) - sp.Rational(1, 3))/h,   -1/(3*(3 + h)),          h, 0),
]
for e, simple, v, a in cases:
    same = sp.simplify(e - simple) == 0          # equal for v != a
    print(f"{str(simple):22} same: {same}  substitute: {simple.subs(v, a)}  sp.limit: {sp.limit(e, v, a)}")
x**2 + 2*x + 4         same: True  substitute: 12  sp.limit: 12
1/(sqrt(x + 16) + 4)   same: True  substitute: 1/8  sp.limit: 1/8
-1/(3*h + 9)           same: True  substitute: -1/9  sp.limit: -1/9

Each simplified form agrees with the original away from the point, and plain substitution into it gives the same value as sp.limit on the original. SymPy prints powers as **; sp.cancel removes common factors and sp.radsimp rationalizes.

Order and the Squeeze Theorem

Two more theorems compare functions instead of combining them.

  1. If f(x)≤g(x)f(x) \le g(x) near aa (except possibly at aa) and both limits exist, then lim⁡f≤lim⁡g\lim f \le \lim g.
  2. Squeeze Theorem. If f(x)≤g(x)≤h(x)f(x) \le g(x) \le h(x) near aa (except possibly at aa) and lim⁡f=lim⁡h=L\lim f = \lim h = L, then lim⁡g=L\lim g = L.

Proof of 2. Let ε>0\varepsilon > 0. Choose δ\delta so small that, for 0<∣x−a∣<δ0 < \lvert x - a \rvert < \delta, both L−ε<f(x)L - \varepsilon < f(x) and h(x)<L+εh(x) < L + \varepsilon hold, and the inequality f≤g≤hf \le g \le h holds. Then L−ε<f(x)≤g(x)≤h(x)<L+εL - \varepsilon < f(x) \le g(x) \le h(x) < L + \varepsilon, so ∣g(x)−L∣<ε\lvert g(x) - L \rvert < \varepsilon. ∎

Example. lim⁡x2cos⁡(5/x)\lim x^2 \cos(5/x) as x→0x \to 0. The law for products does not apply, because cos⁡(5/x)\cos(5/x) has no limit at 00. But −1≤cos⁡(5/x)≤1-1 \le \cos(5/x) \le 1, so

−x2≤x2cos⁡(5/x)≤x2-x^2 \le x^2 \cos(5/x) \le x^2

Both outer functions tend to 00, so the middle one does too.

python · try it yourself
import numpy as np
import matplotlib.pyplot as plt

xs = np.linspace(-0.6, 0.6, 3001)
xs = xs[xs != 0]
g = xs**2 * np.cos(5 / xs)
plt.figure(figsize=(6, 3.5))
plt.plot(xs, g, lw=0.8, label="x² cos(5/x)")
plt.plot(xs, xs**2, "k--", lw=0.8, label="±x²")
plt.plot(xs, -xs**2, "k--", lw=0.8)
plt.legend(); plt.grid(alpha=0.3)
print("all points squeezed:", bool(np.all(np.abs(g) <= xs**2)))
print("max |g| for |x| < 0.01:", float(np.max(np.abs(g[np.abs(xs) < 0.01]))))
all points squeezed: True
max |g| for |x| < 0.01: 8.462738087968791e-05

In software

  • Computer algebra. SymPy's limit uses series expansions (the Gruntz algorithm), but the limit laws are what justify splitting an expression into simpler pieces first.
  • Bounding errors. The squeeze idea is how numerical code proves accuracy: if the true value is sandwiched between a lower and an upper estimate that converge, both converge to the truth (interval arithmetic, bisection, upper and lower Riemann sums).
  • Rewriting formulas. The "rationalize" trick is the same rewrite numerical programmers use for stability: x+1−x=1/(x+1+x)\sqrt{x + 1} - \sqrt{x} = 1/(\sqrt{x + 1} + \sqrt{x}) avoids cancellation for large xx.

Exercises

Exercise 1: Factor and cancel

Find lim⁡(x2−2x−15)/(x2−25)\lim (x^2 - 2x - 15)/(x^2 - 25) as x→5x \to 5.

Answer

4/54/5

Solution
x2−2x−15=(x−5)(x+3),x2−25=(x−5)(x+5)for x≠5 the quotient is (x+3)/(x+5)direct substitution: 8/10=4/5\begin{aligned} &x^2 - 2x - 15 = (x - 5)(x + 3), \qquad x^2 - 25 = (x - 5)(x + 5) \\ &\text{for } x \ne 5 \text{ the quotient is } (x + 3)/(x + 5) \\ &\text{direct substitution: } 8/10 = 4/5 \end{aligned}

Exercise 2: Rationalize

Find lim⁡(3−x+9)/x\lim (3 - \sqrt{x + 9})/x as x→0x \to 0.

Answer

−1/6-1/6

Solution
(3−x+9)(3+x+9)=9−(x+9)=−xquotient=−xx(3+x+9)=−13+x+9at x=0:−1/6\begin{aligned} (3 - \sqrt{x + 9})(3 + \sqrt{x + 9}) &= 9 - (x + 9) = -x \\ \text{quotient} &= \frac{-x}{x(3 + \sqrt{x + 9})} = \frac{-1}{3 + \sqrt{x + 9}} \\ \text{at } x = 0{:}\quad &-1/6 \end{aligned}

Exercise 3: Squeeze

Find lim⁡xsin⁡(1/x2)\lim x \sin(1/x^2) as x→0x \to 0, justifying every step.

Answer

00

Solution
∣sin⁡(1/x2)∣≤1  ⟹  −∣x∣≤xsin⁡(1/x2)≤∣x∣for x≠0lim⁡(−∣x∣)=lim⁡∣x∣=0 as x→0Squeeze Theorem: the limit is 0\begin{aligned} &\lvert \sin(1/x^2) \rvert \le 1 \implies -\lvert x \rvert \le x \sin(1/x^2) \le \lvert x \rvert \quad \text{for } x \ne 0 \\ &\lim (-\lvert x \rvert) = \lim \lvert x \rvert = 0 \text{ as } x \to 0 \\ &\text{Squeeze Theorem: the limit is } 0 \end{aligned}

Exercise 4: When the laws do not apply

Find functions ff, gg with no limits at 00 such that f+gf + g has a limit there, and check with SymPy.

Answer

For example f(x)=1/xf(x) = 1/x, g(x)=2−1/xg(x) = 2 - 1/x; f+g=2f + g = 2.

Solution

The sum law needs both limits to exist; its converse is false.

python · try it yourself
import sympy as sp
x = sp.symbols('x')
f, g = 1/x, 2 - 1/x
print(sp.limit(f, x, 0, dir='+'), sp.limit(f, x, 0, dir='-'))
print(sp.limit(f + g, x, 0))
oo -oo
2

Test yourself

Which condition does the quotient law need beyond the two limits existing?

  1. L≠0L \ne 0
  2. M≠0M \ne 0 (the denominator's limit)
  3. ff and gg are polynomials
  4. a≠0a \ne 0

In the proof of the sum law, why is δ\delta chosen as min⁡(δ1,δ2)\min(\delta_1, \delta_2)?

  1. To make δ\delta as large as possible
  2. So that both estimates ∣f−L∣<ε/2\lvert f - L \rvert < \varepsilon/2 and ∣g−M∣<ε/2\lvert g - M \rvert < \varepsilon/2 hold at once
  3. Because δ\delta must be an integer
  4. To avoid dividing by zero

Why can't the product law compute lim⁡x2cos⁡(5/x)\lim x^2 \cos(5/x) at 0?

  1. x2x^2 has no limit at 0
  2. cos⁡(5/x)\cos(5/x) has no limit at 0
  3. The product law only works at infinity
  4. It can; the answer is 1