Skip to content

Continuity

Let f:D→Rf : D \to \mathbb{R} where D⊆RD \subseteq \mathbb{R}. We say lim⁡x→af(x)=L\lim_{x \to a} f(x) = L if for Every ε>0\varepsilon > 0There exists δ>0\delta > 0 such that

0<∣x−a∣<δ  ⟹  ∣f(x)−L∣<ε0 \lt |x - a| \lt \delta \implies |f(x) - L| \lt \varepsilon

Definition. ff is continuous at aa if lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a). In epsilon-delta form: For every ε>0\varepsilon > 0There exists δ>0\delta > 0 such that

∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε|x - a| \lt \delta \implies |f(x) - f(a)| \lt \varepsilon

Remark. A function is continuous on a set EE if it is continuous at every point of EE. A function is globally continuous (or “continuous”) if it is continuous on its entire domain.

Definition. ff is discontinuous at aa if it is not continuous at aa. Discontinuities are Classified as:

  • Removable: lim⁡x→af(x)\lim_{x \to a} f(x) exists but does not equal f(a)f(a) (or f(a)f(a) is undefined).
  • Jump: lim⁡x→a−f(x)\lim_{x \to a^-} f(x) and lim⁡x→a+f(x)\lim_{x \to a^+} f(x) both exist but are unequal.
  • Essential (or infinite/oscillatory): At least one one-sided limit does not exist.

Proposition 4.3. Polynomials are continuous on R\mathbb{R}. Rational functions p(x)/q(x)p(x)/q(x) are Continuous wherever q(x)≠0q(x) \neq 0. The functions sin⁡x\sin x, cos⁡x\cos x, exe^x, ln⁡x\ln x are continuous On their domains.

Theorem 4.1 (Algebra of Continuous Functions). If ff and gg are continuous at aaThen f+gf+g f−gf-g, fgfgAnd (where defined) f/gf/g are continuous at aa.

Theorem 4.2. Compositions of continuous functions are continuous: if ff is continuous at aa and gg is continuous at f(a)f(a)Then g∘fg \circ f is continuous at aa.

4.2a Sequential Characterization of Limits and Continuity

Section titled “4.2a Sequential Characterization of Limits and Continuity”

The epsilon-delta definitions can be reformulated in terms of sequences, which is often more Convenient for …/1-number-and-algebra/3_proof-and-logics.

Proposition 4.2a (Sequential Criterion for Limits). lim⁡x→cf(x)=L\lim_{x \to c} f(x) = L if and only if For every sequence (xn)(x_n) with xn→cx_n \to c and xn≠cx_n \neq c for all nnWe have f(xn)→Lf(x_n) \to L.

Proof. (⇒\Rightarrow) Let ε>0\varepsilon > 0. Choose δ>0\delta > 0 from the ε\varepsilon-δ\delta definition. Since xn→cx_n \to cThere exists NN with ∣xn−c∣<δ|x_n - c| \lt \delta for n≥Nn \geq N. Then ∣f(xn)−L∣<ε|f(x_n) - L| \lt \varepsilon for n≥Nn \geq N.

(⇐\Leftarrow) Suppose the ε\varepsilon-δ\delta condition fails. Then there exists ε>0\varepsilon > 0 such That for every n∈Nn \in \mathbb{N}There exists xnx_n with 0<∣xn−c∣<1/n0 \lt |x_n - c| \lt 1/n but ∣f(xn)−L∣≥ε|f(x_n) - L| \geq \varepsilon. Then xn→cx_n \to c but f(xn)↛Lf(x_n) \not\to LContradicting the hypothesis. ■\blacksquare

Corollary 4.2b. ff is continuous at cc if and only if for every sequence (xn)(x_n) with xn→cx_n \to c We have f(xn)→f(c)f(x_n) \to f(c).

This is especially useful for proving that a function is not continuous: find one sequence Converging to cc whose image does not converge to f(c)f(c).

