A function is continuous when small changes in the input give small changes in the output, made exact with ε and δ. Completeness then proves two school facts you were told to trust, the intermediate value theorem and the extreme value theorem, and shows when one δ can serve everywhere.
Beyond the courseAbbott, Understanding Analysis, ch. 4Spivak, Calculus, ch. 5 to 8Apostol Vol. 1, ch. 3
“Continuous” in school meant a curve drawn without lifting the pen. That picture is fine for x2 but useless for proving anything, and it gives wrong answers for strange functions. This chapter makes continuity exact, with the same two-player game as 1.2: a sceptic names an output tolerance ε (how close the output must be), and you answer with an input tolerance δ (how close the input must be). With that definition and the completeness of 1.1, the big theorems of school calculus stop being facts to trust and become theorems you can prove.
In JEE you found limx→af(x) by substituting, factoring or applying L’Hospital. Those are computing rules. Here we ask what the statement limx→af(x)=L actually promises, so that we can prove the rules.
Before you start
Chapter 1.2: the ε-N game, the triangle inequality, subsequences and Bolzano–Weierstrass. Chapter 1.1: the supremum.
Quick checkIn 1.2, after finding that ∣an−L∣<n5, how did we choose N for a given ε?
We need n5<ε, so n>ε5. Any N≥ε5 then works for all n>N. The same move gives δ in this chapter.Review: epsilon-N proofs
Quick checkWhich is the triangle inequality?
The direct distance is never longer than a detour. Equality fails when x and y have opposite signs, for example ∣1+(−1)∣=0<2.Review: the triangle inequality
The picture: the same game, for functions
For f(x)→L as x→a: the sceptic draws a horizontal band of half-height ε around L. You answer with a vertical window of half-width δ around a (leaving out x=a itself). You win if the graph over the whole window stays inside the band. Three things to do:
Easy win. With f(x)=x2 at a=2, press “Show a δ that works” for several ε and watch δ shrink as ε shrinks. Smaller bands need narrower windows.
Hole. Switch to x−1x2−1 at a=1. The function is not even defined at 1, yet you still win every round. That is why the window leaves out x=a.
Loss. Switch to the jump. For ε=0.5 no window is narrow enough, because points just left of 0 have f=0, a distance 1 from L=1.
Where this came from· Why mathematicians stopped trusting pictures
In the early 1800s many mathematicians took for granted that a continuous curve has a tangent at most points. Bernard Bolzano wanted a proof of the intermediate value theorem that did not borrow from geometry. In 1817 he published one, together with a definition of continuity that uses only inequalities. Cauchy’s Cours d’analyse (1821) gave a similar definition, still phrased with “infinitely small” increments. Karl Weierstrass lectured in Berlin from the 1860s and turned this language into the ε-δ form used today. On 18 July 1872 he presented a function that is continuous at every point and differentiable at none, a curve with no tangent anywhere. (Bolzano had found a similar example around 1830, but it was not published until 1922.) After 1872, pictures were no longer accepted as evidence, and proofs had to rest on definitions.
Definitions
Definition B
Limit of a function
Let f be defined near a (perhaps not at a). Then limx→af(x)=L means
∀ε>0∃δ>0∀x:0<∣x−a∣<δ⟹∣f(x)−L∣<ε.
The condition 0<∣x−a∣ excludes x=a: the limit ignores the value at a, even if there is one.
In one linelimx→af(x)=L if for every ε>0 there is δ>0 with ∣f(x)−L∣<ε whenever 0<∣x−a∣<δ.
Why it existsIt says 'f(x) is as close to L as you like once x is close enough to a', without ever setting x = a.
Definition B
Continuous function
f is continuous at a if a is in its domain and
∀ε>0∃δ>0∀x in the domain:∣x−a∣<δ⟹∣f(x)−f(a)∣<ε.
f is continuous (on a set) if it is continuous at every point of that set.
In one linef is continuous at a if limx→af(x)=f(a): small changes of input near a give small changes of output.
Why it existsIt is the hypothesis of almost every theorem in calculus: intermediate value, extreme value, integrability, the fundamental theorem.
Compare the two definitions. They are the same sentence, except that continuity uses the value L=f(a) and allows x=a (where the inequality holds automatically, since ∣f(a)−f(a)∣=0). So f is continuous at a exactly when limx→af(x)=f(a).
Why· How to read the definition aloud, one quantifier at a time
The symbols ∀ (“for every”) and ∃ (“there is”) are the quantifiers of 0.1. Their ORDER is the order of the game, and it tells you who moves when.
“For every ε>0.” The sceptic picks the output tolerance. You get no say, so your proof must begin “Let ε>0 be arbitrary.”
“There is a δ>0.” You answer with an input tolerance. You may use ε (and a) to build it. This is where all the work is.
“For every x.” The sceptic now picks any x in your window. You get no say again, and δ is already fixed.
“If ∣x−a∣<δ then ∣f(x)−f(a)∣<ε.” You must show that this x gives an output within ε.
Two consequences. Because δ is chosen after ε, it usually depends on ε: a thinner band needs a narrower window. Because δ is chosen before x, it can never mention x.
How to find δ: scratch work, then write-up
A proof that f is continuous at a must produce a δ for every ε. Nobody hands you δ, so you find it by working backwards from what you want. Ask: “how close must x be to a so that ∣f(x)−f(a)∣ is below ε?” That backwards search is the scratch work of 0.7. Once you have a δ, you write the argument forwards, starting from “Let ε>0 and set δ=…”. That is the write-up. The reader only sees the write-up, so it never shows the search. It only shows that the δ works. This is the same move as choosing N in 1.2.
Why· The recipe for finding δ
Write the goal∣f(x)−f(a)∣<ε, and rearrange the left side until the factor ∣x−a∣ appears. (Factor, take a common denominator, or multiply by a conjugate.)
If the other factor is a constant K, then ∣f(x)−f(a)∣=K∣x−a∣, and δ=Kε works. Linear functions end here.
If the other factor still contains x, bound it. Decide in advance that δ≤1 (any fixed positive number would do; 1 keeps the arithmetic easy). Then ∣x−a∣<1 traps x in an interval, and on that interval you can bound the leftover factor by a constant K.
Now∣f(x)−f(a)∣<K∣x−a∣, which is at most ε when ∣x−a∣≤Kε. That is a second demand on δ.
Meet both demands with δ=min(1,Kε): the smaller of two numbers is at most each of them.
Write-up, forwards: “Let ε>0 and set δ=min(1,Kε). Let ∣x−a∣<δ. Then (bound the leftover factor, using δ≤1). Then (finish, using δ≤Kε). So ∣f(x)−f(a)∣<ε.”
The step-through below does this for x2 at a=2.
Quick checkIn the proof for x2 at a=2 we first insisted δ≤1. Why?
The factor ∣x+2∣ depends on x, so we cannot compare it with ε until it is bounded by a constant. Restricting to ∣x−2∣<1 does that. The number 1 is a convenience: δ≤2 would give a bound of 6 and a different, equally valid δ. And δ is not always at most 1; for the line 3x−1 below, δ=3ε can be huge.
Worked example
Prove f(x)=3x−1 is continuous at every point a.
Solution.
Scratch.∣f(x)−f(a)∣=∣3x−3a∣=3∣x−a∣. This is <ε when ∣x−a∣<3ε. For a linear function the input distance factors out with a constant, so no restriction is needed.
Write-up. Let a∈R and ε>0. Set δ=3ε. If ∣x−a∣<δ, then ∣f(x)−f(a)∣=3∣x−a∣<3δ=ε. Arbitrary point, arbitrary ε, a δ built from them, then the check.
Answer.f is continuous everywhere. ■ Here δ depends on ε but not on a, which matters later (uniform continuity).
Your answerFor f(x)=5x−2 at any point a and ε=0.01, the rule δ=Kε with the constant factor K from the scratch work gives what δ?
Factor out ∣x−a∣ first. What constant is left?
∣f(x)−f(a)∣=5∣x−a∣, so K=5 and δ=50.01=0.002=5001.
Worked example
Prove f(x)=x1 is continuous at a=2.
Solution.
Scratch: make ∣x−2∣ appear.x1−21=2∣x∣∣2−x∣=2∣x∣1∣x−2∣. Common denominator. The leftover factor 2∣x∣1 still depends on x, so it must be bounded.
Scratch: bound the leftover factor. Insist δ≤1. Then ∣x−2∣<1 gives 1<x<3, so ∣x∣>1 and 2∣x∣1<21. A fraction is large when its denominator is small, so here we need a LOWER bound on ∣x∣. For x2 we needed an upper bound. The same step keeps x away from 0, where x1 is not defined.
Scratch: second demand. Now ∣f(x)−f(2)∣<21∣x−2∣, which is at most ε when ∣x−2∣≤2ε. So δ≤1 and δ≤2ε. Same two-demand structure as for x2.
Write-up. Let ε>0 and set δ=min(1,2ε). If ∣x−2∣<δ, then x>1, so ∣f(x)−f(2)∣=2∣x∣1∣x−2∣≤21∣x−2∣<21δ≤ε. Forwards: δ≤1 gives the bound on 2∣x∣1, and δ≤2ε gives the last inequality.
Answer.x1 is continuous at 2. ■ Without the 1 in the minimum, a large ε would give a window reaching 0, where the function does not exist.
Worked example
Prove f(x)=x is continuous at a=4.
Solution.
Scratch: multiply by the conjugate.x−2=x+2(x−2)(x+2)=x+2x−4. This is the JEE trick for rationalising. It makes ∣x−4∣ appear, and ∣x−4∣ is the input distance.
Scratch: bound the leftover factor. For x≥0 (the domain), x+2≥2, so ∣x−2∣≤2∣x−4∣. A larger denominator makes the fraction smaller. The bound holds on the whole domain, so no restriction on δ is needed.
Scratch: solve.2∣x−4∣<ε when ∣x−4∣<2ε. One demand only, so δ=2ε.
Write-up. Let ε>0, set δ=2ε. If x≥0 and ∣x−4∣<δ, then ∣x−2∣=x+2∣x−4∣≤2∣x−4∣<ε. Each inequality was justified in the scratch work.
Answer.x is continuous at 4. ■
Your answerFor x at a=4 and ε=0.1, what δ does the example's rule δ=2ε give?
The example's last line says δ=2ε.
δ=2×0.1=0.2. Check: if ∣x−4∣<0.2 then ∣x−2∣≤20.2=0.1.
Worked example
Prove x→2limx−2x2−4=4.
Solution.
Scratch: simplify for x=2.x−2x2−4=x−2(x−2)(x+2)=x+2. The definition of a limit only tests x with 0<∣x−2∣, so x=2 and cancelling is allowed. This is the exact reason you may cancel in JEE limits.
Scratch: the distance to L=4.∣f(x)−4∣=∣x+2−4∣=∣x−2∣. The factor is just 1, so δ=ε.
Write-up. Let ε>0, set δ=ε. If 0<∣x−2∣<δ, then f(x)=x+2 and ∣f(x)−4∣=∣x−2∣<ε. The condition 0<∣x−2∣ is what allowed the cancellation in the write-up.
Answer. The limit is 4. ■ The function is not even defined at 2, so it is not continuous there, but it can be repaired by defining f(2)=4. This is the “hole” in the visualizer.
Quick checkLet f(x)=x−2x2−4 for x=2 and f(2)=7. What is true at a=2?
The limit ignores the value at 2 and equals 4. Continuity needs the limit to equal f(2)=7, and 4=7. Changing the single value f(2) never changes the limit.
Worked example
Show that the jump function H(x)=0 for x<0, H(x)=1 for x≥0 is not continuous at 0.
Solution. The plan: to show a function is NOT continuous, you play the sceptic and win the game. You name one ε, and then show that every δ the other side offers fails.
Write the negation. Not continuous at 0 means ∃ε>0∀δ>0∃x:∣x∣<δ and ∣H(x)−H(0)∣≥ε. The negation rules of 0.1: each ∀ becomes ∃ and each ∃ becomes ∀, and “if P then Q” becomes “P and not Q”.
Choose ε. Take ε=21. The jump has height 1, so any band of half-height below 1 is too thin to cover both sides.
Defeat every δ. Given δ>0, take x=−2δ. Then ∣x∣<δ and ∣H(x)−H(0)∣=∣0−1∣=1≥21. A point inside every window, on the wrong side of the jump.
Answer.H is not continuous at 0. ■
Continuity through sequences
The next theorem connects this chapter to 1.2. Idea: a sequence xn→a is a supply of inputs that get as close to a as you like, one after another. If f is continuous, their outputs must pile up at f(a). Conversely, one sequence whose outputs do not pile up at f(a) proves f is not continuous. This is often the easiest way to prove a function is NOT continuous, and it lets the limit laws for sequences give limit laws for functions for free.
Theorem BAbbott Thm 4.3.2
Sequential criterion for continuity
f is continuous at a if and only if for every sequence (xn) in the domain with xn→a, we have f(xn)→f(a).
In one linef is continuous at a if and only if xn→a always implies f(xn)→f(a).
Why it is trueContinuity says nearby inputs give nearby outputs; a sequence approaching a is a supply of nearby inputs.
ProofAbbott 4.3.2
The idea: (⇒) Given ε, continuity gives δ, and convergence of x_n puts x_n within δ eventually. (⇐) Contrapositive: if f is not continuous, the negation gives a bad point x_n within 1/n of a for each n, and f(x_n) stays far from f(a).
(⇒) Suppose f is continuous at a and xn→a. Let ε>0.
Forward direction.
There is δ>0 with ∣f(x)−f(a)∣<ε whenever ∣x−a∣<δ.
Continuity at a with this ε.
There is N with ∣xn−a∣<δ for n>N.
Convergence of (xn) with tolerance δ (in the role of 1.2's ε).
So for n>N, ∣f(xn)−f(a)∣<ε, that is, f(xn)→f(a).
Combine the two.
(⇐) Suppose f is not continuous at a. Then there is ε>0 such that every δ>0 has some x with ∣x−a∣<δ and ∣f(x)−f(a)∣≥ε.
Backward direction, by contrapositive: assume f is NOT continuous at a and build a bad sequence.
For each n choose xn with ∣xn−a∣<n1 and ∣f(xn)−f(a)∣≥ε.
Use δ=n1 for each n to pick a point.
Then xn→a but f(xn)→f(a). This proves the contrapositive. ■
n1→0 squeezes xn to a, but the outputs stay at least ε away.
The same proof, with 0<∣x−a∣ and L in place of ∣x−a∣ and f(a), shows that limx→af(x)=L if and only if f(xn)→L for every sequence xn→a with xn=a. Chapter 1.4 uses this version for derivatives.
Worked example
Show g(x)=sin(1/x) for x=0, g(0)=0, is not continuous at 0.
Solution.
Choose a sequence approaching 0 along which g is 1.sin(1/x)=1 when 1/x=2π+2πn, so take xn=π/2+2πn1 for n=1,2,3,…. To break continuity with the sequential criterion, find xn→a whose outputs do not approach g(a). Near 0, x1 is huge and sweeps through 2π+2πn again and again, so sin(1/x) hits 1 infinitely often close to 0.
Check.xn→0, but g(xn)=1 for all n, and g(0)=0. g(xn)→1=0.
Answer. By the sequential criterion, g is not continuous at 0. ■ (No choice of g(0) would fix it: along xn′=3π/2+2πn1, g=−1, so g has no limit at 0 at all.)
Worked example
Prove: if f and g are continuous at a, then f+g is continuous at a.
Solution. We do it twice, to compare the two methods.
Method 1, set up the game. Let ε>0. Continuity of f and of g at a, each used with the tolerance 2ε, gives δ1,δ2>0 with ∣f(x)−f(a)∣<2ε for ∣x−a∣<δ1 and ∣g(x)−g(a)∣<2ε for ∣x−a∣<δ2. We want two errors that add up to ε, so we give each half. This ”2ε trick” is the same as in 1.2’s proof of the sum law.
Method 1, one δ for both. Set δ=min(δ1,δ2). If ∣x−a∣<δ, both estimates hold. Same two-demand idea as in the recipe: a δ at most each of them satisfies both.
Method 2, sequences. Let xn→a. By the sequential criterion, f(xn)→f(a) and g(xn)→g(a). By the sum law of 1.2, f(xn)+g(xn)→f(a)+g(a). The criterion converts function questions into sequence questions, where the limit laws are already proved.
Answer.f+g is continuous at a. ■ Method 2 is two lines, because 1.2 did the work. The same two lines prove products and quotients (with a non-zero denominator), which is why every polynomial is continuous.
Quick checkTo show f is NOT continuous at a, it is enough to find:
That is the sequential criterion. A single nearby point with a different value proves nothing: f(x)=x has f(a+0.001)=f(a) and is continuous.
The two big theorems
In JEE you used both of these as facts: “a continuous function that changes sign has a root”, and “a continuous function on [a,b] has a largest value”. Both are false if you only allow rational numbers. For example, x2−2 is continuous on the rationals, negative at 0 and positive at 2, and has no rational root. So both proofs must use completeness. That is the point of 1.1.
Theorem BAbbott Thm 4.5.1
Intermediate value theorem
Let f be continuous on [a,b] with f(a)<0<f(b). Then there is c∈(a,b) with f(c)=0. (The same holds for any value between f(a) and f(b): apply it to f(x)−y.)
In one lineIf f is continuous on [a,b] and f(a)<0<f(b), then f(c)=0 for some c in (a,b).
Why it is trueTake c = the supremum of the points where f is still negative; continuity rules out both f(c) < 0 and f(c) > 0.
Why· The picture behind the proof
Mark every point of [a,b] where f is still negative. Let c be the supremum of those points: the last moment the graph is below the axis, in the limiting sense. If f(c) were negative, continuity would keep f negative a little to the right of c, contradicting “last”. If f(c) were positive, continuity would keep f positive a little to the left of c, so points just below c would not be in the set, and c would not be the least upper bound. So f(c)=0. Over the rationals the supremum may not exist, and the proof collapses exactly there.
ProofAbbott 4.5.1 (via the least-upper-bound property)
The idea: Let S = {x in [a, b] : f(x) < 0} and c = sup S. Rule out f(c) < 0 and f(c) > 0 with continuity, using ε = |f(c)| in each case.
Let S={x∈[a,b]:f(x)<0} and c=supS. Then a≤c≤b.
a∈S since f(a)<0, so S is non-empty, and b is an upper bound, so the completeness axiom of 1.1 gives the supremum.Where the idea comes from: we want the first place where the graph reaches the axis. The 'last point that is still negative' is a supremum, and completeness is what guarantees it exists.
If f(c)<0: then c<b (since f(b)>0), and some x with c<x<c+δ, x≤b, has f(x)<0. So x∈S and x>c, contradicting that c is an upper bound of S.
Suppose f(c)<0. Continuity at c with ε=−f(c)>0 gives δ with f(x)<f(c)+ε=0 for ∣x−c∣<δ.So f is still negative a little to the right of c.
If f(c)>0: then c>a, and f(x)>0 on (c−δ,c], so every element of S is at most c−δ. Then c−δ is an upper bound of S smaller than c, contradicting “least”.
Suppose f(c)>0. Continuity with ε=f(c) gives δ with f(x)>0 for ∣x−c∣<δ.So no point of S lies in (c−δ,c].
So f(c)=0, with c∈(a,b). ■
Neither f(c)<0 nor f(c)>0; and c=a,b because f(a)<0<f(b).
Theorem BAbbott Thm 4.4.2
Extreme value theorem
If f is continuous on [a,b], there are points c,d∈[a,b] with f(c)≤f(x)≤f(d) for all x∈[a,b].
In one lineA continuous function on a closed bounded interval [a,b] attains a maximum and a minimum.
Why it is trueBolzano–Weierstrass finds a convergent subsequence of points where f gets close to its supremum; continuity carries the limit point's value up to the supremum.
ProofAbbott 4.4.2
The idea: Step 1: f is bounded (else take x_n with |f(x_n)| > n; a convergent subsequence contradicts continuity). Step 2: let M = sup of the values; pick x_n with f(x_n) > M − 1/n; a convergent subsequence tends to some d in [a, b], and continuity gives f(d) = M.
Bounded: if not, choose xn∈[a,b] with ∣f(xn)∣>n.
Suppose f is unbounded; then for each n some point has a large value.
A subsequence xnk→x∗∈[a,b].
(xn) lies in [a,b], so it is bounded; Bolzano–Weierstrass (1.2). The limit stays in [a,b] because a≤xnk≤b passes to the limit.
Contradiction. So f is bounded, and M=sup{f(x):x∈[a,b]} exists (completeness).
Continuity (sequential criterion) gives f(xnk)→f(x∗), so f(xnk) is bounded, but ∣f(xnk)∣>nk≥k is not.
For each n choose yn∈[a,b] with M−n1<f(yn)≤M.
Approximation property of the supremum with ε=n1.
A subsequence ynk→d∈[a,b], and f(ynk)→f(d).
Bolzano–Weierstrass again, then continuity.
So f(d)=M: the maximum is attained at d. The minimum follows by applying this to −f. ■
Squeeze: M−nk1<f(ynk)≤M and nk1→0. Limits are unique.
Proof workshopRebuild the intermediate value theorem proof
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
S is non-empty (a∈S) and bounded above by b, so completeness gives c.
Contradicts that c is an upper bound of S.
You need the point c before you can ask about f(c).
Contradicts that c is the LEAST upper bound.
This is the second case. Logically either case could come first, but this proof writes the case f(c)<0 first, so place that one before this.
Both other cases are impossible (trichotomy).
This conclusion needs both cases ruled out first.
Worked example
Show x5−3x+1=0 has a solution between 0 and 1.
Solution.
Continuity.f(x)=x5−3x+1 is a polynomial, so it is continuous. Sums and products of continuous functions are continuous, by the sequential criterion and the limit laws of 1.2 (the sum case is worked above). The IVT needs continuity on the whole interval [0,1].
Signs at the ends.f(0)=1>0 and f(1)=1−3+1=−1<0. The theorem as stated needs f(a)<0<f(b). Here the signs are the other way round, so apply the theorem to −f, which has the same roots and signs −1<0<1.
Conclude. By the IVT there is c∈(0,1) with f(c)=0. The theorem promises existence. It does not say where c is.
Answer. A root exists in (0,1). ■ No formula for it was needed. Bisection (1.1) narrows it down: f(0.5)=−0.46875<0, so the root is in (0,0.5), and so on, converging to c≈0.3347.
Your answerContinuing the bisection for f(x)=x5−3x+1 on [0,1]: what is f(0.5)? (Its sign tells you which half contains the root.)
Compute 0.55 first, then −3×0.5, then add 1.
0.55=321, −3×0.5=−23, so f(0.5)=321−3248+3232=−3215=−0.46875. It is negative while f(0)=1 is positive, so the sign change is in (0,0.5).
Your answerEach bisection step halves the interval that contains the root. After 10 halvings of [0,1], how wide is the interval? (Give a fraction.)
Width after k halvings is (21)k.
(21)10=10241≈0.001. So 10 steps pin the root down to about three decimal places, with a guarantee, and no formula.
Worked example
Fixed point. Show that every continuous f:[0,1]→[0,1] has a point c with f(c)=c.
Solution.
Turn it into a root problem. Let g(x)=f(x)−x. We want g(c)=0. "f(c)=c" is "f(c)−c=0". The IVT finds roots, so rewrite the question as one.
Check the endpoints.g(0)=f(0)−0≥0 and g(1)=f(1)−1≤0. f takes values in [0,1], so f(0)≥0 and f(1)≤1. Here the hypothesis “outputs stay in [0,1]” is used.
Handle the boundary cases. If g(0)=0 or g(1)=0, then c=0 or c=1 works. The IVT needs strictly opposite signs, so the zero cases are done separately.
Apply the IVT. Otherwise g(0)>0>g(1), and g is continuous (a difference of continuous functions), so some c∈(0,1) has g(c)=0. IVT applied to −g, which goes from negative to positive.
Answer.f(c)=c for some c. ■ Picture: the graph of f must cross the diagonal y=x in the unit square.
Quick checkf(x)=x1 is continuous on (0,1]. Does it attain a maximum there?
As x→0+, x1→∞. At x=1 the function is 1, which is its smallest value, not its largest. The extreme value theorem requires [a,b], closed and bounded; (0,1] is not closed, and the theorem's proof breaks because a subsequence could converge to 0, outside the domain.
Quick checkDefine f(x)=−1 for x<0 and f(x)=1 for x≥0. It takes the value −1 and the value 1, but never 0. Why does this not contradict the intermediate value theorem on [−1,1]?
The hypothesis is continuity on the WHOLE interval, and the jump at 0 breaks it. The signs at the ends are opposite, and the theorem is not limited to polynomials.
Uniform continuity
In ”f(x)=3x−1 is continuous” the same δ=3ε worked at every point. For x2 the δ we found depended on the point: near larger a the graph is steeper and δ must be smaller. When one δ works everywhere, the function is uniformly continuous.
Definition B
Uniform continuity
f is uniformly continuous on a set D if
∀ε>0∃δ>0∀x,y∈D:∣x−y∣<δ⟹∣f(x)−f(y)∣<ε.
Compared with continuity at every point, δ now comes BEFORE the points, so it cannot depend on them (the quantifier-order lesson of 0.1).
In one linef is uniformly continuous on a set if for every ε>0 one δ>0 works at every point: ∣x−y∣<δ implies ∣f(x)−f(y)∣<ε.
Why it existsIt is what makes the integral of a continuous function exist and what lets numerical methods use one step size for a whole interval.
Worked example
Show f(x)=x2 is not uniformly continuous on R.
Solution.
Negation.∃ε>0∀δ>0∃x,y:∣x−y∣<δ and ∣x2−y2∣≥ε. Negate the definition.
Choose ε=1, and use far-out points. Given δ>0, take x=δ1 and y=δ1+2δ. Then ∣x−y∣=2δ<δ. The graph is steep far out, so points close together have far-apart squares there.
Compute.∣y2−x2∣=∣y−x∣∣y+x∣=2δ(δ2+2δ)=1+4δ2≥1. Difference of squares.
Answer. No single δ works for ε=1 on all of R. ■ On a bounded interval [−R,R], though, δ=2Rε works everywhere (since ∣x+y∣≤2R), as the next theorem guarantees.
Theorem BAbbott Thm 4.4.7 (Heine–Cantor)
Continuous on a closed interval implies uniformly continuous
If f is continuous on [a,b], then f is uniformly continuous on [a,b].
In one lineA continuous function on [a,b] is uniformly continuous there.
Why it is trueIf not, there are pairs of points ever closer with outputs ε apart; Bolzano–Weierstrass makes them converge to one point, where continuity forbids the gap.
ProofAbbott 4.4.7
The idea: Contradiction. Failure of uniform continuity gives x_n, y_n with |x_n − y_n| < 1/n but |f(x_n) − f(y_n)| ≥ ε. A subsequence x_{n_k} converges to some c in [a, b]; then y_{n_k} → c too; continuity at c gives f(x_{n_k}) − f(y_{n_k}) → 0, contradicting ≥ ε.
Suppose not. Then there is ε>0 and points xn,yn∈[a,b] with ∣xn−yn∣<n1 and ∣f(xn)−f(yn)∣≥ε.
Negation of uniform continuity with δ=n1 for each n.
Sequential criterion at c for both sequences, and the limit laws.
This contradicts ∣f(xnk)−f(ynk)∣≥ε. So f is uniformly continuous. ■
A sequence that stays ≥ε cannot tend to 0.
Proof workshopPick the reason for each line of the Heine–Cantor proof
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
Suppose f is not uniformly continuous. Then there are ε>0 and points xn,yn∈[a,b] with ∣xn−yn∣<n1 and ∣f(xn)−f(yn)∣≥ε.
Some subsequence xnk converges to a point c∈[a,b].
Then ynk→c as well.
f(xnk)−f(ynk)→f(c)−f(c)=0.
But every term of this sequence has absolute value at least ε. Contradiction.
Worked example
Prove f(x)=x1 is not uniformly continuous on (0,1), but is uniformly continuous on [1,∞).
Solution.
Not uniform on (0,1): choose ε. Take ε=1. To disprove uniform continuity we must find ONE bad ε that defeats every δ.
Defeat any δ. Given δ>0, let t=min(δ,21) and take x=t, y=2t, both in (0,1). Then ∣x−y∣=2t<δ. We use t instead of δ so the points stay inside (0,1) even when δ is large.
The outputs are far apart.y1−x1=t2−t1=t1≥2≥1. Near 0 the graph is very steep, so two nearby inputs have outputs far apart. This is the same picture as x2 far out.
Uniform on [1,∞): factor. For x,y≥1, x1−y1=xy∣x−y∣≤∣x−y∣. xy≥1, so dividing by xy can only shrink the number.
Choose δ. Let ε>0 and δ=ε. If ∣x−y∣<δ, then x1−y1≤∣x−y∣<ε. This δ mentions only ε, not x or y. That is what “uniform” means.
Answer. Not uniformly continuous on (0,1). Uniformly continuous on [1,∞). ■ Note that [1,∞) is not bounded, so Heine–Cantor does not apply there, but the direct proof works.
Your answerf(x)=x2 on [−10,10]. The bound ∣x2−y2∣=∣x−y∣∣x+y∣≤20∣x−y∣ lets one δ work everywhere. For ε=0.01, what is the δ=20ε?
Divide 0.01 by 20.
δ=200.01=0.0005=20001. If ∣x−y∣<0.0005 then ∣x2−y2∣<20×0.0005=0.01, for every pair of points in [−10,10].
Quick checkWhich of these functions is uniformly continuous on its whole domain?
x2 on [0,5] is continuous on a closed bounded interval, so Heine–Cantor applies. x2 on R and x1 on (0,1) get steeper without limit, and the examples above show no single δ works. The same function x2 is uniformly continuous on a bounded interval and not on R: uniform continuity depends on the set, not only on the formula.
A preview· Preview: integrals of continuous functions
Chapter 1.5 proves every continuous function on [a,b] is integrable. The key step: uniform continuity gives one δ such that on every small piece of width δ the function varies by less than ε, so upper and lower sums differ by at most ε(b−a).
Where it is used
Used inside maths· Inside maths: derivatives, integrals, and Unit 4
The derivative (1.4) is a limit of a function; the integral (1.5) needs uniform continuity; Unit 4 replaces ∣x−y∣ by a distance in any space and the closed interval [a,b] by “compact”, and both big theorems survive. In 551 the definition becomes “preimages of open sets are open”, which you will see is the same idea.
Used in the real world· Engineering: numerical root-finding and tolerances
The intermediate value theorem is why bisection is guaranteed to find a root of a continuous function once you have one point below zero and one above. Library root finders such as scipy.optimize.brentq require exactly such a bracket, and the theorem guarantees a root stays inside it at every step. Uniform continuity is why a fixed step size works: suppose a sensor signal changes by less than 0.1 whenever the time changes by less than δ seconds. Then reading it every δ seconds, it never moves by 0.1 or more between two consecutive readings. For signals that are not uniformly continuous (sharp spikes), no fixed sampling rate gives that guarantee.
Traps
Watch out· δ may depend on ε and on the point, never on x
In continuity at a, δ is chosen after ε and a, before x. “Let δ=∣x−a∣/2” is meaningless: x is not known yet.
Watch out· Closed and bounded matters
The extreme value theorem fails on (0,1] for x1 and on [0,∞) for x. Check that the interval is closed and bounded before using it.
Watch out· The limit at a ignores the value at a
limx→af(x) never looks at f(a); continuity is the extra demand that the two agree. A function can have a limit at a and still be discontinuous there (a removable discontinuity).
Watch out· A δ for one ε is not a proof
Finding that δ=0.05 works for ε=0.1 proves nothing about continuity. The definition demands a δ for EVERY ε, so the proof must say “Let ε>0 be arbitrary” and give a rule such as δ=min(1,5ε) that works for all of them. Likewise, a numerical check that f(x) is close to f(a) for a few x near a is evidence, not proof.
Watch out· Uniform continuity depends on the set
x2 is uniformly continuous on [0,5] and not on R. When asked “is f uniformly continuous?”, always ask “on which set?”. On a closed bounded interval the answer is yes whenever f is continuous. Elsewhere you must check by hand.
Problems
check
For f(x)=2x+5 at a=1 and ε=0.1, find a δ that works.
Solution
∣f(x)−f(1)∣=2∣x−1∣<0.1 when ∣x−1∣<0.05. So δ=0.05 (or anything smaller).
check
Write the negation of ”f is continuous at a”.
Solution
∃ε>0∀δ>0∃x:∣x−a∣<δ∧∣f(x)−f(a)∣≥ε.
check
Does the intermediate value theorem apply to f(x)=x1 on [−1,1], where f(−1)=−1<0<1=f(1)?
Solution
No: f is not defined (so not continuous) at 0, which is in the interval. Indeed x1 is never 0.
useAbbott Exercise 4.3.2 style
Prove f(x)=x2+x is continuous at a=1 with an explicit δ.
Solution
Scratch: x2+x−2=(x−1)(x+2), so ∣f(x)−2∣=∣x−1∣∣x+2∣. If δ≤1 then 0<x<2 and 2<x+2<4, so ∣x+2∣<4 and ∣f(x)−2∣<4∣x−1∣. That is at most ε when ∣x−1∣≤4ε. Write-up: given ε>0, take δ=min(1,4ε). If ∣x−1∣<δ, then ∣x+2∣<4 and ∣f(x)−2∣=∣x−1∣∣x+2∣<4δ≤ε.
use
Prove f(x)=x is continuous at a=4. (Hint: x−2=x+2x−4.)
Solution
∣x−2∣=x+2∣x−4∣≤2∣x−4∣, since x+2≥2 for x≥0. So δ=2ε works. Here x ranges over the domain [0,∞) only, so nothing more is needed.
use
Show cosx=x has a solution in [0,2π].
Solution
g(x)=cosx−x is continuous, g(0)=1>0, g(2π)=−2π<0. By the IVT, g(c)=0 for some c∈(0,2π), so cosc=c (about 0.739).
prove
Prove: if f and g are continuous at a, then so is f+g. Do it twice: with ε and δ, and with the sequential criterion.
Solution
ε-δ: given ε, choose δ1,δ2 for f,g with 2ε; with δ=min(δ1,δ2), ∣(f+g)(x)−(f+g)(a)∣≤∣f(x)−f(a)∣+∣g(x)−g(a)∣<ε. Sequential: if xn→a then f(xn)→f(a) and g(xn)→g(a), so their sum tends to f(a)+g(a) by the sum law of 1.2.
proveAbbott Exercise 4.5.3 style
Fixed point. Prove that every continuous f:[0,1]→[0,1] has a point c with f(c)=c.
Solution
Let g(x)=f(x)−x, continuous. g(0)=f(0)≥0 and g(1)=f(1)−1≤0. If either is 0 we are done; otherwise g(0)>0>g(1) and the IVT gives c with g(c)=0.
prove
Prove f(x)=x1 is not uniformly continuous on (0,1), but is uniformly continuous on [1,∞).
Solution
Not on (0,1): take ε=1; given δ>0, let t=min(δ,21), x=t, y=2t (both in (0,1)): ∣x−y∣=2t<δ and ∣y1−x1∣=t1≥2≥1. On [1,∞): ∣x1−y1∣=xy∣x−y∣≤∣x−y∣, so δ=ε works everywhere.
prove
Prove that if f is continuous at a and f(a)>0, then f(x)>0 for all x in some interval around a.
Solution
Take ε=f(a)>0 in the definition: there is δ with ∣f(x)−f(a)∣<f(a) for ∣x−a∣<δ, so f(x)>0 there. (This was the key step in the IVT proof.)
stretchclassic
Let f(x)=x if x is rational and f(x)=0 if x is irrational. Prove f is continuous at 0 and at no other point.
Solution
At 0: ∣f(x)−0∣≤∣x∣, so δ=ε works. At a=0: if a is rational, take irrationals xn→a (density of irrationals, 1.1 problem); f(xn)=0→a=f(a). If a is irrational, take rationals qn→a (density of Q); f(qn)=qn→a=0=f(a). Either way the sequential criterion fails.
stretch
Prove that a continuous f:R→R with f(x+y)=f(x)+f(y) for all x,y is f(x)=cx with c=f(1). (Hint: prove it for integers, then rationals, then use density and continuity.)
Solution
f(0)=0 (put x=y=0). Induction gives f(n)=nc for n∈N; f(−x)=−f(x) gives integers. For q=nm: nf(nm)=f(m)=mc, so f(q)=qc. For real x, take rationals qn→x; continuity gives f(x)=limf(qn)=limqnc=xc. (This is why additive and continuous means linear, as in chapter 2.3.)
Summary
limx→af(x)=L: for every ε>0 there is δ>0 with ∣f(x)−L∣<ε whenever 0<∣x−a∣<δ. Continuity at a: the same with L=f(a) and x=a allowed.
Finding δ: factor out ∣x−a∣, bound the leftover factor by first restricting δ≤1, then take δ=min(1,…).
Sequential criterion: continuous at a iff xn→a implies f(xn)→f(a). Best tool for proving discontinuity.
Intermediate value theorem: proved with c=sup{x:f(x)<0}. Extreme value theorem: proved with Bolzano–Weierstrass. Both need completeness, and the EVT needs a closed bounded interval.
Uniform continuity: one δ for all points. Continuous on [a,b] implies uniformly continuous; x2 on R and x1 on (0,1) are not.
Watch and read
The same ideas explained by someone else. Use these when an explanation here does not land.
JEE / CBSE: 'f is continuous if you can draw it without lifting the pen' and 'a continuous function on [a, b] attains a maximum' were pictures and facts. Here they become a definition and two theorems.
MATH 375 / 376: Continuity of functions of several variables (Apostol 8.1 to 8.5) is the same definition with $|x - a|$ replaced by a distance in $\mathbb R^n$.
MATH 521: This is the core of 521's continuity chapter. The proofs of the intermediate and extreme value theorems are standard exam questions.