The Precise Definition of a Limit
"As close as we like" and "sufficiently close" are not mathematics until we say how close. The - definition turns them into a precise challenge-and-response game, and it is the foundation on which every limit law and every derivative rule is proved.
The survey course sketches the idea at the end of Limits. Here we use it: writing proofs, finding numerically, proving that a limit does not exist, and proving the product law.
The definition
Let be defined on an open interval around , except possibly at . Then
means: for every there is a such that
Read it as a game. A skeptic picks an output tolerance (a horizontal band ). You must answer with an input radius (a vertical strip , minus the point ) such that the graph over the strip stays inside the band. The limit is if you can win for every , however small. may depend on (and usually does); it must not depend on .
The condition excludes , which is why is irrelevant to the limit.
A linear example
Claim: as .
Scratch work (find ): . We want , so suffices.
Proof. Given , let . If , then . ∎
For a linear function with slope , always works and is the largest possible choice.
A quadratic example
Claim: as .
Scratch work: . The factor is not constant, so first bound it. If we insist , then and . Then , which is when .
Proof. Given , let . If , then , so , and also . Hence . ∎
The trick, bounding a nuisance factor on a fixed neighbourhood first, handles most polynomial and rational limits.
A numeric -finder
The proof gives a that works. A computer can search for the largest that works (up to sampling), which is a good way to test your scratch work. The function below bisects on : a candidate passes if at many sample points in .
python · try it yourselfimport numpy as np
def works(f, a, L, eps, delta, n=20001):
xs = a + delta * np.linspace(-1, 1, n)[1:-1] # open interval
xs = xs[xs != a] # exclude x = a
return bool(np.all(np.abs(f(xs) - L) < eps))
def find_delta(f, a, L, eps, hi=1.0, iters=50):
lo = 0.0
if works(f, a, L, eps, hi):
return hi
for _ in range(iters): # bisection
mid = (lo + hi) / 2
lo, hi = (mid, hi) if works(f, a, L, eps, mid) else (lo, mid)
return lo
f = lambda x: x**2
for eps in [1.0, 0.1, 0.01, 0.001]:
d = find_delta(f, 3, 9, eps)
exact = min(np.sqrt(9 + eps) - 3, 3 - np.sqrt(9 - eps))
print(f"eps={eps:<6} numeric delta={d:.6f} exact={exact:.6f} proof's min(1, eps/7)={min(1, eps/7):.6f}")
eps=1.0 numeric delta=0.162294 exact=0.162278 proof's min(1, eps/7)=0.142857
eps=0.1 numeric delta=0.016622 exact=0.016621 proof's min(1, eps/7)=0.014286
eps=0.01 numeric delta=0.001666 exact=0.001666 proof's min(1, eps/7)=0.001429
eps=0.001 numeric delta=0.000167 exact=0.000167 proof's min(1, eps/7)=0.000143
At the numeric () slightly overshoots the exact one (): no sample point falls in the thin sliver where the band is exceeded, the sampling caveat from the note below in action. The proof's is always a little smaller than the best possible one, which is fine: the definition only asks for some . Both shrink in proportion to , with ratio near , a hint of the derivative to come. The "exact" column comes from solving ; the closer side, , limits .
Note: The numeric finder samples finitely many points, so it can be fooled by a function that misbehaves between samples. It tests a proof; it does not replace one.
Proving that a limit does not exist
Negate the definition: means there is some such that every admits an with but .
Take the step function for , for . Suppose at . Use . For any , the strip contains with and with . Both must lie within of , so , a contradiction. No works.
Proof of the product law
Assume and as . Write
Choose so that (hence ) on . Choose so that , and so that . With :
Other precise definitions
| Statement |
Meaning |
| as |
|
| as |
|
| as |
|
| as |
|
For example, at : given , take ; then gives , so .
In software
- Tolerances are 's. A test like
assert abs(result − expected) < 1e-9 is an -band. Choosing how precise the inputs (or the step size , or the number of iterations) must be to pass it is choosing a .
- Error propagation. "How accurately must I measure so that is accurate to ?" is the question. For smooth , , which is exactly the ratio seen in the table above; it is the basis of sensitivity analysis and condition numbers in numerical code.
- Quantifier order () is the same distinction programmers meet between "for every input there is a valid output" and "there is one output valid for every input". Swapping the order changes the meaning completely.
Exercises
Exercise 1: Linear
Prove as . What works for ?
Answer
; for , .
Solution
Exercise 2: Quadratic
Prove as using the trick.
Answer
works.
Solution
Exercise 3: Infinite limit
Prove as . Which works for ?
Answer
; for , .
Solution
Exercise 4: Test your numerically
Use the -finder idea to compare the best for as with against the guess . (Hint: .)
Answer
The best is (set by the left side, ); the proof's is smaller, so it works.
Solution
The exact best comes from solving : or , distances and , so the best is .
python · try it yourselfimport numpy as np
def works(f, a, L, eps, delta, n=20001):
xs = a + delta * np.linspace(-1, 1, n)[1:-1]
return bool(np.all(np.abs(f(xs[xs != a]) - L) < eps))
lo, hi = 0.0, 1.0
for _ in range(50):
mid = (lo + hi) / 2
lo, hi = (mid, hi) if works(np.sqrt, 4, 2, 0.1, mid) else (lo, mid)
print(f"best delta ≈ {lo:.4f}, proof delta = {2 * 0.1:.4f}")
best delta ≈ 0.3900, proof delta = 0.2000
Test yourself
In the - definition, which quantity may depend on which?
- may depend on
- may depend on (and on ), but not on
- may depend on
- Neither may depend on anything
For as , which works for every ?
To show , what must you exhibit?
- One such that every admits an within of with
- One that fails for every
- A single with
- That