Theorem 4.3 (IVT). If f:[a,b]→Rf : [a,b] \to \mathbb{R} is continuous and f(a)<y<f(b)f(a) \lt y \lt f(b) (or f(b)<y<f(a)f(b) \lt y \lt f(a)), then there exists c∈(a,b)c \in (a,b) such that f(c)=yf(c) = y.

Proof. Assume f(a)<y<f(b)f(a) \lt y \lt f(b). Let S={x∈[a,b]:f(x)<y}S = \{x \in [a,b] : f(x) \lt y\}. Since a∈Sa \in S SS is non-empty and bounded above by bb. Let c=sup⁡(S)c = \sup(S). We show f(c)=yf(c) = y.

If f(c)<yf(c) \lt yThen by continuity at ccThere exists δ>0\delta > 0 such that f(x)<yf(x) \lt y for x∈(c−δ,c+δ)x \in (c - \delta, c + \delta). But then c+δ/2∈Sc + \delta/2 \in SContradicting that c=sup⁡(S)c = \sup(S).

If f(c)>yf(c) > yThen by continuity, there exists δ>0\delta > 0 such that f(x)>yf(x) > y for x∈(c−δ,c+δ)x \in (c - \delta, c + \delta). But then c−δ/2c - \delta/2 is an upper bound for SSContradicting That c=sup⁡(S)c = \sup(S).

Therefore f(c)=yf(c) = y. ■\blacksquare

Alternative …/1-number-and-algebra/3_proof-and-logic (bisection). Set a0=aa_0 = a, b0=bb_0 = b. Given [an,bn][a_n, b_n] with f(an)<y<f(bn)f(a_n) \lt y \lt f(b_n) Let mn=(an+bn)/2m_n = (a_n + b_n)/2. If f(mn)≥yf(m_n) \geq ySet an+1=ana_{n+1} = a_n, bn+1=mnb_{n+1} = m_n. If f(mn)<yf(m_n) \lt y Set an+1=mna_{n+1} = m_n, bn+1=bnb_{n+1} = b_n. Either way, f(an)<y≤f(bn)f(a_n) \lt y \leq f(b_n) and bn−an=(b−a)/2n→0b_n - a_n = (b-a)/2^n \to 0. By the nested interval property, an→ca_n \to c and bn→cb_n \to c. By continuity, f(c)=lim⁡f(an)≤yf(c) = \lim f(a_n) \leq y And f(c)=lim⁡f(bn)≥yf(c) = \lim f(b_n) \geq ySo f(c)=yf(c) = y. ■\blacksquare

Theorem 4.4 (EVT). If f:[a,b]→Rf : [a,b] \to \mathbb{R} is continuous, then ff attains its maximum and Minimum on [a,b][a,b]: there exist c1,c2∈[a,b]c_1, c_2 \in [a,b] such that f(c1)≤f(x)≤f(c2)f(c_1) \leq f(x) \leq f(c_2) for all x∈[a,b]x \in [a,b].

Proof. We first show ff is bounded. Suppose not; then for each n∈Nn \in \mathbb{N}There exists xn∈[a,b]x_n \in [a,b] with ∣f(xn)∣>n|f(x_n)| > n. By Bolzano-Weierstrass, (xn)(x_n) has a convergent subsequence xnk→c∈[a,b]x_{n_k} \to c \in [a,b]. By continuity, f(xnk)→f(c)f(x_{n_k}) \to f(c)So (f(xnk))(f(x_{n_k})) is bounded. But ∣f(xnk)∣>nk→∞|f(x_{n_k})| > n_k \to \inftyA contradiction.

Now we show ff attains its supremum. Let M=sup⁡{f(x):x∈[a,b]}M = \sup\{f(x) : x \in [a,b]\}. For each nnChoose xn∈[a,b]x_n \in [a,b] with f(xn)>M−1/nf(x_n) > M - 1/n. By Bolzano-Weierstrass, (xn)(x_n) has a subsequence xnk→c∈[a,b]x_{n_k} \to c \in [a,b]. By continuity, f(c)=lim⁡f(xnk)f(c) = \lim f(x_{n_k}). Since M−1/nk<f(xnk)≤MM - 1/n_k \lt f(x_{n_k}) \leq M for all kkThe squeeze theorem gives f(c)=Mf(c) = M. The argument for the infimum is similar (consider −f-f). ■\blacksquare

