Survey of Mathematics

1.3 Limits and continuity with epsilon and delta

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 x2x^2 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 ε\varepsilon (how close the output must be), and you answer with an input tolerance δ\delta (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 lim⁡x→af(x)\lim_{x \to a} f(x) by substituting, factoring or applying L’Hospital. Those are computing rules. Here we ask what the statement lim⁡x→af(x)=L\lim_{x \to a} f(x) = L actually promises, so that we can prove the rules.

Before you start

Chapter 1.2: the ε\varepsilon-NN game, the triangle inequality, subsequences and Bolzano–Weierstrass. Chapter 1.1: the supremum.

Quick checkIn 1.2, after finding that ∣an−L∣<5n|a_n - L| < \frac5n, how did we choose NN for a given ε\varepsilon?
Quick checkWhich is the triangle inequality?

The picture: the same game, for functions

For f(x)→Lf(x) \to L as x→ax \to a: the sceptic draws a horizontal band of half-height ε\varepsilon around LL. You answer with a vertical window of half-width δ\delta around aa (leaving out x=ax = a itself). You win if the graph over the whole window stays inside the band. Three things to do:

  1. Easy win. With f(x)=x2f(x) = x^2 at a=2a = 2, press “Show a δ that works” for several ε\varepsilon and watch δ\delta shrink as ε\varepsilon shrinks. Smaller bands need narrower windows.
  2. Hole. Switch to x2−1x−1\frac{x^2 - 1}{x - 1} at a=1a = 1. The function is not even defined at 1, yet you still win every round. That is why the window leaves out x=ax = a.
  3. Loss. Switch to the jump. For ε=0.5\varepsilon = 0.5 no window is narrow enough, because points just left of 0 have f=0f = 0, a distance 1 from L=1L = 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 ε\varepsilon-δ\delta 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 ff be defined near aa (perhaps not at aa). Then lim⁡x→af(x)=L\lim_{x \to a} f(x) = L means

∀ε>0  ∃δ>0  ∀x:0<∣x−a∣<δ  ⟹  ∣f(x)−L∣<ε.\forall \varepsilon > 0\ \ \exists \delta > 0\ \ \forall x:\quad 0 < |x - a| < \delta \implies |f(x) - L| < \varepsilon.

The condition 0<∣x−a∣0 < |x - a| excludes x=ax = a: the limit ignores the value at aa, even if there is one.

In one linelim⁡x→af(x)=L\lim_{x \to a} f(x) = L if for every ε>0\varepsilon > 0 there is δ>0\delta > 0 with ∣f(x)−L∣<ε|f(x) - L| < \varepsilon whenever 0<∣x−a∣<δ0 < |x - a| < \delta.

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

ff is continuous at aa if aa is in its domain and

∀ε>0  ∃δ>0  ∀x in the domain:∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε.\forall \varepsilon > 0\ \ \exists \delta > 0\ \ \forall x \text{ in the domain}:\quad |x - a| < \delta \implies |f(x) - f(a)| < \varepsilon.

ff is continuous (on a set) if it is continuous at every point of that set.

In one lineff is continuous at aa if lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a): small changes of input near aa 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)L = f(a) and allows x=ax = a (where the inequality holds automatically, since ∣f(a)−f(a)∣=0|f(a) - f(a)| = 0). So ff is continuous at aa exactly when lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a).

Why· How to read the definition aloud, one quantifier at a time

The symbols ∀\forall (“for every”) and ∃\exists (“there is”) are the quantifiers of 0.1. Their ORDER is the order of the game, and it tells you who moves when.

  1. “For every ε>0\varepsilon > 0.” The sceptic picks the output tolerance. You get no say, so your proof must begin “Let ε>0\varepsilon > 0 be arbitrary.”
  2. “There is a δ>0\delta > 0.” You answer with an input tolerance. You may use ε\varepsilon (and aa) to build it. This is where all the work is.
  3. “For every xx.” The sceptic now picks any xx in your window. You get no say again, and δ\delta is already fixed.
  4. “If ∣x−a∣<δ|x - a| < \delta then ∣f(x)−f(a)∣<ε|f(x) - f(a)| < \varepsilon.” You must show that this xx gives an output within ε\varepsilon.

Two consequences. Because δ\delta is chosen after ε\varepsilon, it usually depends on ε\varepsilon: a thinner band needs a narrower window. Because δ\delta is chosen before xx, it can never mention xx.

How to find δ: scratch work, then write-up

A proof that ff is continuous at aa must produce a δ\delta for every ε\varepsilon. Nobody hands you δ\delta, so you find it by working backwards from what you want. Ask: “how close must xx be to aa so that ∣f(x)−f(a)∣|f(x) - f(a)| is below ε\varepsilon?” That backwards search is the scratch work of 0.7. Once you have a δ\delta, you write the argument forwards, starting from “Let ε>0\varepsilon > 0 and set δ=…\delta = \dots”. That is the write-up. The reader only sees the write-up, so it never shows the search. It only shows that the δ\delta works. This is the same move as choosing NN in 1.2.

Why· The recipe for finding δ
  1. Write the goal ∣f(x)−f(a)∣<ε|f(x) - f(a)| < \varepsilon, and rearrange the left side until the factor ∣x−a∣|x - a| appears. (Factor, take a common denominator, or multiply by a conjugate.)
  2. If the other factor is a constant KK, then ∣f(x)−f(a)∣=K∣x−a∣|f(x) - f(a)| = K|x - a|, and δ=εK\delta = \frac\varepsilon K works. Linear functions end here.
  3. If the other factor still contains xx, bound it. Decide in advance that δ≤1\delta \le 1 (any fixed positive number would do; 1 keeps the arithmetic easy). Then ∣x−a∣<1|x - a| < 1 traps xx in an interval, and on that interval you can bound the leftover factor by a constant KK.
  4. Now ∣f(x)−f(a)∣<K∣x−a∣|f(x) - f(a)| < K|x - a|, which is at most ε\varepsilon when ∣x−a∣≤εK|x - a| \le \frac\varepsilon K. That is a second demand on δ\delta.
  5. Meet both demands with δ=min⁡ ⁣(1,εK)\delta = \min\!\left(1, \frac\varepsilon K\right): the smaller of two numbers is at most each of them.
  6. Write-up, forwards: “Let ε>0\varepsilon > 0 and set δ=min⁡(1,εK)\delta = \min(1, \frac\varepsilon K). Let ∣x−a∣<δ|x - a| < \delta. Then (bound the leftover factor, using δ≤1\delta \le 1). Then (finish, using δ≤εK\delta \le \frac\varepsilon K). So ∣f(x)−f(a)∣<ε|f(x) - f(a)| < \varepsilon.”

