Chapter V · Limits of functions of a continuous variable. Continuous and discontinuous functions

Continuous and discontinuous functions

§§99–100 35 min

The definition of continuity at a point, its picture as a band and a strip, the continuity of the familiar functions, and Hardy’s classification of discontinuities.

Why this matters

Everyone has a picture of a continuous curve: one you can draw without lifting the pen. That picture cannot be used in a proof, and it can mislead (is the graph of xsin⁡(1/x)x\sin(1/x) drawable?). In §§99–100 Hardy distils it into a definition built from the limits of the last three lessons. Every theorem in the rest of the chapter, and most of the rest of the book, assumes this definition.

The idea

Fix a point ξ\xi on the graph of ϕ\phi. Hardy asks what the picture of an unbroken curve requires at that one point, and finds three things.

  1. ϕ(ξ)\phi(\xi) is defined: there is no point missing from the curve.
  2. ϕ(x)\phi(x) is defined for all xx near ξ\xi, in some interval with ξ\xi inside it.
  3. As xx approaches ξ\xi from either side, ϕ(x)\phi(x) tends to ϕ(ξ)\phi(\xi).

The third condition is the heart of it. In the language of the last lessons: the limit exists and equals the value. So continuity is exactly the case where “just put x=ξx = \xi” is right.

As a game it is the ε\varepsilon–δ\delta game with the target fixed in advance: the band is centred on the value ϕ(ξ)\phi(\xi), not on a limit we are free to choose.

Explore Continuity as a game

Try this. This is xsin⁡(1/x)x\sin(1/x), with its value at 00 defined to be 00. For several tolerances ε\varepsilon, find a strip that works. Try δ=ε\delta = \varepsilon.

f(x)=xsin⁡1xf(x) = x\sin\frac1x, continuity at a=0a = 0
xy
  • y = f(x)
  • band f(a) ± ε
  • strip of width δ (drag)
  • escapes the band
This δ fails. For example x=0.5x = 0.5 gives ∣f(x)−0∣=0.455≥ε|f(x) - 0| = 0.455 \ge \varepsilon. Try a smaller δ — or ask whether any δ can work.
What to notice

However wildly the graph oscillates, it is trapped between the lines y=xy = x and y=−xy = -x, so a strip of half-width ε\varepsilon keeps it inside the band of half-width ε\varepsilon. The function is continuous at 00: wiggling is not the same as breaking.

Precise statements

Definition Continuity at a point Hardy: §99

ϕ(x)\phi(x) is continuous at x=ξx = \xi if ϕ(ξ)\phi(\xi) is defined, and ϕ(x)\phi(x) tends to a limit as x→ξx \to \xi from each side, and each limit equals ϕ(ξ)\phi(\xi):

ϕ(ξ−0)=ϕ(ξ)=ϕ(ξ+0).\phi(\xi - 0) = \phi(\xi) = \phi(\xi + 0).

Equivalently: for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that

∣ϕ(x)−ϕ(ξ)∣<εwhenever ∣x−ξ∣<δ.|\phi(x) - \phi(\xi)| < \varepsilon \quad \text{whenever } |x - \xi| < \delta.

In the second form the point x=ξx = \xi need no longer be excluded, because there the inequality reads 0<ε0 < \varepsilon. Hardy’s picture (§100): draw the horizontal lines y=ϕ(ξ)±εy = \phi(\xi) \pm \varepsilon. However close together they are, we can draw two vertical lines x=ξ±δx = \xi \pm \delta so that the part of the curve between the vertical lines lies between the horizontal ones.

Definition Continuity in an interval Hardy: §99

ϕ\phi is continuous throughout an interval if it is continuous at every point of it. If ϕ\phi is defined only on [a,b][a, b], it is continuous at the end point aa if ϕ(a+0)=ϕ(a)\phi(a + 0) = \phi(a), and at bb if ϕ(b−0)=ϕ(b)\phi(b - 0) = \phi(b).

So [x][x] is continuous on [ε,1−ε][\varepsilon, 1 - \varepsilon] for any small ε>0\varepsilon > 0 but not at 00 or 11; x\sqrt{x} is continuous on [0,∞)[0, \infty), including the end point 00.

From the algebra of limits we get, at once, the continuity of everything built by arithmetic.

Theorem Arithmetic preserves continuity Hardy: Examples XXXVII, 1–2

If ϕ\phi and ψ\psi are continuous at ξ\xi, so are ϕ+ψ\phi + \psi and ϕψ\phi\psi, and so is ϕ/ψ\phi/\psi if ψ(ξ)≠0\psi(\xi) \ne 0. Hence every polynomial is continuous everywhere, and every rational function P/QP/Q is continuous except where Q=0Q = 0.

Theorem Composition preserves continuity Hardy: Examples XXXVII, 11

