The Precise Definition of a Limit
The statement $\lim_{x\to a}f(x)=L$ is a two-player game: a Challenger names a tolerance ε, and the Defender must answer with a window δ that forces every nearby input into the tolerance band. Learn the game and the whole definition becomes obvious.
🎯 ε–δ Game Lab
be the Challenger!For $f(x)=2x-1$ at $a=3$ (so $L=5$), tighten the tolerance ε and watch the Defender answer δ = ε/2. The gold box is where the implication lives.
Why This Definition Exists
In first courses you usually meet the informal definition first: "$f(x)$ gets arbitrarily close to $L$ as $x$ gets close to $a$." A good picture, but a poor definition — what does "close" mean, and how close is close enough? If two students disagree about whether a limit exists, what concrete statement settles it?
Historically the inventors of calculus used infinitesimals — quantities "infinitely small but not zero" — which Bishop Berkeley mocked in 1734 as "ghosts of departed quantities." The repair came in stages: Bolzano and Cauchy recast limits in terms of quantities that become smaller than any prescribed bound, and in the 1860s Weierstrass replaced the vague word "arbitrarily" with an explicit quantifier structure: for every tolerance there exists a distance.
Intuition First: The ε–δ Game
The Challenger picks a tolerance ε > 0
"I demand that $f(x)$ be within ε of $L$. Make it work."
The Defender answers with a distance δ > 0
"If $x$ is within δ of $a$ (and $x\ne a$), then $f(x)$ will be within ε of $L$."
The Challenger picks any x with 0 < |x−a| < δ
…and checks whether $|f(x)-L|<\varepsilon$.
The statement $\lim_{x\to a}f(x)=L$ is true exactly when the Defender has a winning strategy: a rule that produces a valid δ for every tolerance ε the Challenger can name.
- The Defender sees ε before choosing δ, so δ may depend on ε (and on $a$ and the function) — hence $\delta(\varepsilon)$. But δ must never depend on $x$: the Challenger picks $x$ last.
- The Challenger's answer must work for every $x$ in the window, not just the points the Defender happened to test. Winning against a sample is not winning the game.
A programmer's translation
The quantifier structure for-all ε, there-exists δ, for-all x is exactly the structure of nested loops:
def limit_claim_holds(f, a, L, eps): delta = defender_chooses_delta(eps) # chosen after seeing eps for x in every_real_except(a): # adversarial; chosen last if 0 < abs(x - a) < delta: if not abs(f(x) - L) < eps: return False # Challenger wins this round return True # Defender survives the eps # "lim f(x) = L" iff this returns True for EVERY eps > 0.
The claim is a property that must survive an adversarial search over all inputs, for every tolerance — like property-based testing or a worst-case bound, except the adversarial search is over all reals in the window.
The Formal Definition
The precise (ε–δ) definition of a limit
Let $f$ be defined for all $x$ in some open interval containing $a$, except possibly at $a$ itself. Then
Read aloud: "For every ε>0, there exists a δ>0 such that, for all $x$, if $0<|x-a|<\delta$ then $|f(x)-L|<\varepsilon$."
| Clause | Whose move | What it does |
|---|---|---|
| $\forall\,\varepsilon>0$ | Challenger | an arbitrary tolerance; a horizontal band $(L-\varepsilon,L+\varepsilon)$ of height $2\varepsilon$. A single failing ε kills the claim. |
| $\exists\,\delta>0$ | Defender | produced after seeing ε; may depend on ε and $a$, but never on $x$. |
| $\forall x$ | Adversarial check | over every $x$ in the domain — a universal guarantee, not a sample. |
| $0<|x-a|<\delta$ | The window | the punctured window: within δ of $a$, with $a$ itself excluded. Symmetric → two-sided. |
| $|f(x)-L|<\varepsilon$ | The outcome | $(x,f(x))$ lies inside the band, i.e. $L-\varepsilon<f(x)<L+\varepsilon$. |
The three most common quantifier mistakes
(a) Choosing δ after being shown $x$ — δ must not depend on $x$.
(b) Requiring one δ to work for all ε at once ("$\exists\delta\,\forall\varepsilon$") — a far stronger, usually false statement.
(c) Reading $|f(x)-L|<\varepsilon$ as "$f(x)=L$ eventually" — no; $f(x)$ may keep varying as long as it stays inside the band.
Fine Print, Siblings, Theorems & the Negation
The sibling definitions
| Statement | Definition |
|---|---|
| $\lim_{x\to a} f=L$ | $\forall\varepsilon>0\ \exists\delta>0:\ 0<|x-a|<\delta \Rightarrow |f(x)-L|<\varepsilon$ |
| $\lim_{x\to a^-} f=L$ | $\forall\varepsilon>0\ \exists\delta>0:\ a-\delta<x<a \Rightarrow |f(x)-L|<\varepsilon$ |
| $\lim_{x\to a^+} f=L$ | $\forall\varepsilon>0\ \exists\delta>0:\ a<x<a+\delta \Rightarrow |f(x)-L|<\varepsilon$ |
| $\lim_{x\to\infty} f=L$ | $\forall\varepsilon>0\ \exists N:\ x>N \Rightarrow |f(x)-L|<\varepsilon$ |
| $\lim_{x\to a} f=+\infty$ | $\forall M>0\ \exists\delta>0:\ 0<|x-a|<\delta \Rightarrow f(x)>M$ |
In the ε–N rows, $N$ plays the role of δ (a far threshold). In the M–δ rows, the Challenger attacks with a huge height $M$ instead of a small tolerance. Two-sided $\iff$ both one-sided limits exist and agree.
Three structural theorems
Uniqueness of limits
If $\lim_{x\to a}f=L_1$ and $\lim_{x\to a}f=L_2$, then $L_1=L_2$.
Sum rule
If $\lim f=L$ and $\lim g=M$, then $\lim(f+g)=L+M$.
Squeeze theorem
If $g(x)\le f(x)\le h(x)$ near $a$ and $\lim g=\lim h=L$, then $\lim f=L$.
The negation: proving a limit fails
Failure of the limit claim
The Challenger needs just one immovable ε such that, no matter what window δ the Defender proposes, some point inside it violates the tolerance. This is how we prove $\sin(1/x)$ has no limit at 0. Sequential shortcut: exhibit two sequences $x_n\to a$ along which $f$ tends to two different values.
A Visual Dictionary
| Picture | Setup | What it shows |
|---|---|---|
| Shrinking boxes | $f(x)=2x-1$ at $a=3$, $L=5$ | For a line, δ=ε/2 is exact. Tighten ε by a factor of 2, δ shrinks by the same factor; the boxes nest down to the single point $(a,L)$. |
| The jump (failure) | step function at $a=1$, candidate $L=\tfrac12$ | Any window contains points with $f=0$ and points with $f=1$; neither is within ε=$\tfrac14$ of $\tfrac12$. No δ wins. One-sided limits disagree (0 vs 1). |
| ε–N (far away) | $f(x)=1/x$ as $x\to\infty$, $L=0$ | Choose $N=1/\varepsilon$: for all $x>N$ the graph stays inside the band forever. |
| M–δ (blow-up) | $f(x)=1/x^2$ at $a=0$, threshold $M$ | Choose $\delta=1/\sqrt M$: inside the punctured window the graph lies entirely above $y=M$. |
Canonical Examples
6.1 · Linear: $\lim_{x\to3}(2x+1)=7$
6.2 · Quadratic: $\lim_{x\to2}x^2=4$
6.3 · Removable singularity: $\lim_{x\to4}\frac{x^2-16}{x-4}=8$
6.4 · Reciprocal: $\lim_{x\to1}\frac1x=1$
6.5 · Square root: $\lim_{x\to4}\sqrt x=2$
6.6 · Oscillating: $\lim_{x\to0}x\sin(1/x)=0$
6.7 · δ not proportional to ε: $\lim_{x\to-1}(x^2+2x)=-1$
6.8 · Limit at infinity: $\lim_{x\to\infty}\frac{3x}{x+2}=3$ (ε–N)
6.9 · Infinite limit: $\lim_{x\to0}\frac1{x^2}=+\infty$ (M–δ)
6.10 · Value at the point is irrelevant
Let $h(x)=0$ for $x\ne0$ and $h(0)=5$. Prove $\lim_{x\to0}h(x)=0$.
6.11 · Proving non-existence: the sign function
$f(x)=-1$ for $x<0$, $f(x)=1$ for $x>0$, $f(0)=0$. Show $\lim_{x\to0}f$ does not exist.
6.12 · Proving non-existence: $\sin(1/x)$ at 0
Worked Example: The Full Game on f(x)=x²
The Challenger demands ε = ½ for $\lim_{x\to2}x^2=4$
- Strategy: isolate the controlled factor from $|x^2-4|=|x-2||x+2|$, then bound $|x+2|$ on a preliminary window.
- Scratch: if $|x-2|<1$ then $1<x<3$, so $|x+2|<5$, giving $|x^2-4|<5|x-2|$. To make this $<\tfrac12$ we need $|x-2|<\tfrac1{10}$.
- Choice: $\delta=\min(1,\varepsilon/5)$, which for $\varepsilon=\tfrac12$ gives $\delta=0.1$.
- Verification (arbitrary ε): if $0<|x-2|<\delta$, then $|x+2|<5$ and $|x-2|<\varepsilon/5$, so $|x^2-4|<\frac\varepsilon5\cdot5=\varepsilon$. ∎
How good was our δ? The exact exits solve $x^2=4\pm\tfrac12$: the optimal radius is $\delta_{opt}\approx0.1213$. Our $\delta=0.1$ is valid but not optimal — perfectly acceptable. The definition demands existence, not perfection.
| Challenger's ε | Defender's δ = min(1, ε/5) | window (2−δ, 2+δ) | guaranteed error |
|---|---|---|---|
| 0.5 | 0.1 | (1.9, 2.1) | < 0.5 |
| 0.05 | 0.01 | (1.99, 2.01) | < 0.05 |
| 0.001 | 0.0002 | (1.9998, 2.0002) | < 0.001 |
Common Misconceptions — nine traps, nine repairs
The Problem-Solving Algorithm
Guess L
Plug in / algebra. For continuous pieces $L=f(a)$; otherwise factor and cancel first.
Factor out |x−a|
Write $|f(x)-L|=|x-a|\cdot|B(x)|$. Factoring and completing the square are the workhorses.
Bound |B(x)| ≤ K on a window
Pick a radius $r$ (often $r=1$, or the distance to the nearest danger point) and bound the leftover factor by a constant.
Choose δ = min(r, ε/K)
The minimum combines staying on the good window and making the product small.
Verify for arbitrary ε
Assume $0<|x-a|<\delta$, derive the two consequences, multiply the bounds, conclude $|f(x)-L|<\varepsilon$. Then sanity-check: δ>0 for every ε>0, δ→0 as ε→0.
Computational Exploration
Four short programs turn the definition into something you can watch and stress-test. The proof certifies what the numbers merely suggest.
10.1 · Watching the box for f(x)=x²
import numpy as np f = lambda x: x**2 a, L, eps, delta = 2.0, 4.0, 0.5, 0.1 # the (eps,delta) pair proved by hand xs = np.linspace(a-delta, a+delta, 200_001) xs = xs[np.abs(xs-a) > 1e-12] # puncture: drop x = a err = np.abs(f(xs) - L) print("worst error:", err.max()) print("defender wins:", err.max() < eps)
defender wins: True
The worst point sits at a window edge — you can't find it by sampling random points, which is exactly why sampling isn't a proof.
10.2 · Finding the largest δ numerically
from scipy.optimize import brentq def largest_delta(f, a, L, eps, reach=1.0): x_left = brentq(lambda x: f(x)-(L-eps), a-reach, a) x_right = brentq(lambda x: f(x)-(L+eps), a, a+reach) return min(a-x_left, x_right-a) for eps in (1.0, 0.5, 0.1, 0.01, 1e-4): print(eps, largest_delta(lambda x: x**2, 2.0, 4.0, eps))
As ε shrinks, the optimal radius converges to $\varepsilon/|f'(2)|=\varepsilon/4$ — the window size dictated by the local slope. The gap between the crude bound ε/5 and the optimal ε/4 is typical proof engineering.
10.3 · Fuzzing the Defender's strategy
rng = np.random.default_rng(0); m, b, a = 2.0, 1.0, 3.0 # f=2x+1, L=7 L = m*a + b for r in range(1, 6): eps = 10.0 ** rng.uniform(-6, 0) # challenger: random tolerance delta = eps / abs(m) # defender: strategy delta=eps/2 x = a + delta * rng.uniform(-1, 1) err = abs((m*x + b) - L) print(r, eps, delta, err, "wins:", err < eps)
Every round prints wins: True. No finite number of rounds proves the universal statement — the hand proof does that — but the fuzzer finds an embarrassing counterexample fast if the strategy is wrong.
10.4 · Symbolic verification with SymPy
import sympy as sp x = sp.symbols("x", real=True) expr = (x**2 - 16)/(x - 4) # undefined at x=4 print(sp.simplify(expr)) # x + 4 (for x != 4) print(sp.limit(expr, x, 4)) # 8 print(sp.limit(sp.sin(x)/x, x, 0)) # 1
Connections — where ε–δ lives
∂ Derivatives
$f'(a)=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}$; every derivative rule is proved from ε–δ. The tightest tolerances are governed by the slope $f'(a)$.∞ Continuity
Continuity is the same game with the puncture removed and $L=f(a)$. If one δ works for all points at once, that's uniform continuity — a strictly stronger statement.🔬 Measurement theory
"To what precision must I measure time to get velocity within 0.01 m/s?" is the ε–δ game in lab clothes: ε = output error, δ = input precision.Σ Sequences & series
The same tolerance logic with ε–N defines $x_n\to L$ and the convergence of series; the squeeze and sum-rule proofs transfer almost verbatim.∫ Integrals
The Riemann integral is a limit of Riemann sums; numerical quadrature is literally an ε–δ contract — achieve error < ε by refining the mesh below δ.💻 Numerical analysis
Convergence of iterative algorithms ("for tolerance ε there exists N iterations") is an ε–N statement. Machine epsilon is the hard floor below which no numerical ε resolves.🧭 Topology
Replace "$|x-a|<\delta$" by "$x$ is in a neighborhood $U$ of $a$": the definition becomes "for every $V$ there exists $U$ with $f(U\setminus\{a\})\subseteq V$" — the seed of point-set topology.Practice Set — cover the answers, produce δ(ε) first
Level 1 — Conceptual
C1 Why does the definition exclude $x=a$ via $0<|x-a|$? What would change if the implication were also required at $x=a$?concept
C2 If δ=0.3 works for ε=0.1, does δ=0.2 work? Must δ=0.5 work?concept
C3 Explain the difference between "$\forall\varepsilon>0\ \exists\delta>0$" and the swapped "$\exists\delta>0\ \forall\varepsilon>0$".quantifiers
C4 True or false: if $\lim_{x\to a}f(x)=L$ then $f(a)=L$.true/false
C5 If $\lim_{x\to a}f(x)=L$, must $f$ be bounded near $a$?concept
Level 2 — Standard calculations
S1 Prove $\lim_{x\to3}(4x-5)=7$.linear
S2 Prove $\lim_{x\to1}(x^2+x)=2$.quadratic
S3 Prove $\lim_{x\to2}\frac1x=\frac12$.reciprocal
S4 Prove $\lim_{x\to6}\sqrt{x-2}=2$.radical
S5 Prove with ε–N that $\lim_{x\to\infty}\frac{2x}{x-1}=2$.ε–N
S6 Prove $\lim_{x\to3}x^3=27$.cubic
Level 3 — Challenging
H1 Prove $\lim_{x\to0}x^2\sin(1/x)=0$ and note why δ shrinks like √ε.nonlinear δ
H2 Prove $\lim_{x\to1}\frac{x-1}{\sqrt x-1}=2$.algebra first
H3 If $\lim_{x\to a}f=L$ with $L>0$, prove $f(x)>L/2$ near $a$.sign preservation
H4 If $\lim_{x\to a}f=L$, prove $\lim_{x\to a}|f|=|L|$.absolute value
H5 Prove rigorously that $\lim_{x\to0}\frac{|x|}{x}$ does not exist.non-existence
H6 Prove: if $\lim_{x\to a}f=L$ and $x_n\to a$ with $x_n\ne a$, then $f(x_n)\to L$.sequential
Study Plan & Exam Checklist
⏱ The 15-minute pass
Write the definition from memory, quantifiers in order. Say the challenge–response game out loud for $\lim_{x\to3}(2x+1)=7$: name ε, answer ε/2, verify. Redraw the band/window/box from memory.
⏱ The one-hour session
Derive the $x^2\to4$ proof on paper without looking, including scratch work. Solve S2 and S3. Run Listings 1 and 2 and vary ε. Reproduce the step-function non-existence proof from the negation.
🗓 The one-week consolidation
One proof per day: linear, quadratic, rational, radical, infinity-type. Write the four sibling definitions from memory. Implement the fuzzer for a nonlinear function using your own hand proof — break it, then fix the proof.
Exam Checklist — tick each before moving on
Summary Card & Further Resources
The ε–δ definition in one card
- Statement: $\lim_{x\to a}f(x)=L \iff \forall\varepsilon>0\ \exists\delta>0:\ 0<|x-a|<\delta\Rightarrow|f(x)-L|<\varepsilon$.
- Meaning: any demanded output tolerance ε can be met by some input window δ; the game must be winnable for every tolerance.
- Quantifier order: $\forall\varepsilon\ \exists\delta\ \forall x$ — order is meaning. δ must not depend on $x$; swapping $\forall\varepsilon$ and $\exists\delta$ gives a much stronger, usually false claim.
- Punctured window: $0<|x-a|$ — $f$ need not be defined at $a$, and $f(a)$ is irrelevant.
- Workflow: guess L; factor out $|x-a|$; bound the leftover factor; pick δ=min(r, ε/K); verify.
- Siblings: one-sided limits; ε–N for $x\to\pm\infty$; M–δ for infinite limits ($\delta=1/\sqrt M$ for $1/x^2$).
- Failure test: negation — one ε defeats every window (jumps; $\sin(1/x)$ at 0).
- Main idea: the definition converts "f(x) gets close to L" into an adversarial tolerance-versus-window game — the foundation of continuity, derivatives, integrals, and every numerical convergence claim.
Further resources
Built from "The Precise Definition of a Limit: An ε–δ Deep Dive" (Calculus Deep Dives) · Game-first study guide