The step-through below does this for x2x^2 at a=2a = 2.

Quick checkIn the proof for x2x^2 at a=2a = 2 we first insisted δ≤1\delta \le 1. Why?
Worked example
Prove f(x)=3x−1f(x) = 3x - 1 is continuous at every point aa.

Solution.

  1. Scratch. ∣f(x)−f(a)∣=∣3x−3a∣=3∣x−a∣|f(x) - f(a)| = |3x - 3a| = 3|x - a|. This is <ε< \varepsilon when ∣x−a∣<ε3|x - a| < \frac\varepsilon3. For a linear function the input distance factors out with a constant, so no restriction is needed.
  2. Write-up. Let a∈Ra \in \mathbb R and ε>0\varepsilon > 0. Set δ=ε3\delta = \frac\varepsilon3. If ∣x−a∣<δ|x - a| < \delta, then ∣f(x)−f(a)∣=3∣x−a∣<3δ=ε|f(x) - f(a)| = 3|x - a| < 3\delta = \varepsilon. Arbitrary point, arbitrary ε\varepsilon, a δ\delta built from them, then the check.

Answer. ff is continuous everywhere. ■\blacksquare Here δ\delta depends on ε\varepsilon but not on aa, which matters later (uniform continuity).

Your answerFor f(x)=5x−2f(x) = 5x - 2 at any point aa and ε=0.01\varepsilon = 0.01, the rule δ=εK\delta = \frac\varepsilon K with the constant factor KK from the scratch work gives what δ\delta?
Worked example
Prove f(x)=1xf(x) = \frac1x is continuous at a=2a = 2.

Solution.

  1. Scratch: make ∣x−2∣|x - 2| appear. ∣1x−12∣=∣2−x∣2∣x∣=12∣x∣ ∣x−2∣\left|\frac1x - \frac12\right| = \frac{|2 - x|}{2|x|} = \frac1{2|x|}\,|x - 2|. Common denominator. The leftover factor 12∣x∣\frac1{2|x|} still depends on xx, so it must be bounded.
  2. Scratch: bound the leftover factor. Insist δ≤1\delta \le 1. Then ∣x−2∣<1|x - 2| < 1 gives 1<x<31 < x < 3, so ∣x∣>1|x| > 1 and 12∣x∣<12\frac1{2|x|} < \frac12. A fraction is large when its denominator is small, so here we need a LOWER bound on ∣x∣|x|. For x2x^2 we needed an upper bound. The same step keeps xx away from 0, where 1x\frac1x is not defined.
  3. Scratch: second demand. Now ∣f(x)−f(2)∣<12∣x−2∣|f(x) - f(2)| < \frac12|x - 2|, which is at most ε\varepsilon when ∣x−2∣≤2ε|x - 2| \le 2\varepsilon. So δ≤1\delta \le 1 and δ≤2ε\delta \le 2\varepsilon. Same two-demand structure as for x2x^2.
  4. Write-up. Let ε>0\varepsilon > 0 and set δ=min⁡(1,2ε)\delta = \min(1, 2\varepsilon). If ∣x−2∣<δ|x - 2| < \delta, then x>1x > 1, so ∣f(x)−f(2)∣=12∣x∣∣x−2∣≤12∣x−2∣<12δ≤ε|f(x) - f(2)| = \frac1{2|x|}|x - 2| \le \frac12|x - 2| < \frac12\delta \le \varepsilon. Forwards: δ≤1\delta \le 1 gives the bound on 12∣x∣\frac1{2|x|}, and δ≤2ε\delta \le 2\varepsilon gives the last inequality.

Answer. 1x\frac1x is continuous at 2. ■\blacksquare Without the 1 in the minimum, a large ε\varepsilon would give a window reaching 0, where the function does not exist.

Worked example
Prove f(x)=xf(x) = \sqrt x is continuous at a=4a = 4.

Solution.

  1. Scratch: multiply by the conjugate. x−2=(x−2)(x+2)x+2=x−4x+2\sqrt x - 2 = \frac{(\sqrt x - 2)(\sqrt x + 2)}{\sqrt x + 2} = \frac{x - 4}{\sqrt x + 2}. This is the JEE trick for rationalising. It makes ∣x−4∣|x - 4| appear, and ∣x−4∣|x - 4| is the input distance.
  2. Scratch: bound the leftover factor. For x≥0x \ge 0 (the domain), x+2≥2\sqrt x + 2 \ge 2, so ∣x−2∣≤∣x−4∣2|\sqrt x - 2| \le \frac{|x - 4|}2. A larger denominator makes the fraction smaller. The bound holds on the whole domain, so no restriction on δ\delta is needed.
  3. Scratch: solve. ∣x−4∣2<ε\frac{|x - 4|}2 < \varepsilon when ∣x−4∣<2ε|x - 4| < 2\varepsilon. One demand only, so δ=2ε\delta = 2\varepsilon.
  4. Write-up. Let ε>0\varepsilon > 0, set δ=2ε\delta = 2\varepsilon. If x≥0x \ge 0 and ∣x−4∣<δ|x - 4| < \delta, then ∣x−2∣=∣x−4∣x+2≤∣x−4∣2<ε|\sqrt x - 2| = \frac{|x - 4|}{\sqrt x + 2} \le \frac{|x - 4|}2 < \varepsilon. Each inequality was justified in the scratch work.

Answer. x\sqrt x is continuous at 4. ■\blacksquare