If ϕ\phi is continuous at ξ\xi and ff is continuous at η=ϕ(ξ)\eta = \phi(\xi), then f(ϕ(x))f(\phi(x)) is continuous at ξ\xi.

Theorem The sine and cosine are continuous Hardy: Examples XXXVII, 9

sin⁡x\sin x and cos⁡x\cos x are continuous for every xx. Indeed ∣sin⁡(x+h)−sin⁡x∣≤∣h∣|\sin(x + h) - \sin x| \le |h| and ∣cos⁡(x+h)−cos⁡x∣≤∣h∣|\cos(x + h) - \cos x| \le |h|.

How continuity can fail

Hardy sorts discontinuities at a point aa by what the one-sided limits do (Examples XXXVII, 18).

Definition Kinds of discontinuity Hardy: Examples XXXVII, 18
  1. Simple discontinuity: ϕ(a−0)\phi(a - 0) and ϕ(a+0)\phi(a + 0) both exist, but continuity still fails. Either (α) they are equal, while ϕ(a)\phi(a) is undefined or different (removable); or (β) they are unequal (a jump), with ϕ(a)\phi(a) equal to one of them, to neither, or undefined.
  2. Infinity: from each side ϕ\phi tends to a limit or to ±∞\pm\infty, and from at least one side to ±∞\pm\infty.
  3. Oscillatory discontinuity: any other discontinuity, for instance one where ϕ\phi oscillates as x→ax \to a from one side.

Hardy also counts as simple a point where ϕ\phi is defined on one side only and has a limit there, but the value at the point is missing or different; and as an infinity a point where ϕ\phi tends to ±∞\pm\infty on the one side where it is defined.

Explore The discontinuity zoo

Try this. Go through the twelve specimens. For each one, zoom in on the point aa, decide what the two one-sided limits and the value are, then classify. Keep going until all twelve are right.

Specimen 1 of 12: ϕ(x)=x2\phi(x) = x^2 at a=1a = 10 of 12 classified correctly
xy
  • y = φ(x)
  • filled dot: the value at a; hollow dot: a one-sided limit that differs from it
Your classification at a
Zoom in on x=1x = 1. Ask: does φ have a limit from the left? from the right? are they equal? is φ(a) defined, and equal to them?
What to notice

Zooming in never helps a jump or an infinity, and never calms sin⁡(1/x)\sin(1/x); but it does show that xsin⁡(1/x)x\sin(1/x) settles to 00. The removable cases differ from continuous ones only at the single point aa. And a jump can have its value on either side, or in between, or nowhere: only the one-sided limits decide the type.

One consequence of §95: a function that increases (or decreases) steadily near aa has one-sided limits there, so a monotone function can have only simple discontinuities, in fact only jumps.

Proofs

Proof The sine is continuous
Strategy

Turn the difference sin⁡(x+h)−sin⁡x\sin(x + h) - \sin x into a product with a factor that is obviously small, using a sum-to-product formula, then bound ∣sin⁡t∣≤∣t∣|\sin t| \le |t|.

Sum-to-product

sin⁡(x+h)−sin⁡x=2sin⁡12h cos⁡(x+12h)\sin(x + h) - \sin x = 2\sin\tfrac12 h\,\cos(x + \tfrac12 h).

Bound each factor

∣cos⁡(x+12h)∣≤1|\cos(x + \tfrac12 h)| \le 1, and ∣sin⁡12h∣≤∣12h∣|\sin\tfrac12 h| \le |\tfrac12 h| (from sin⁡t<t\sin t < t for 0<t<12π0 < t < \tfrac12\pi, proved last lesson, together with ∣sin⁡t∣≤1<∣t∣|\sin t| \le 1 < |t| for ∣t∣≥12π|t| \ge \tfrac12\pi and the oddness of sin⁡\sin).

Conclude

So ∣sin⁡(x+h)−sin⁡x∣≤∣h∣|\sin(x + h) - \sin x| \le |h|. Given ε\varepsilon, δ=ε\delta = \varepsilon works, at every xx. For the cosine use cos⁡(x+h)−cos⁡x=−2sin⁡12h sin⁡(x+12h)\cos(x + h) - \cos x = -2\sin\tfrac12 h\,\sin(x + \tfrac12 h) in the same way.

Proof Composition preserves continuity
Strategy

Work backwards from the outside. To make f(ϕ(x))f(\phi(x)) close to f(η)f(\eta), the continuity of ff says how close ϕ(x)\phi(x) must be to η\eta; the continuity of ϕ\phi then says how close xx must be to ξ\xi.

Use the continuity of ff at η\eta

Given ε>0\varepsilon > 0, there is γ>0\gamma > 0 with ∣f(y)−f(η)∣<ε|f(y) - f(\eta)| < \varepsilon whenever ∣y−η∣<γ|y - \eta| < \gamma.

