MAT158H1/Unit 04
Unit 04 · Analysis 1A

Continuous Functions

Continuity is "no sudden jumps," made precise with ε–δ. It is the hypothesis that powers the three hard theorems of the next unit — and this unit builds the small lemmas those proofs will quietly rely on.

By the end you can
Why it matters & where it comes from
Why it exists

Almost every useful theorem about functions assumes continuity. Pinning down exactly what it means is what lets those theorems be proved rather than believed.

In the real world

Continuity is the "small change in input gives small change in output" assumption behind stable control systems, well-posed physics models, and convergent numerical methods.

Story & open questions

Bolzano and Cauchy gave the modern definition in the early 1800s. Pathologies soon followed — functions continuous at exactly one point, or continuous exactly at the irrationals — showing how much the precise definition was needed.

Definition

Definition Continuity at a point

$f$ is continuous at $a$ if $a$ is in the domain and $\displaystyle\lim_{x\to a}f(x)=f(a)$. Spelled out: $\forall\varepsilon>0\ \exists\delta>0$ such that $|x-a|<\delta\Rightarrow|f(x)-f(a)|<\varepsilon$. On an interval, $f$ is continuous if it is continuous at every point (one-sidedly at included endpoints).

Note the small change from the limit definition: the clause $0<|x-a|$ is gone, because now $f(a)$ itself must fit the tolerance — trivially true at $x=a$.

Example Directly from ε–δ

$\sqrt{x}$ is continuous at every $a>0$.

$|\sqrt x-\sqrt a|=\dfrac{|x-a|}{\sqrt x+\sqrt a} \le\dfrac{|x-a|}{\sqrt a}$.
Given $\varepsilon>0$, take $\delta=\min\{a,\sqrt a\,\varepsilon\}$ (the $a$ keeps $x>0$). Then $|\sqrt x-\sqrt a|<\varepsilon$. ∎ (At $a=0$, use the one-sided version with $\delta=\varepsilon^2$.)

Building continuous functions

Theorem Algebra of continuity

If $f,g$ are continuous at $a$, so are $f+g$, $fg$, and (when $g(a)\ne0$) $f/g$. Consequently polynomials are continuous everywhere and rational functions are continuous wherever defined.

These all follow from the limit laws of Unit 3 — no new ε work needed. The one genuinely new proof is composition:

Theorem Composition

If $g$ is continuous at $a$ and $f$ is continuous at $g(a)$, then $f\circ g$ is continuous at $a$.

Proof
Given $\varepsilon>0$, continuity of $f$ at $g(a)$ gives $\eta>0$ with $|y-g(a)|<\eta\Rightarrow|f(y)-f(g(a))|<\varepsilon$.
Continuity of $g$ at $a$ gives $\delta>0$ with $|x-a|<\delta\Rightarrow|g(x)-g(a)|<\eta$. Chain them: $|x-a|<\delta\Rightarrow|f(g(x))-f(g(a))|<\varepsilon$. ∎

The sign-preservation lemma

Lemma

If $f$ is continuous at $a$ and $f(a)>0$, then there is $\delta>0$ with $f(x)>\tfrac{f(a)}2>0$ for all $x$ with $|x-a|<\delta$. (Similarly for $f(a)<0$.)

Proof
Take $\varepsilon=\tfrac{f(a)}2$ in the definition: there is $\delta>0$ with $|f(x)-f(a)|<\tfrac{f(a)}2$ near $a$.
Then $f(x)>f(a)-\tfrac{f(a)}2=\tfrac{f(a)}2$. ∎
Why this little lemma matters A continuous function cannot be positive at a point and vanish arbitrarily close by. This is the hinge of the Intermediate Value Theorem proof in Unit 5, and of the "$f>0$ on a neighbourhood" arguments all over analysis.

Patched and pathological functions

Example A good patch

$f(x)=x\sin(1/x)$ for $x\ne0$, $f(0)=0$. Since $|f(x)|\le|x|\to0$, $\lim_{x\to0}f=0=f(0)$: continuous at $0$ (and everywhere else by the algebra and composition theorems).

Example Continuous at exactly one point

Let $g(x)=x$ for rational $x$ and $g(x)=0$ for irrational $x$.

At $0$: $|g(x)|\le|x|$, so $g$ is continuous at $0$ with $\delta=\varepsilon$.
At $a\ne0$: every interval around $a$ contains rationals (where $g\approx a$) and irrationals (where $g=0$), values that stay $\approx|a|$ apart — so no limit exists, and $g$ is discontinuous. ∎

Discontinuities come in kinds: removable (limit exists but differs from $f(a)$ or $f(a)$ undefined), jump (one-sided limits exist but disagree), and essential (a one-sided limit fails to exist, as with $\sin(1/x)$ at $0$).

Common pitfalls