Definition. ff is uniformly continuous on DD if for every ε>0\varepsilon > 0There exists δ>0\delta > 0 such that for all x,y∈Dx, y \in D:

∣x−y∣<δ  ⟹  ∣f(x)−f(y)∣<ε|x - y| \lt \delta \implies |f(x) - f(y)| \lt \varepsilon

The key distinction: for ordinary continuity, δ\delta may depend on both ε\varepsilon and the point aa; for uniform continuity, δ\delta depends only on ε\varepsilon.

Theorem 4.5 (Heine-Cantor). If f:[a,b]→Rf : [a,b] \to \mathbb{R} is continuous on the closed, bounded Interval [a,b][a,b]Then ff is uniformly continuous on [a,b][a,b].

Proof. Suppose ff is continuous on [a,b][a,b] but not uniformly continuous. Then there exists ε>0\varepsilon > 0 such that for every n∈Nn \in \mathbb{N}There exist xn,yn∈[a,b]x_n, y_n \in [a,b] with ∣xn−yn∣<1/n|x_n - y_n| \lt 1/n but ∣f(xn)−f(yn)∣≥ε|f(x_n) - f(y_n)| \geq \varepsilon.

By the Bolzano-Weierstrass theorem, (xn)(x_n) has a convergent subsequence xnk→c∈[a,b]x_{n_k} \to c \in [a,b]. Since ∣xnk−ynk∣<1/nk→0|x_{n_k} - y_{n_k}| \lt 1/n_k \to 0We have ynk→cy_{n_k} \to c as well.

By continuity of ff at cc: there exists δ>0\delta > 0 such that ∣x−c∣<δ|x - c| \lt \delta implies ∣f(x)−f(c)∣<ε/2|f(x) - f(c)| \lt \varepsilon/2. For kk sufficiently large, ∣xnk−c∣<δ|x_{n_k} - c| \lt \delta and ∣ynk−c∣<δ|y_{n_k} - c| \lt \deltaSo:

∣f(xnk)−f(ynk)∣≤∣f(xnk)−f(c)∣+∣f(ynk)−f(c)∣<ε/2+ε/2=ε|f(x_{n_k}) - f(y_{n_k})| \leq |f(x_{n_k}) - f(c)| + |f(y_{n_k}) - f(c)| \lt \varepsilon/2 + \varepsilon/2 = \varepsilon

Contradicting ∣f(xnk)−f(ynk)∣≥ε|f(x_{n_k}) - f(y_{n_k})| \geq \varepsilon. ■\blacksquare

Problem. Prove that f(x)=xf(x) = \sqrt{x} is uniformly continuous on [0,∞)[0, \infty).

Solution. For x,y≥0x, y \geq 0: ∣x−y∣=∣x−y∣x+y≤∣x−y∣1/2|\sqrt{x} - \sqrt{y}| = \frac{|x - y|}{\sqrt{x} + \sqrt{y}} \leq |x - y|^{1/2}.

Given ε>0\varepsilon > 0Choose δ=ε2\delta = \varepsilon^2. Then ∣x−y∣<δ|x - y| \lt \delta implies ∣x−y∣≤∣x−y∣<δ=ε|\sqrt{x} - \sqrt{y}| \leq \sqrt{|x-y|} \lt \sqrt{\delta} = \varepsilon. Since δ\delta depends Only on ε\varepsilonThe continuity is uniform. ■\blacksquare

Worked Example: $\varepsilon$-$\delta$ .../1-number-and-algebra/3_proof-and-logic that $f(x) = 3x - 1$ is continuous at $x = 2$