Your answerFor x\sqrt x at a=4a = 4 and ε=0.1\varepsilon = 0.1, what δ\delta does the example's rule δ=2ε\delta = 2\varepsilon give?
Worked example
Prove lim⁡x→2x2−4x−2=4\displaystyle\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = 4.

Solution.

  1. Scratch: simplify for x≠2x \ne 2. x2−4x−2=(x−2)(x+2)x−2=x+2\frac{x^2 - 4}{x - 2} = \frac{(x - 2)(x + 2)}{x - 2} = x + 2. The definition of a limit only tests xx with 0<∣x−2∣0 < |x - 2|, so x≠2x \ne 2 and cancelling is allowed. This is the exact reason you may cancel in JEE limits.
  2. Scratch: the distance to L=4L = 4. ∣f(x)−4∣=∣x+2−4∣=∣x−2∣|f(x) - 4| = |x + 2 - 4| = |x - 2|. The factor is just 1, so δ=ε\delta = \varepsilon.
  3. Write-up. Let ε>0\varepsilon > 0, set δ=ε\delta = \varepsilon. If 0<∣x−2∣<δ0 < |x - 2| < \delta, then f(x)=x+2f(x) = x + 2 and ∣f(x)−4∣=∣x−2∣<ε|f(x) - 4| = |x - 2| < \varepsilon. The condition 0<∣x−2∣0 < |x - 2| is what allowed the cancellation in the write-up.

Answer. The limit is 4. ■\blacksquare The function is not even defined at 2, so it is not continuous there, but it can be repaired by defining f(2)=4f(2) = 4. This is the “hole” in the visualizer.

Quick checkLet f(x)=x2−4x−2f(x) = \frac{x^2 - 4}{x - 2} for x≠2x \ne 2 and f(2)=7f(2) = 7. What is true at a=2a = 2?
Worked example
Show that the jump function H(x)=0H(x) = 0 for x<0x < 0, H(x)=1H(x) = 1 for x≥0x \ge 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 ε\varepsilon, and then show that every δ\delta the other side offers fails.

  1. Write the negation. Not continuous at 0 means ∃ε>0 ∀δ>0 ∃x: ∣x∣<δ\exists \varepsilon > 0\ \forall \delta > 0\ \exists x:\ |x| < \delta and ∣H(x)−H(0)∣≥ε|H(x) - H(0)| \ge \varepsilon. The negation rules of 0.1: each ∀\forall becomes ∃\exists and each ∃\exists becomes ∀\forall, and “if P then Q” becomes “P and not Q”.
  2. Choose ε\varepsilon. Take ε=12\varepsilon = \frac12. The jump has height 1, so any band of half-height below 1 is too thin to cover both sides.
  3. Defeat every δ\delta. Given δ>0\delta > 0, take x=−δ2x = -\frac\delta2. Then ∣x∣<δ|x| < \delta and ∣H(x)−H(0)∣=∣0−1∣=1≥12|H(x) - H(0)| = |0 - 1| = 1 \ge \frac12. A point inside every window, on the wrong side of the jump.

Answer. HH is not continuous at 0. ■\blacksquare

Continuity through sequences

The next theorem connects this chapter to 1.2. Idea: a sequence xn→ax_n \to a is a supply of inputs that get as close to aa as you like, one after another. If ff is continuous, their outputs must pile up at f(a)f(a). Conversely, one sequence whose outputs do not pile up at f(a)f(a) proves ff 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 B Abbott Thm 4.3.2

Sequential criterion for continuity

ff is continuous at aa if and only if for every sequence (xn)(x_n) in the domain with xn→ax_n \to a, we have f(xn)→f(a)f(x_n) \to f(a).