Use the continuity of ϕ\phi at ξ\xi, with tolerance γ\gamma

There is δ>0\delta > 0 with ∣ϕ(x)−η∣<γ|\phi(x) - \eta| < \gamma whenever ∣x−ξ∣<δ|x - \xi| < \delta.

Chain the two

If ∣x−ξ∣<δ|x - \xi| < \delta then y=ϕ(x)y = \phi(x) satisfies ∣y−η∣<γ|y - \eta| < \gamma, so ∣f(ϕ(x))−f(η)∣<ε|f(\phi(x)) - f(\eta)| < \varepsilon. Note that we need the continuity of ff at η\eta, not merely a limit: ϕ(x)\phi(x) may equal η\eta for x≠ξx \ne \xi.

So 2+cos⁡x\sqrt{2 + \cos x}, (acos⁡2x+bsin⁡2x)−1(a\cos^2 x + b\sin^2 x)^{-1} (where the bracket is not 00) and sin⁡(x3+1)\sin(x^3 + 1) are continuous wherever they are defined.

Worked examples and exercises

Exercise ●○○ Hardy: Examples XXXVII, 3

Show that x\sqrt{x} is continuous at every x>0x > 0, and continuous at the end point x=0x = 0 in the sense of §99.

Hint
For ξ>0\xi > 0: x−ξ=(x−ξ)/(x+ξ)\sqrt{x} - \sqrt{\xi} = (x - \xi)/(\sqrt{x} + \sqrt{\xi}).
Hint
At 00: x<ε\sqrt{x} < \varepsilon exactly when x<ε2x < \varepsilon^2.

Solution

At ξ>0\xi > 0. For x≥0x \ge 0, ∣x−ξ∣=∣x−ξ∣/(x+ξ)≤∣x−ξ∣/ξ|\sqrt{x} - \sqrt{\xi}| = |x - \xi|/(\sqrt{x} + \sqrt{\xi}) \le |x - \xi|/\sqrt{\xi}. Given ε\varepsilon, take δ=min⁡(ξ,εξ)\delta = \min(\xi, \varepsilon\sqrt{\xi}); the first term keeps xx inside the domain, and then ∣x−ξ∣<ε|\sqrt{x} - \sqrt{\xi}| < \varepsilon.

At 00. x\sqrt{x} is defined only for x≥0x \ge 0, so continuity at 00 means 0+0=0=0\sqrt{0 + 0} = \sqrt0 = 0. Given ε\varepsilon, take δ=ε2\delta = \varepsilon^2: for 0≤x<δ0 \le x < \delta, x<ε\sqrt{x} < \varepsilon.

Exercise ●●○ Hardy: Examples XXXVII, 17

Where are these functions discontinuous, and what kind of discontinuity is each?   [x2]\;[x^2],   [x]\;[\sqrt{x}] (x≥0x \ge 0),   x−[x]\;\sqrt{x - [x]},   [x]+x−[x]\;[x] + \sqrt{x - [x]},   [2x]\;[2x],   [x]+[−x]\;[x] + [-x].

Hint
A function [g(x)][g(x)] with gg continuous can only jump where g(x)g(x) crosses an integer.

Solution

[x2][x^2]: jumps at x=±nx = \pm\sqrt{n}, n=1,2,…n = 1, 2, \dots (at n\sqrt{n}: left limit n−1n - 1, value and right limit nn). It is continuous at 00, where x2x^2 touches the integer 00 without crossing it: [x2]=0[x^2] = 0 for ∣x∣<1|x| < 1.

[x][\sqrt{x}]: jumps at x=n2x = n^2, n=1,2,…n = 1, 2, \dots; continuous at the end point 00.

x−[x]\sqrt{x - [x]}: jumps at every integer nn (left limit 11, value and right limit 00).

[x]+x−[x][x] + \sqrt{x - [x]}: continuous everywhere. At an integer nn the left limit is (n−1)+1=n(n - 1) + 1 = n, and the value and right limit are n+0=nn + 0 = n. Two discontinuous pieces combine into a continuous function.

[2x][2x]: jumps at every half-integer k/2k/2.

[x]+[−x][x] + [-x]: removable discontinuity at every integer: it is −1-1 elsewhere and 00 at the integers.

Exercise ●○○ Hardy: Examples XXXVII, 20

Let ϕ(x)=1\phi(x) = 1 when xx is rational and 00 when xx is irrational. Show that ϕ\phi is discontinuous at every point.

Hint
Every interval contains both rational and irrational numbers.

Solution