• Continuity at $a$ needs three things: $f(a)$ defined, the limit exists, and they are equal.
• A removable discontinuity is still a discontinuity until you actually redefine $f(a)$.
• For $f\circ g$, the outer function must be continuous at $g(a)$ — not at $a$.
• "Continuous on $[a,b]$" means one-sided continuity at the endpoints; this matters for the theorems of Unit 5.

Practice

Original problems written for this guide in the style of Spivak's exercises. Write a full solution before opening the answer.

Practice 1 · A patched function

Where is $f(x)=\dfrac{x^2-1}{x-1}$ (with $f(1)=2$) continuous?

Answer
Everywhere: for $x\ne1$ it equals $x+1$, and the limit at $1$ is $2=f(1)$.
Practice 2 · Algebra

Prove the sum of two functions continuous at $a$ is continuous at $a$.

Solution
By the sum law for limits, $\lim(f+g)=\lim f+\lim g=f(a)+g(a)=(f+g)(a)$.
Practice 3 · Dirichlet

Is the Dirichlet function ($1$ on rationals, $0$ on irrationals) continuous anywhere?

Answer
Nowhere: every interval contains both rationals and irrationals, so near any point the values $0$ and $1$ both occur and no limit exists.
Practice 4 · Sign preservation

Prove: if $f$ is continuous at $a$ and $f(a)\ne0$, then $f$ is nonzero on some open interval around $a$.

Solution
Say $f(a)>0$. With $\varepsilon=\tfrac{f(a)}2$, some $\delta$-interval has $|f(x)-f(a)|<\tfrac{f(a)}2$, so $f(x)>\tfrac{f(a)}2>0$ there. For $f(a)<0$ apply this to $-f$.
Practice 5 · One good point

Show $g(x)=x$ for $x\in\mathbb{Q}$, $g(x)=0$ otherwise, is continuous at $0$ and nowhere else.

Solution
At $0$: $|g(x)|\le|x|<\varepsilon$ once $|x|<\delta=\varepsilon$. At $a\ne0$: rationals near $a$ give values near $a$, irrationals give $0$; these stay about $|a|$ apart, so no limit exists.
Practice 6 · Density argument

Suppose $f$ is continuous on $\mathbb{R}$ and $f(q)=0$ for every rational $q$. Prove $f(x)=0$ for all $x$.

Solution
If $f(a)\ne0$ at some $a$, sign preservation gives an open interval around $a$ on which $f$ is never $0$. But every open interval contains a rational, where $f=0$ — contradiction.
Practice 7 · Absolute value

Prove: if $f$ is continuous at $a$, so is $|f|$.

Solution
By the reverse triangle inequality, $\big||f(x)|-|f(a)|\big|\le|f(x)-f(a)|$, so the same $\delta$ that works for $f$ works for $|f|$.
Practice 8 · Matching a parameter

For which $c$ is $f$ continuous at $1$, where $f(x)=x^2$ for $x\le1$ and $f(x)=cx$ for $x>1$?

Answer
$f(1)=1$ and the right-hand limit is $c$; continuity needs $c=1$.

Expanded topic checklist

Course coverage. This unit is part of the complete MAT158H1 topic map. It should cover the following items before you move on:

Textbook/source alignment

Use the current UofT MAT158H1 calendar topics as the coverage spine, and pair lecture notes with a Spivak-style proof-calculus text for extra reading. The exact assigned textbook should still be checked against the instructor syllabus.

Core theorem map

The continuity spine is: local limit equality at every point, algebra and composition preserve it, and interval/compactness theorems give global conclusions.

Study routine. When a function is piecewise, check the formula inside each piece and then check the boundary points with one-sided limits.

Deep practice extensions

Use these after the main practice set. They are designed to force definition-level reasoning, theorem selection, and mixed application rather than routine calculation only.

Extension 1 · Definition

Prove $f(x)=3x-2$ is continuous at every $a$.

Guide
For a target $\epsilon$, choose $\delta=\epsilon/3$ so $|f(x)-f(a)|=3|x-a|<\epsilon$.
Extension 2 · Composition

If $f$ is continuous at $a$ and $g$ is continuous at $f(a)$, prove $g\circ f$ is continuous at $a$.

Guide
Given epsilon for $g$, get eta around $f(a)$; then use continuity of $f$ to make $|f(x)-f(a)|<\eta$.
Extension 3 · Piecewise

For what $c$ is $f(x)=x^2$ for $x<1$ and $f(x)=cx+1$ for $x\ge1$ continuous at $1$?

Guide
Need left value $1$ equal right value $c+1$, so $c=0$.
Extension 4 · Not continuous

Show the Dirichlet function $1_{\mathbb{Q}}$ is discontinuous at every real number.

Guide
Every interval contains rationals and irrationals, so values near any point oscillate between $1$ and $0$ and cannot approach one limit.