In one lineff is continuous at aa if and only if xn→ax_n \to a always implies f(xn)→f(a)f(x_n) \to 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).
(⇒\Rightarrow) Suppose ff is continuous at aa and xn→ax_n \to a. Let ε>0\varepsilon > 0.
Forward direction.
There is δ>0\delta > 0 with ∣f(x)−f(a)∣<ε|f(x) - f(a)| < \varepsilon whenever ∣x−a∣<δ|x - a| < \delta.
Continuity at aa with this ε\varepsilon.
There is NN with ∣xn−a∣<δ|x_n - a| < \delta for n>Nn > N.
Convergence of (xn)(x_n) with tolerance δ\delta (in the role of 1.2's ε\varepsilon).
So for n>Nn > N, ∣f(xn)−f(a)∣<ε|f(x_n) - f(a)| < \varepsilon, that is, f(xn)→f(a)f(x_n) \to f(a).
Combine the two.
(⇐\Leftarrow) Suppose ff is not continuous at aa. Then there is ε>0\varepsilon > 0 such that every δ>0\delta > 0 has some xx with ∣x−a∣<δ|x - a| < \delta and ∣f(x)−f(a)∣≥ε|f(x) - f(a)| \ge \varepsilon.
Backward direction, by contrapositive: assume ff is NOT continuous at aa and build a bad sequence.
For each nn choose xnx_n with ∣xn−a∣<1n|x_n - a| < \frac1n and ∣f(xn)−f(a)∣≥ε|f(x_n) - f(a)| \ge \varepsilon.
Use δ=1n\delta = \frac1n for each nn to pick a point.
Then xn→ax_n \to a but f(xn)↛f(a)f(x_n) \not\to f(a). This proves the contrapositive. ■\blacksquare
1n→0\frac1n \to 0 squeezes xnx_n to aa, but the outputs stay at least ε\varepsilon away.

The same proof, with 0<∣x−a∣0 < |x - a| and LL in place of ∣x−a∣|x - a| and f(a)f(a), shows that lim⁡x→af(x)=L\lim_{x \to a} f(x) = L if and only if f(xn)→Lf(x_n) \to L for every sequence xn→ax_n \to a with xn≠ax_n \ne a. Chapter 1.4 uses this version for derivatives.

Worked example
Show g(x)=sin⁡(1/x)g(x) = \sin(1/x) for x≠0x \ne 0, g(0)=0g(0) = 0, is not continuous at 0.

Solution.

  1. Choose a sequence approaching 0 along which gg is 1. sin⁡(1/x)=1\sin(1/x) = 1 when 1/x=π2+2πn1/x = \frac\pi2 + 2\pi n, so take xn=1π/2+2πnx_n = \frac{1}{\pi/2 + 2\pi n} for n=1,2,3,…n = 1, 2, 3, \dots. To break continuity with the sequential criterion, find xn→ax_n \to a whose outputs do not approach g(a)g(a). Near 0, 1x\frac1x is huge and sweeps through π2+2πn\frac\pi2 + 2\pi n again and again, so sin⁡(1/x)\sin(1/x) hits 1 infinitely often close to 0.
  2. Check. xn→0x_n \to 0, but g(xn)=1g(x_n) = 1 for all nn, and g(0)=0g(0) = 0. g(xn)→1≠0g(x_n) \to 1 \ne 0.

Answer. By the sequential criterion, gg is not continuous at 0. ■\blacksquare (No choice of g(0)g(0) would fix it: along xn′=13π/2+2πnx_n' = \frac{1}{3\pi/2 + 2\pi n}, g=−1g = -1, so gg has no limit at 0 at all.)

Worked example
Prove: if ff and gg are continuous at aa, then f+gf + g is continuous at aa.

Solution. We do it twice, to compare the two methods.

  1. Method 1, set up the game. Let ε>0\varepsilon > 0. Continuity of ff and of gg at aa, each used with the tolerance ε2\frac\varepsilon2, gives δ1,δ2>0\delta_1, \delta_2 > 0 with ∣f(x)−f(a)∣<ε2|f(x) - f(a)| < \frac\varepsilon2 for ∣x−a∣<δ1|x - a| < \delta_1 and ∣g(x)−g(a)∣<ε2|g(x) - g(a)| < \frac\varepsilon2 for ∣x−a∣<δ2|x - a| < \delta_2. We want two errors that add up to ε\varepsilon, so we give each half. This ”ε2\frac\varepsilon2 trick” is the same as in 1.2’s proof of the sum law.
  2. Method 1, one δ\delta for both. Set δ=min⁡(δ1,δ2)\delta = \min(\delta_1, \delta_2). If ∣x−a∣<δ|x - a| < \delta, both estimates hold. Same two-demand idea as in the recipe: a δ\delta at most each of them satisfies both.
  3. Method 1, add. ∣(f+g)(x)−(f+g)(a)∣≤∣f(x)−f(a)∣+∣g(x)−g(a)∣<ε2+ε2=ε|(f + g)(x) - (f + g)(a)| \le |f(x) - f(a)| + |g(x) - g(a)| < \frac\varepsilon2 + \frac\varepsilon2 = \varepsilon. Triangle inequality.
  4. Method 2, sequences. Let xn→ax_n \to a. By the sequential criterion, f(xn)→f(a)f(x_n) \to f(a) and g(xn)→g(a)g(x_n) \to g(a). By the sum law of 1.2, f(xn)+g(xn)→f(a)+g(a)f(x_n) + g(x_n) \to f(a) + g(a). The criterion converts function questions into sequence questions, where the limit laws are already proved.

Answer. f+gf + g is continuous at aa. ■\blacksquare 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 ff is NOT continuous at aa, it is enough to find:

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][a, b] has a largest value”. Both are false if you only allow rational numbers. For example, x2−2x^2 - 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 B Abbott Thm 4.5.1

Intermediate value theorem

Let ff be continuous on [a,b][a, b] with f(a)<0<f(b)f(a) < 0 < f(b). Then there is c∈(a,b)c \in (a, b) with f(c)=0f(c) = 0. (The same holds for any value between f(a)f(a) and f(b)f(b): apply it to f(x)−yf(x) - y.)

In one lineIf ff is continuous on [a,b][a, b] and f(a)<0<f(b)f(a) < 0 < f(b), then f(c)=0f(c) = 0 for some cc in (a,b)(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][a, b] where ff is still negative. Let cc be the supremum of those points: the last moment the graph is below the axis, in the limiting sense. If f(c)f(c) were negative, continuity would keep ff negative a little to the right of cc, contradicting “last”. If f(c)f(c) were positive, continuity would keep ff positive a little to the left of cc, so points just below cc would not be in the set, and cc would not be the least upper bound. So f(c)=0f(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}S = \{x \in [a, b] : f(x) < 0\} and c=sup⁡Sc = \sup S. Then a≤c≤ba \le c \le b.
a∈Sa \in S since f(a)<0f(a) < 0, so SS is non-empty, and bb 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)<0f(c) < 0: then c<bc < b (since f(b)>0f(b) > 0), and some xx with c<x<c+δc < x < c + \delta, x≤bx \le b, has f(x)<0f(x) < 0. So x∈Sx \in S and x>cx > c, contradicting that cc is an upper bound of SS.
Suppose f(c)<0f(c) < 0. Continuity at cc with ε=−f(c)>0\varepsilon = -f(c) > 0 gives δ\delta with f(x)<f(c)+ε=0f(x) < f(c) + \varepsilon = 0 for ∣x−c∣<δ|x - c| < \delta.So ff is still negative a little to the right of cc.
If f(c)>0f(c) > 0: then c>ac > a, and f(x)>0f(x) > 0 on (c−δ,c](c - \delta, c], so every element of SS is at most c−δc - \delta. Then c−δc - \delta is an upper bound of SS smaller than cc, contradicting “least”.
Suppose f(c)>0f(c) > 0. Continuity with ε=f(c)\varepsilon = f(c) gives δ\delta with f(x)>0f(x) > 0 for ∣x−c∣<δ|x - c| < \delta.So no point of SS lies in (c−δ,c](c - \delta, c].
So f(c)=0f(c) = 0, with c∈(a,b)c \in (a, b). ■\blacksquare
Neither f(c)<0f(c) < 0 nor f(c)>0f(c) > 0; and c≠a,bc \ne a, b because f(a)<0<f(b)f(a) < 0 < f(b).
Theorem B Abbott Thm 4.4.2

Extreme value theorem