Take any ξ\xi and ε=12\varepsilon = \tfrac12. Whatever δ>0\delta > 0 we choose, the interval (ξ−δ,ξ+δ)(\xi - \delta, \xi + \delta) contains a rational x1x_1 and an irrational x2x_2, with ϕ(x1)=1\phi(x_1) = 1 and ϕ(x2)=0\phi(x_2) = 0. They cannot both be within 12\tfrac12 of ϕ(ξ)\phi(\xi), since ∣ϕ(x1)−ϕ(x2)∣=1|\phi(x_1) - \phi(x_2)| = 1. So no δ\delta works. In fact the one-sided limits never exist, so every point is an oscillatory discontinuity.

Exercise ●●○ Hardy: Examples XXXVII, 22

Let y=lim⁡n→∞xny = \lim_{n\to\infty} x^n (from §72). Where is yy defined, where is it discontinuous, and what kind of discontinuity occurs?

Hint
xn→0x^n \to 0 for ∣x∣<1|x| < 1, →1\to 1 for x=1x = 1; for x=−1x = -1 and ∣x∣>1|x| > 1 there is no limit.

Solution

The limit exists only for −1<x≤1-1 < x \le 1: y=0y = 0 for −1<x<1-1 < x < 1 and y=1y = 1 at x=1x = 1. So yy is continuous on (−1,1)(-1, 1). At x=1x = 1 it is defined only on the left, with y(1−0)=0≠1=y(1)y(1 - 0) = 0 \ne 1 = y(1): a simple discontinuity of the one-sided kind. At x=−1x = -1 it is not defined, but y(−1+0)=0y(-1 + 0) = 0: again a simple discontinuity in Hardy’s extended sense.

Check yourself

Check yourself True or false?

If lim⁡x→ξϕ(x)\lim_{x \to \xi}\phi(x) exists, then ϕ\phi is continuous at ξ\xi.

Why

False. The limit must also equal ϕ(ξ)\phi(\xi), and ϕ(ξ)\phi(\xi) must be defined. [1−x2][1 - x^2] at 00 has limit 00 and value 11; xsin⁡(1/x)x\sin(1/x) has limit 00 and no value at 00.

Check yourself Choose one

sgn⁡x\operatorname{sgn} x is 11 for x>0x > 0, −1-1 for x<0x < 0 and 00 at 00. What happens at 00?

Why

ϕ(0−0)=−1\phi(0 - 0) = -1 and ϕ(0+0)=1\phi(0 + 0) = 1 exist and differ: a jump (Hardy’s case β, with the value equal to neither side, like [x]−[−x][x] - [-x]). Redefining the single value ϕ(0)\phi(0) cannot repair it, so it is not removable. The value lying “in between” is irrelevant.

Check yourself Enter a number

How many points of discontinuity does [2x][2x] have in the open interval (0,3)(0, 3)?

Why

[2x][2x] jumps where 2x2x is an integer, i.e. at x=12,1,32,2,52x = \tfrac12, 1, \tfrac32, 2, \tfrac52: five points. (00 and 33 are not in the open interval.)

Check yourself Choose one

ϕ\phi is steadily increasing on (−1,1)(-1, 1) and discontinuous at 00. What kind of discontinuity can it be?

Why

By §95, ϕ(0−0)\phi(0 - 0) and ϕ(0+0)\phi(0 + 0) exist and are finite (bounded by ϕ(−12)\phi(-\tfrac12) and ϕ(12)\phi(\tfrac12)), with ϕ(0−0)≤ϕ(0)≤ϕ(0+0)\phi(0 - 0) \le \phi(0) \le \phi(0 + 0). If they were equal, ϕ(0)\phi(0) would be squeezed to the same value and ϕ\phi would be continuous. So they differ: a jump.

Hardy’s language

It is natural to call a function continuous if its graph is a continuous curve, and otherwise discontinuous. Let us take this as a provisional definition and try to distinguish more precisely some of the properties which are involved in it.

— G. H. Hardy, §99

Summary

Summary
  • ϕ\phi is continuous at ξ\xi when ϕ(ξ−0)=ϕ(ξ)=ϕ(ξ+0)\phi(\xi - 0) = \phi(\xi) = \phi(\xi + 0); equivalently, for every ε\varepsilon there is δ\delta with ∣ϕ(x)−ϕ(ξ)∣<ε|\phi(x) - \phi(\xi)| < \varepsilon for ∣x−ξ∣<δ|x - \xi| < \delta.
  • Picture: however narrow the band around ϕ(ξ)\phi(\xi), some vertical strip around ξ\xi keeps the whole graph inside it.
  • Sums, products, quotients (nonzero denominator) and compositions of continuous functions are continuous; so are polynomials, sin⁡\sin and cos⁡\cos.
  • Discontinuities: simple (removable or jump: both one-sided limits exist), infinities, and oscillatory ones. Monotone functions have only jumps.