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 , 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 is a constant and both and exist as . Then:
| Law | Statement (all limits as ) |
|---|---|
| Sum | |
| Difference | |
| Constant multiple | |
| Product | |
| Quotient | , provided |
| Power | for positive integers |
| Root | (for even , assume ) |
| Basic limits | , |
The hypothesis "both limits exist" matters. at , but the sum law cannot be used because does not exist.
Proof of the sum law
We use the precise definition from The Precise Definition of a Limit. Let . Since , there is with whenever . Since , there is with whenever . Let . For , the triangle inequality gives
which is exactly the statement . The "split in half" move is the template for most limit proofs.
Direct substitution
Repeated use of the sum, product and constant laws with gives:
Direct substitution property. If is a polynomial, or a rational function with in its domain, then as .
Functions with this property are called continuous at (Continuity). When substitution gives , the form is indeterminate: the limit may be any number or may not exist, and the expression must be rewritten first.
Four tricks for
| Trick | When | Example |
|---|---|---|
| Factor and cancel | polynomial ratio | |
| Rationalize | square roots | |
| Common denominator | nested fractions | |
| Split a piecewise / absolute value | , cases | → one-sided limits |
Cancelling is legitimate because the limit only uses : if for all near , then and have the same limit at .
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.
- If near (except possibly at ) and both limits exist, then .
- Squeeze Theorem. If near (except possibly at ) and , then .
Proof of 2. Let . Choose so small that, for , both and hold, and the inequality holds. Then , so . ∎
Example. as . The law for products does not apply, because has no limit at . But , so
Both outer functions tend to , so the middle one does too.
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
limituses 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: avoids cancellation for large .
Exercises
Exercise 1: Factor and cancel
Find as .
Answer
Solution
Exercise 2: Rationalize
Find as .
Answer
Solution
Exercise 3: Squeeze
Find as , justifying every step.
Answer
Solution
Exercise 4: When the laws do not apply
Find functions , with no limits at such that has a limit there, and check with SymPy.
Answer
For example , ; .
Solution
The sum law needs both limits to exist; its converse is false.
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?
- (the denominator's limit)
- and are polynomials
In the proof of the sum law, why is chosen as ?
- To make as large as possible
- So that both estimates and hold at once
- Because must be an integer
- To avoid dividing by zero
Why can't the product law compute at 0?
- has no limit at 0
- has no limit at 0
- The product law only works at infinity
- It can; the answer is 1