If ff is continuous on [a,b][a, b], there are points c,d∈[a,b]c, d \in [a, b] with f(c)≤f(x)≤f(d)f(c) \le f(x) \le f(d) for all x∈[a,b]x \in [a, b].

In one lineA continuous function on a closed bounded interval [a,b][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]x_n \in [a, b] with ∣f(xn)∣>n|f(x_n)| > n.
Suppose ff is unbounded; then for each nn some point has a large value.
A subsequence xnk→x∗∈[a,b]x_{n_k} \to x^* \in [a, b].
(xn)(x_n) lies in [a,b][a, b], so it is bounded; Bolzano–Weierstrass (1.2). The limit stays in [a,b][a, b] because a≤xnk≤ba \le x_{n_k} \le b passes to the limit.
Contradiction. So ff is bounded, and M=sup⁡{f(x):x∈[a,b]}M = \sup\{f(x) : x \in [a, b]\} exists (completeness).
Continuity (sequential criterion) gives f(xnk)→f(x∗)f(x_{n_k}) \to f(x^*), so f(xnk)f(x_{n_k}) is bounded, but ∣f(xnk)∣>nk≥k|f(x_{n_k})| > n_k \ge k is not.
For each nn choose yn∈[a,b]y_n \in [a, b] with M−1n<f(yn)≤MM - \frac1n < f(y_n) \le M.
Approximation property of the supremum with ε=1n\varepsilon = \frac1n.
A subsequence ynk→d∈[a,b]y_{n_k} \to d \in [a, b], and f(ynk)→f(d)f(y_{n_k}) \to f(d).
Bolzano–Weierstrass again, then continuity.
So f(d)=Mf(d) = M: the maximum is attained at dd. The minimum follows by applying this to −f-f. ■\blacksquare
Squeeze: M−1nk<f(ynk)≤MM - \frac1{n_k} < f(y_{n_k}) \le M and 1nk→0\frac1{n_k} \to 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.

    Worked example
    Show x5−3x+1=0x^5 - 3x + 1 = 0 has a solution between 0 and 1.

    Solution.

    1. Continuity. f(x)=x5−3x+1f(x) = x^5 - 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][0, 1].
    2. Signs at the ends. f(0)=1>0f(0) = 1 > 0 and f(1)=1−3+1=−1<0f(1) = 1 - 3 + 1 = -1 < 0. The theorem as stated needs f(a)<0<f(b)f(a) < 0 < f(b). Here the signs are the other way round, so apply the theorem to −f-f, which has the same roots and signs −1<0<1-1 < 0 < 1.
    3. Conclude. By the IVT there is c∈(0,1)c \in (0, 1) with f(c)=0f(c) = 0. The theorem promises existence. It does not say where cc is.

    Answer. A root exists in (0,1)(0, 1). ■\blacksquare No formula for it was needed. Bisection (1.1) narrows it down: f(0.5)=−0.46875<0f(0.5) = -0.46875 < 0, so the root is in (0,0.5)(0, 0.5), and so on, converging to c≈0.3347c \approx 0.3347.

    Your answerContinuing the bisection for f(x)=x5−3x+1f(x) = x^5 - 3x + 1 on [0,1][0, 1]: what is f(0.5)f(0.5)? (Its sign tells you which half contains the root.)
    Your answerEach bisection step halves the interval that contains the root. After 10 halvings of [0,1][0, 1], how wide is the interval? (Give a fraction.)
    Worked example
    Fixed point. Show that every continuous f:[0,1]→[0,1]f: [0, 1] \to [0, 1] has a point cc with f(c)=cf(c) = c.

    Solution.

    1. Turn it into a root problem. Let g(x)=f(x)−xg(x) = f(x) - x. We want g(c)=0g(c) = 0. "f(c)=cf(c) = c" is "f(c)−c=0f(c) - c = 0". The IVT finds roots, so rewrite the question as one.
    2. Check the endpoints. g(0)=f(0)−0≥0g(0) = f(0) - 0 \ge 0 and g(1)=f(1)−1≤0g(1) = f(1) - 1 \le 0. ff takes values in [0,1][0, 1], so f(0)≥0f(0) \ge 0 and f(1)≤1f(1) \le 1. Here the hypothesis “outputs stay in [0,1][0, 1]” is used.
    3. Handle the boundary cases. If g(0)=0g(0) = 0 or g(1)=0g(1) = 0, then c=0c = 0 or c=1c = 1 works. The IVT needs strictly opposite signs, so the zero cases are done separately.
    4. Apply the IVT. Otherwise g(0)>0>g(1)g(0) > 0 > g(1), and gg is continuous (a difference of continuous functions), so some c∈(0,1)c \in (0, 1) has g(c)=0g(c) = 0. IVT applied to −g-g, which goes from negative to positive.

    Answer. f(c)=cf(c) = c for some cc. ■\blacksquare Picture: the graph of ff must cross the diagonal y=xy = x in the unit square.

    Quick checkf(x)=1xf(x) = \frac1x is continuous on (0,1](0, 1]. Does it attain a maximum there?
    Quick checkDefine f(x)=−1f(x) = -1 for x<0x < 0 and f(x)=1f(x) = 1 for x≥0x \ge 0. It takes the value −1-1 and the value 11, but never 0. Why does this not contradict the intermediate value theorem on [−1,1][-1, 1]?

    Uniform continuity

    In ”f(x)=3x−1f(x) = 3x - 1 is continuous” the same δ=ε3\delta = \frac\varepsilon3 worked at every point. For x2x^2 the δ\delta we found depended on the point: near larger aa the graph is steeper and δ\delta must be smaller. When one δ\delta works everywhere, the function is uniformly continuous.

    Definition B

    Uniform continuity

    ff is uniformly continuous on a set DD if

    ∀ε>0  ∃δ>0  ∀x,y∈D:∣x−y∣<δ  ⟹  ∣f(x)−f(y)∣<ε.\forall \varepsilon > 0\ \ \exists \delta > 0\ \ \forall x, y \in D:\quad |x - y| < \delta \implies |f(x) - f(y)| < \varepsilon.

    Compared with continuity at every point, δ\delta now comes BEFORE the points, so it cannot depend on them (the quantifier-order lesson of 0.1).

    In one lineff is uniformly continuous on a set if for every ε>0\varepsilon > 0 one δ>0\delta > 0 works at every point: ∣x−y∣<δ|x - y| < \delta implies ∣f(x)−f(y)∣<ε|f(x) - f(y)| < \varepsilon.

    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)=x2f(x) = x^2 is not uniformly continuous on R\mathbb R.

    Solution.

    1. Negation. ∃ε>0 ∀δ>0 ∃x,y: ∣x−y∣<δ\exists \varepsilon > 0\ \forall \delta > 0\ \exists x, y:\ |x - y| < \delta and ∣x2−y2∣≥ε|x^2 - y^2| \ge \varepsilon. Negate the definition.
    2. Choose ε=1\varepsilon = 1, and use far-out points. Given δ>0\delta > 0, take x=1δx = \frac1\delta and y=1δ+δ2y = \frac1\delta + \frac\delta2. Then ∣x−y∣=δ2<δ|x - y| = \frac\delta2 < \delta. The graph is steep far out, so points close together have far-apart squares there.
    3. Compute. ∣y2−x2∣=∣y−x∣ ∣y+x∣=δ2(2δ+δ2)=1+δ24≥1|y^2 - x^2| = |y - x|\,|y + x| = \frac\delta2 \left(\frac2\delta + \frac\delta2\right) = 1 + \frac{\delta^2}4 \ge 1. Difference of squares.

    Answer. No single δ\delta works for ε=1\varepsilon = 1 on all of R\mathbb R. ■\blacksquare On a bounded interval [−R,R][-R, R], though, δ=ε2R\delta = \frac{\varepsilon}{2R} works everywhere (since ∣x+y∣≤2R|x + y| \le 2R), as the next theorem guarantees.

    Theorem B Abbott Thm 4.4.7 (Heine–Cantor)

    Continuous on a closed interval implies uniformly continuous

    If ff is continuous on [a,b][a, b], then ff is uniformly continuous on [a,b][a, b].

    In one lineA continuous function on [a,b][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\varepsilon > 0 and points xn,yn∈[a,b]x_n, y_n \in [a, b] with ∣xn−yn∣<1n|x_n - y_n| < \frac1n and ∣f(xn)−f(yn)∣≥ε|f(x_n) - f(y_n)| \ge \varepsilon.
    Negation of uniform continuity with δ=1n\delta = \frac1n for each nn.
    A subsequence xnk→c∈[a,b]x_{n_k} \to c \in [a, b].
    Bolzano–Weierstrass; the limit stays in [a,b][a, b].
    Then ynk→cy_{n_k} \to c as well.
    Triangle inequality: ∣ynk−c∣≤∣ynk−xnk∣+∣xnk−c∣<1nk+∣xnk−c∣→0|y_{n_k} - c| \le |y_{n_k} - x_{n_k}| + |x_{n_k} - c| < \frac1{n_k} + |x_{n_k} - c| \to 0.
    f(xnk)−f(ynk)→f(c)−f(c)=0f(x_{n_k}) - f(y_{n_k}) \to f(c) - f(c) = 0.
    Sequential criterion at cc for both sequences, and the limit laws.
    This contradicts ∣f(xnk)−f(ynk)∣≥ε|f(x_{n_k}) - f(y_{n_k})| \ge \varepsilon. So ff is uniformly continuous. ■\blacksquare
    A sequence that stays ≥ε\ge \varepsilon 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.

    1. Suppose ff is not uniformly continuous. Then there are ε>0\varepsilon > 0 and points xn,yn∈[a,b]x_n, y_n \in [a, b] with ∣xn−yn∣<1n|x_n - y_n| < \frac1n and ∣f(xn)−f(yn)∣≥ε|f(x_n) - f(y_n)| \ge \varepsilon.
    2. Some subsequence xnkx_{n_k} converges to a point c∈[a,b]c \in [a, b].
    3. Then ynk→cy_{n_k} \to c as well.
    4. f(xnk)−f(ynk)→f(c)−f(c)=0f(x_{n_k}) - f(y_{n_k}) \to f(c) - f(c) = 0.
    5. But every term of this sequence has absolute value at least ε\varepsilon. Contradiction.
    Worked example
    Prove f(x)=1xf(x) = \frac1x is not uniformly continuous on (0,1)(0, 1), but is uniformly continuous on [1,∞)[1, \infty).

    Solution.

    1. Not uniform on (0,1)(0, 1): choose ε\varepsilon. Take ε=1\varepsilon = 1. To disprove uniform continuity we must find ONE bad ε\varepsilon that defeats every δ\delta.
    2. Defeat any δ\delta. Given δ>0\delta > 0, let t=min⁡(δ,12)t = \min(\delta, \frac12) and take x=tx = t, y=t2y = \frac t2, both in (0,1)(0, 1). Then ∣x−y∣=t2<δ|x - y| = \frac t2 < \delta. We use tt instead of δ\delta so the points stay inside (0,1)(0, 1) even when δ\delta is large.
    3. The outputs are far apart. ∣1y−1x∣=2t−1t=1t≥2≥1\left|\frac1y - \frac1x\right| = \frac2t - \frac1t = \frac1t \ge 2 \ge 1. Near 0 the graph is very steep, so two nearby inputs have outputs far apart. This is the same picture as x2x^2 far out.
    4. Uniform on [1,∞)[1, \infty): factor. For x,y≥1x, y \ge 1, ∣1x−1y∣=∣x−y∣xy≤∣x−y∣\left|\frac1x - \frac1y\right| = \frac{|x - y|}{xy} \le |x - y|. xy≥1xy \ge 1, so dividing by xyxy can only shrink the number.
    5. Choose δ\delta. Let ε>0\varepsilon > 0 and δ=ε\delta = \varepsilon. If ∣x−y∣<δ|x - y| < \delta, then ∣1x−1y∣≤∣x−y∣<ε\left|\frac1x - \frac1y\right| \le |x - y| < \varepsilon. This δ\delta mentions only ε\varepsilon, not xx or yy. That is what “uniform” means.

    Answer. Not uniformly continuous on (0,1)(0, 1). Uniformly continuous on [1,∞)[1, \infty). ■\blacksquare Note that [1,∞)[1, \infty) is not bounded, so Heine–Cantor does not apply there, but the direct proof works.

    Your answerf(x)=x2f(x) = x^2 on [−10,10][-10, 10]. The bound ∣x2−y2∣=∣x−y∣ ∣x+y∣≤20∣x−y∣|x^2 - y^2| = |x - y|\,|x + y| \le 20|x - y| lets one δ\delta work everywhere. For ε=0.01\varepsilon = 0.01, what is the δ=ε20\delta = \frac{\varepsilon}{20}?
    Quick checkWhich of these functions is uniformly continuous on its whole domain?
    A preview· Preview: integrals of continuous functions

    Chapter 1.5 proves every continuous function on [a,b][a, b] is integrable. The key step: uniform continuity gives one δ\delta such that on every small piece of width δ\delta the function varies by less than ε\varepsilon, so upper and lower sums differ by at most ε(b−a)\varepsilon(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∣|x - y| by a distance in any space and the closed interval [a,b][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.10.1 whenever the time changes by less than δ\delta seconds. Then reading it every δ\delta seconds, it never moves by 0.10.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 aa, δ\delta is chosen after ε\varepsilon and aa, before xx. “Let δ=∣x−a∣/2\delta = |x - a|/2” is meaningless: xx is not known yet.

    Watch out· Closed and bounded matters

    The extreme value theorem fails on (0,1](0, 1] for 1x\frac1x and on [0,∞)[0, \infty) for xx. Check that the interval is closed and bounded before using it.

    Watch out· The limit at a ignores the value at a

    lim⁡x→af(x)\lim_{x \to a} f(x) never looks at f(a)f(a); continuity is the extra demand that the two agree. A function can have a limit at aa and still be discontinuous there (a removable discontinuity).

    Watch out· A δ for one ε is not a proof

    Finding that δ=0.05\delta = 0.05 works for ε=0.1\varepsilon = 0.1 proves nothing about continuity. The definition demands a δ\delta for EVERY ε\varepsilon, so the proof must say “Let ε>0\varepsilon > 0 be arbitrary” and give a rule such as δ=min⁡(1,ε5)\delta = \min(1, \frac\varepsilon5) that works for all of them. Likewise, a numerical check that f(x)f(x) is close to f(a)f(a) for a few xx near aa is evidence, not proof.

    Watch out· Uniform continuity depends on the set

    x2x^2 is uniformly continuous on [0,5][0, 5] and not on R\mathbb R. When asked “is ff uniformly continuous?”, always ask “on which set?”. On a closed bounded interval the answer is yes whenever ff is continuous. Elsewhere you must check by hand.

    Problems

    check

    For f(x)=2x+5f(x) = 2x + 5 at a=1a = 1 and ε=0.1\varepsilon = 0.1, find a δ\delta that works.

    Solution

    ∣f(x)−f(1)∣=2∣x−1∣<0.1|f(x) - f(1)| = 2|x - 1| < 0.1 when ∣x−1∣<0.05|x - 1| < 0.05. So δ=0.05\delta = 0.05 (or anything smaller).

    check

    Write the negation of ”ff is continuous at aa”.

    Solution

    ∃ε>0 ∀δ>0 ∃x: ∣x−a∣<δ∧∣f(x)−f(a)∣≥ε\exists \varepsilon > 0\ \forall \delta > 0\ \exists x:\ |x - a| < \delta \land |f(x) - f(a)| \ge \varepsilon.

    check

    Does the intermediate value theorem apply to f(x)=1xf(x) = \frac1x on [−1,1][-1, 1], where f(−1)=−1<0<1=f(1)f(-1) = -1 < 0 < 1 = f(1)?

    Solution

    No: ff is not defined (so not continuous) at 0, which is in the interval. Indeed 1x\frac1x is never 0.

    useAbbott Exercise 4.3.2 style

    Prove f(x)=x2+xf(x) = x^2 + x is continuous at a=1a = 1 with an explicit δ\delta.

    Solution

    Scratch: x2+x−2=(x−1)(x+2)x^2 + x - 2 = (x - 1)(x + 2), so ∣f(x)−2∣=∣x−1∣ ∣x+2∣|f(x) - 2| = |x - 1|\,|x + 2|. If δ≤1\delta \le 1 then 0<x<20 < x < 2 and 2<x+2<42 < x + 2 < 4, so ∣x+2∣<4|x + 2| < 4 and ∣f(x)−2∣<4∣x−1∣|f(x) - 2| < 4|x - 1|. That is at most ε\varepsilon when ∣x−1∣≤ε4|x - 1| \le \frac\varepsilon4. Write-up: given ε>0\varepsilon > 0, take δ=min⁡(1,ε4)\delta = \min(1, \frac\varepsilon4). If ∣x−1∣<δ|x - 1| < \delta, then ∣x+2∣<4|x + 2| < 4 and ∣f(x)−2∣=∣x−1∣ ∣x+2∣<4δ≤ε|f(x) - 2| = |x - 1|\,|x + 2| < 4\delta \le \varepsilon.

    use

    Prove f(x)=xf(x) = \sqrt x is continuous at a=4a = 4. (Hint: x−2=x−4x+2\sqrt x - 2 = \frac{x - 4}{\sqrt x + 2}.)

    Solution

    ∣x−2∣=∣x−4∣x+2≤∣x−4∣2|\sqrt x - 2| = \frac{|x - 4|}{\sqrt x + 2} \le \frac{|x - 4|}2, since x+2≥2\sqrt x + 2 \ge 2 for x≥0x \ge 0. So δ=2ε\delta = 2\varepsilon works. Here xx ranges over the domain [0,∞)[0, \infty) only, so nothing more is needed.

    use

    Show cos⁡x=x\cos x = x has a solution in [0,π2][0, \frac\pi2].

    Solution

    g(x)=cos⁡x−xg(x) = \cos x - x is continuous, g(0)=1>0g(0) = 1 > 0, g(π2)=−π2<0g(\frac\pi2) = -\frac\pi2 < 0. By the IVT, g(c)=0g(c) = 0 for some c∈(0,π2)c \in (0, \frac\pi2), so cos⁡c=c\cos c = c (about 0.739).

    prove

    Prove: if ff and gg are continuous at aa, then so is f+gf + g. Do it twice: with ε\varepsilon and δ\delta, and with the sequential criterion.

    Solution

    ε\varepsilon-δ\delta: given ε\varepsilon, choose δ1,δ2\delta_1, \delta_2 for f,gf, g with ε2\frac\varepsilon2; with δ=min⁡(δ1,δ2)\delta = \min(\delta_1, \delta_2), ∣(f+g)(x)−(f+g)(a)∣≤∣f(x)−f(a)∣+∣g(x)−g(a)∣<ε|(f+g)(x) - (f+g)(a)| \le |f(x) - f(a)| + |g(x) - g(a)| < \varepsilon. Sequential: if xn→ax_n \to a then f(xn)→f(a)f(x_n) \to f(a) and g(xn)→g(a)g(x_n) \to g(a), so their sum tends to f(a)+g(a)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]f: [0, 1] \to [0, 1] has a point cc with f(c)=cf(c) = c.

    Solution

    Let g(x)=f(x)−xg(x) = f(x) - x, continuous. g(0)=f(0)≥0g(0) = f(0) \ge 0 and g(1)=f(1)−1≤0g(1) = f(1) - 1 \le 0. If either is 0 we are done; otherwise g(0)>0>g(1)g(0) > 0 > g(1) and the IVT gives cc with g(c)=0g(c) = 0.

    prove

    Prove f(x)=1xf(x) = \frac1x is not uniformly continuous on (0,1)(0, 1), but is uniformly continuous on [1,∞)[1, \infty).

    Solution

    Not on (0,1)(0, 1): take ε=1\varepsilon = 1; given δ>0\delta > 0, let t=min⁡(δ,12)t = \min(\delta, \frac12), x=tx = t, y=t2y = \frac t2 (both in (0,1)(0, 1)): ∣x−y∣=t2<δ|x - y| = \frac t2 < \delta and ∣1y−1x∣=1t≥2≥1|\frac1y - \frac1x| = \frac1t \ge 2 \ge 1. On [1,∞)[1, \infty): ∣1x−1y∣=∣x−y∣xy≤∣x−y∣|\frac1x - \frac1y| = \frac{|x - y|}{xy} \le |x - y|, so δ=ε\delta = \varepsilon works everywhere.

    prove

    Prove that if ff is continuous at aa and f(a)>0f(a) > 0, then f(x)>0f(x) > 0 for all xx in some interval around aa.

    Solution

    Take ε=f(a)>0\varepsilon = f(a) > 0 in the definition: there is δ\delta with ∣f(x)−f(a)∣<f(a)|f(x) - f(a)| < f(a) for ∣x−a∣<δ|x - a| < \delta, so f(x)>0f(x) > 0 there. (This was the key step in the IVT proof.)

    stretchclassic

    Let f(x)=xf(x) = x if xx is rational and f(x)=0f(x) = 0 if xx is irrational. Prove ff is continuous at 0 and at no other point.

    Solution

    At 0: ∣f(x)−0∣≤∣x∣|f(x) - 0| \le |x|, so δ=ε\delta = \varepsilon works. At a≠0a \ne 0: if aa is rational, take irrationals xn→ax_n \to a (density of irrationals, 1.1 problem); f(xn)=0↛a=f(a)f(x_n) = 0 \not\to a = f(a). If aa is irrational, take rationals qn→aq_n \to a (density of Q\mathbb Q); f(qn)=qn→a≠0=f(a)f(q_n) = q_n \to a \ne 0 = f(a). Either way the sequential criterion fails.

    stretch

    Prove that a continuous f:R→Rf: \mathbb R \to \mathbb R with f(x+y)=f(x)+f(y)f(x + y) = f(x) + f(y) for all x,yx, y is f(x)=cxf(x) = cx with c=f(1)c = f(1). (Hint: prove it for integers, then rationals, then use density and continuity.)

    Solution

    f(0)=0f(0) = 0 (put x=y=0x = y = 0). Induction gives f(n)=ncf(n) = nc for n∈Nn \in \mathbb N; f(−x)=−f(x)f(-x) = -f(x) gives integers. For q=mnq = \frac mn: nf(mn)=f(m)=mcn f(\frac mn) = f(m) = mc, so f(q)=qcf(q) = qc. For real xx, take rationals qn→xq_n \to x; continuity gives f(x)=lim⁡f(qn)=lim⁡qnc=xcf(x) = \lim f(q_n) = \lim q_n c = xc. (This is why additive and continuous means linear, as in chapter 2.3.)

    Summary

    • lim⁡x→af(x)=L\lim_{x \to a} f(x) = L: for every ε>0\varepsilon > 0 there is δ>0\delta > 0 with ∣f(x)−L∣<ε|f(x) - L| < \varepsilon whenever 0<∣x−a∣<δ0 < |x - a| < \delta. Continuity at aa: the same with L=f(a)L = f(a) and x=ax = a allowed.
    • Finding δ\delta: factor out ∣x−a∣|x - a|, bound the leftover factor by first restricting δ≤1\delta \le 1, then take δ=min⁡(1,… )\delta = \min(1, \dots).
    • Sequential criterion: continuous at aa iff xn→ax_n \to a implies f(xn)→f(a)f(x_n) \to f(a). Best tool for proving discontinuity.
    • Intermediate value theorem: proved with c=sup⁡{x:f(x)<0}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 δ\delta for all points. Continuous on [a,b][a, b] implies uniformly continuous; x2x^2 on R\mathbb R and 1x\frac1x on (0,1)(0, 1) are not.

    Watch and read

    The same ideas explained by someone else. Use these when an explanation here does not land.

    Where this sits

    Comes from
    1.2 Sequences and limits, from zero
    Leads to
    1.4 The derivative as best linear approximation
    1.5 The Riemann integral: area as a limit
    Same idea elsewhere
    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.