Solution. We have f(2)=5f(2) = 5. Let ε>0\varepsilon > 0. We need to find δ>0\delta > 0 such that ∣x−2∣<δ|x - 2| \lt \delta implies ∣f(x)−5∣<ε|f(x) - 5| \lt \varepsilon.

Compute: ∣f(x)−5∣=∣(3x−1)−5∣=∣3x−6∣=3∣x−2∣|f(x) - 5| = |(3x - 1) - 5| = |3x - 6| = 3|x - 2|.

Choose δ=ε/3\delta = \varepsilon/3. Then ∣x−2∣<δ|x - 2| \lt \delta implies ∣f(x)−5∣=3∣x−2∣<3⋅ε/3=ε|f(x) - 5| = 3|x - 2| \lt 3 \cdot \varepsilon/3 = \varepsilon. ■\blacksquare

Worked Example: $\varepsilon$-$\delta$ .../1-number-and-algebra/3_proof-and-logic that $f(x) = x^2$ is continuous at $x = 3$

Solution. We have f(3)=9f(3) = 9. Let ε>0\varepsilon > 0. Compute:

∣f(x)−9∣=∣x2−9∣=∣x+3∣⋅∣x−3∣|f(x) - 9| = |x^2 - 9| = |x + 3| \cdot |x - 3|

Restrict to δ≤1\delta \leq 1So ∣x−3∣<1|x - 3| \lt 1 means 2<x<42 \lt x \lt 4Giving ∣x+3∣<7|x + 3| \lt 7.

Choose δ=min⁡(1,ε/7)\delta = \min(1, \varepsilon/7). Then ∣x−3∣<δ|x - 3| \lt \delta implies:

∣x2−9∣=∣x+3∣⋅∣x−3∣<7⋅ε7=ε|x^2 - 9| = |x + 3| \cdot |x - 3| \lt 7 \cdot \frac{\varepsilon}{7} = \varepsilon

■\blacksquare

Worked Example: Show $f(x) = 1/x$ is NOT uniformly continuous on $(0, 1)$

Solution. We show the negation of uniform continuity. Take ε=1\varepsilon = 1. For any δ>0\delta > 0 Choose n∈Nn \in \mathbb{N} with 1/n<δ1/n \lt \delta. Set x=1/nx = 1/n and y=1/(2n)y = 1/(2n). Then ∣x−y∣=1/(2n)<1/n<δ|x - y| = 1/(2n) \lt 1/n \lt \deltaBut:

∣f(x)−f(y)∣=∣11/n−11/(2n)∣=∣n−2n∣=n≥1=ε|f(x) - f(y)| = \left|\frac{1}{1/n} - \frac{1}{1/(2n)}\right| = |n - 2n| = n \geq 1 = \varepsilon

So no single δ\delta works for all x,y∈(0,1)x, y \in (0,1). ■\blacksquare

Worked Example: Use the sequential criterion to show $f(x) = \sin(1/x)$ has no limit as $x \to 0$

Solution. Consider the sequences xn=1/(2nπ)x_n = 1/(2n\pi) and yn=1/(2nπ+π/2)y_n = 1/(2n\pi + \pi/2). Both converge to 00. But f(xn)=sin⁡(2nπ)=0f(x_n) = \sin(2n\pi) = 0 and f(yn)=sin⁡(2nπ+π/2)=1f(y_n) = \sin(2n\pi + \pi/2) = 1 for all nn.

So f(xn)→0f(x_n) \to 0 and f(yn)→1f(y_n) \to 1. By the sequential criterion, if lim⁡x→0f(x)\lim_{x \to 0} f(x) existed, Both subsequences would converge to the same limit. Since they don”t, the limit does not exist. ■\blacksquare

Worked Example: Prove $f(x) = x \sin(1/x)$ (with $f(0) = 0$) is continuous everywhere

Solution. For x≠0x \neq 0, ff is a product of continuous functions, hence continuous.

At x=0x = 0: let ε>0\varepsilon > 0. Choose δ=ε\delta = \varepsilon. For ∣x−0∣=∣x∣<δ|x - 0| = |x| \lt \delta:

∣f(x)−f(0)∣=∣xsin⁡(1/x)∣≤∣x∣<δ=ε|f(x) - f(0)| = |x \sin(1/x)| \leq |x| \lt \delta = \varepsilon

So ff is continuous at 00. Since ff extends continuously from (0,1](0, 1] to [0,1][0, 1]The Heine-Cantor Theorem implies ff is uniformly continuous on [0,1][0, 1]. ■\blacksquare

Worked Example: $\varepsilon$-$\delta$ .../1-number-and-algebra/3_proof-and-logic that $f(x) = \sin x$ is continuous at every $a \in \mathbb{R}$

Solution. We use the identity ∣sin⁡u−sin⁡v∣≤∣u−v∣|\sin u - \sin v| \leq |u - v| for all u,v∈Ru, v \in \mathbb{R}. (Proof: ∣sin⁡u−sin⁡v∣=2∣cos⁡((u+v)/2)sin⁡((u−v)/2)∣≤2∣sin⁡((u−v)/2)∣≤∣u−v∣|\sin u - \sin v| = 2|\cos((u+v)/2)\sin((u-v)/2)| \leq 2|\sin((u-v)/2)| \leq |u - v| Using ∣sin⁡t∣≤∣t∣|\sin t| \leq |t| and ∣cos⁡∣≤1|\cos| \leq 1.)

Let ε>0\varepsilon > 0 and a∈Ra \in \mathbb{R}. Choose δ=ε\delta = \varepsilon. For ∣x−a∣<δ|x - a| \lt \delta:

∣sin⁡x−sin⁡a∣≤∣x−a∣<δ=ε|\sin x - \sin a| \leq |x - a| \lt \delta = \varepsilon

Since δ=ε\delta = \varepsilon works independently of aa, sin⁡x\sin x is actually uniformly continuous On R\mathbb{R}. The same argument works for cos⁡x\cos x. ■\blacksquare

Worked Example: $\varepsilon$-$\delta$ .../1-number-and-algebra/3_proof-and-logic that $f(x) = e^x$ is continuous at every $a \in \mathbb{R}$

Solution. We use the inequality ∣eu−ev∣≤emax⁡(u,v)∣u−v∣|e^u - e^v| \leq e^{\max(u,v)} |u - v|Which follows from the Mean Value Theorem applied to ete^t: eu−ev=eξ(u−v)e^u - e^v = e^\xi (u - v) for some ξ\xi between uu and vv So ∣eu−ev∣=eξ∣u−v∣≤emax⁡(u,v)∣u−v∣|e^u - e^v| = e^\xi |u - v| \leq e^{\max(u,v)} |u - v|.

Let ε>0\varepsilon > 0 and a∈Ra \in \mathbb{R}. Restrict to ∣x−a∣<1|x - a| \lt 1So x<a+1x \lt a + 1 and emax⁡(x,a)≤ea+1e^{\max(x,a)} \leq e^{a+1}. Choose δ=min⁡(1,ε/ea+1)\delta = \min(1, \varepsilon / e^{a+1}). For ∣x−a∣<δ|x - a| \lt \delta:

∣ex−ea∣≤ea+1∣x−a∣<ea+1⋅εea+1=ε|e^x - e^a| \leq e^{a+1} |x - a| \lt e^{a+1} \cdot \frac{\varepsilon}{e^{a+1}} = \varepsilon

■\blacksquare

If you get this wrong, revise: Section 4.2 (Continuity), Section 5.3 (Mean Value Theorem).

:::caution Common Pitfall Continuity on (a,b)(a, b) does not imply uniform continuity. The function f(x)=1/xf(x) = 1/x on (0,1)(0, 1) is Continuous but not uniformly continuous. The Heine-Cantor theorem requires a closed and bounded Interval. Also, a function can be uniformly continuous on an unbounded domain (e.g., f(x)=xf(x) = \sqrt{x} On [0,∞)[0, \infty)) --- boundedness of the domain is sufficient but not necessary.

:::