Real Analysis

Seven ideas from a first course in analysis, starting with the one that ties the rest together: what it means for a function to be continuous, told in five chapters from ε\varepsilon and δ\delta to open sets and topology. Play the ε\varepsilon–δ\delta game, drag open sets, watch sums and sequences settle down, then check yourself with concept questions, practice problems and exercises from the book.

Follows the chapter order of W. Rudin, Principles of Mathematical Analysis, 3rd ed. (McGraw–Hill, 1976), Chapters 2–7. Chapter and theorem numbers refer to that book; the questions and examples here are written for this page. Exercises from the book appear at the end of each module, with their numbers from the book and their statements restated in our own words. Exercises from the book appear at the end of each module, with their numbers from the book and their statements restated in our own words. For how this subject feeds the others on this site, see the roadmap.

Story in five chaptersRudin, Ch. 2: Basic Topology · Ch. 4: Continuity

The story of continuity

Continuity starts as a statement about distances between numbers. Each time we rewrite it, it needs less: first only a distance function, then only sequences, then only open sets. At the end the open sets are all that is left, and that collection is what a topology is. The point of the whole story: once continuity only needs open sets, you can talk about continuous maps between spaces that have no distance at all.

The story

  1. Chapter 1. The ε\varepsilon–δ\delta definition

    A function f:ℝ→ℝf:\R\to\R is continuous at pp if small changes in the input produce small changes in the output. Making "small" precise turns this into a game against an adversary. They choose a tolerance ε>0\varepsilon>0 for the output; you must answer with a tolerance δ>0\delta>0 for the input that guarantees it.

    Continuity at a point. For every ε>0\varepsilon>0 there is a δ>0\delta>0 such that |x−p|<δ|x-p|<\delta implies |f(x)−f(p)|<ε|f(x)-f(p)|<\varepsilon.

    You win if you have a winning reply to every ε\varepsilon. The first figure below plays this game: the horizontal band is the adversary's ε\varepsilon, the vertical strip is your δ\delta, and the graph has to stay inside the box.

  2. Chapter 2. Only distance was used

    Look at what the definition actually uses: the expressions |x−p||x-p| and |f(x)−f(p)||f(x)-f(p)|, i.e. a way of measuring how far apart two points are. Nothing about ℝ\R being ordered, or having arithmetic, is needed. So we can replace |x−y||x-y| by any function d(x,y)d(x,y) that behaves like a distance.

    Metric space (Rudin 2.15). A set XX with d:X×X→[0,∞)d:X\times X\to[0,\infty) such that d(p,q)=0⟺p=qd(p,q)=0\iff p=q, d(p,q)=d(q,p)d(p,q)=d(q,p), and d(p,q)≤d(p,r)+d(r,q)d(p,q)\le d(p,r)+d(r,q).

    Write Nr(p)={q:d(p,q)<r}N_r(p)=\{q: d(p,q)<r\} for the ball of radius rr. Then continuity of f:X→Yf:X\to Y at pp reads, word for word as before, but now as a statement about balls:

    for every ε>0 there is δ>0 with f(Nδ(p))⊆Nε(f(p)).\text{for every }\varepsilon>0\text{ there is }\delta>0\text{ with } f\big(N_\delta(p)\big)\subseteq N_\varepsilon\big(f(p)\big).

    This one definition now covers ℝk\R^k, spaces of functions with d(f,g)=sup⁡|f−g|d(f,g)=\sup|f-g|, strings with the Hamming distance, and much more.

  3. Chapter 3. Limits of sequences and of functions

    The same ε\varepsilon-language defines limits. A sequence converges, pn→pp_n\to p, if for every ε\varepsilon there is NN with d(pn,p)<εd(p_n,p)<\varepsilon for n≥Nn\ge N (Rudin 3.1). A function has a limit, limx→p⁡f(x)=q\lim_{x\to p}f(x)=q, if for every ε\varepsilon there is δ\delta with d(f(x),q)<εd(f(x),q)<\varepsilon whenever 0<d(x,p)<δ0<d(x,p)<\delta (Rudin 4.1).

    Three faces of one idea (Rudin 4.2, 4.6). For pp a limit point of the domain, the following are equivalent: (i) ff is continuous at pp; (ii) limx→p⁡f(x)=f(p)\lim_{x\to p}f(x)=f(p); (iii) f(pn)→f(p)f(p_n)\to f(p) for every sequence pn→pp_n\to p.

    So "continuous" means "commutes with limits": f(lim⁡pn)=lim⁡f(pn)f(\lim p_n)=\lim f(p_n). This is the form you use most in practice, and it is the bridge to the next chapter, because a sequence converging to pp is eventually inside every ball around pp.

  4. Chapter 4. Balls disappear: open sets

    Call G⊆XG\subseteq X open if around each of its points there is a ball inside GG (Rudin 2.18). Now take the ball version of continuity and ask it of every point at once. Something remarkable happens: ε\varepsilon and δ\delta drop out completely.

    Continuity by open sets (Rudin 4.8). f:X→Yf:X\to Y is continuous at every point if and only if f−1(V)f^{-1}(V) is open in XX for every open V⊆YV\subseteq Y.

    Why. If VV is open and f(p)∈Vf(p)\in V, some ball Nε(f(p))N_\varepsilon(f(p)) lies in VV; continuity gives a ball Nδ(p)N_\delta(p) mapped into it, so pp is an interior point of f−1(V)f^{-1}(V). Conversely, apply the hypothesis to V=Nε(f(p))V=N_\varepsilon(f(p)); its preimage is open and contains pp, so it contains some Nδ(p)N_\delta(p).

    The second figure lets you drag an open interval VV and see its preimage. For a continuous function the preimage is always a union of open intervals; at a jump, the preimage picks up an endpoint and stops being open.

  5. Chapter 5. Keep only the open sets: topology

    Chapter 4 says continuity only needs to know which sets are open. The metric was scaffolding. So we can throw it away and keep just the collection of open sets, provided it has the properties open sets in a metric space always have (Rudin 2.24).

    Topology. A collection 𝒯\mathcal T of subsets of XX containing ⌀\varnothing and XX, closed under arbitrary unions and under finite intersections. Its members are called open. A map f:(X,𝒯X)→(Y,𝒯Y)f:(X,\mathcal T_X)\to(Y,\mathcal T_Y) is continuous if f−1(V)∈𝒯Xf^{-1}(V)\in\mathcal T_X for every V∈𝒯YV\in\mathcal T_Y.

    This is the whole point of a topology: it is the least structure you need in order to say which functions are continuous. It lets you do that on spaces that have no natural distance at all:

    • Polynomial geometry. In the Zariski topology the closed sets are zero sets of polynomials. Polynomial maps are continuous, though there is no useful metric (Algebraic Geometry, module 1).
    • Gluing. A circle is [0,1][0,1] with 00 and 11 glued. Declare a set open if its preimage in [0,1][0,1] is open; then a map out of the circle is continuous exactly when the corresponding map out of [0,1][0,1] is.
    • Pointwise convergence. On the space of all functions ℝ→ℝ\R\to\R, "fn→ff_n\to f pointwise" is convergence in a topology (the product topology) that comes from no metric (compare module 7).
    • Manifolds. A manifold is a topological space that looks like ℝn\R^n near each point. The transition maps are only required to be continuous before any smoothness is added (Smooth Manifolds, module 1).
    What a topology forgets. Different metrics can give the same open sets: the ℓ1\ell^1, ℓ2\ell^2 and ℓ∞\ell^\infty distances on ℝ2\R^2 do (module 2). Notions that depend on the metric itself, such as Cauchy sequences, completeness and uniform continuity, are therefore not topological. ℝ\R and (0,1)(0,1) are homeomorphic, but only one of them is complete. And unique limits need an extra axiom (Hausdorff), which every metric space satisfies automatically.

Explore: the ε\varepsilon–δ\delta game

Function
Gold band: outputs within ε of f(p). Blue strip: inputs within δ of p. The graph over the strip turns red wherever it leaves the band.

Explore: preimages of open sets

Function
Drag the two ends of the open interval V on the vertical axis (or drag inside it to slide it). Its preimage f⁻¹(V) is shaded on the horizontal axis. A filled dot marks an endpoint that belongs to the preimage.

Worked example

Prove that f(x)=x2f(x)=x^2 is continuous on ℝ\R three ways, once in each language of the story.

  1. With ε\varepsilon and δ\delta: given pp and ε\varepsilon, what δ\delta works?

    |x2−p2|=|x−p||x+p||x^2-p^2|=|x-p|\,|x+p|. If |x−p|<1|x-p|<1 then |x+p|<2|p|+1|x+p|<2|p|+1. So δ=min⁡(1, ε/(2|p|+1))\delta=\min\big(1,\ \varepsilon/(2|p|+1)\big) gives |x2−p2|<δ(2|p|+1)≤ε|x^2-p^2|<\delta(2|p|+1)\le\varepsilon. Notice δ\delta depends on pp: this is continuity, not uniform continuity (module 4).

  2. With sequences: why does pn→pp_n\to p imply pn2→p2p_n^2\to p^2?

    Limits respect products (Rudin 3.3): pn2=pn⋅pn→p⋅pp_n^2=p_n\cdot p_n\to p\cdot p. This is the cleanest proof, and it is the reason the algebra of limits is proved early.

  3. With open sets: describe f−1((a,b))f^{-1}\big((a,b)\big) and check it is open.

    If b≤0b\le0 it is empty. If a<0<ba<0<b it is (−b,b)(-\sqrt b,\sqrt b). If 0≤a<b0\le a<b it is (−b,−a)∪(a,b)(-\sqrt b,-\sqrt a)\cup(\sqrt a,\sqrt b). Each is open, and every open subset of ℝ\R is a union of open intervals, whose preimages are then unions of open sets.

  4. Which proof survives if we only know the topology on ℝ\R, not the metric?

    Only the third. The first uses the distance, the second uses sequences (which suffice in metric spaces, but not in every topological space). The open-set proof uses nothing but open sets, which is why it is the definition that generalises.

Check your understanding

In the ε\varepsilon–δ\delta game for f(x)=1/xf(x)=1/x on (0,∞)(0,\infty), fix ε\varepsilon. What happens to the best δ\delta as p→0+p\to0^+?

  1. It shrinks to 0, but is positive at every pp.
  2. It stays bounded below by a positive number.Try it in the figure: near 0 the graph is so steep that tiny input changes give big output changes.
  3. It is 0 at some p>0p>0, so 1/x1/x is discontinuous there.At each p>0p>0 some δ>0\delta>0 works; it just gets small.
The best δ\delta is roughly εp2\varepsilon p^2 for small ε\varepsilon. It is positive for each pp, so 1/x1/x is continuous, but there is no single δ\delta for all pp: 1/x1/x is not uniformly continuous on (0,1)(0,1).

Which statement says f:X→Yf:X\to Y is continuous using only open sets?

  1. The image of every open set is open.That defines an open map. x↦x2x\mapsto x^2 is continuous but sends (−1,1)(-1,1) to [0,1)[0,1).
  2. The preimage of every open set is open.
  3. The preimage of every closed set is open.Preimages of closed sets are closed, by taking complements.
Preimages respect unions, intersections and complements, which is why the preimage is the right direction. Equivalently, preimages of closed sets are closed.

On a set XX, take the discrete topology (every subset is open). Which maps X→YX\to Y are continuous, for any topological space YY?

  1. All of them.
  2. Only the constant maps.Constant maps are continuous for every topology, but here many more maps are.
  3. Only the injective ones.Injectivity plays no role.
Every preimage is a subset of XX, and every subset is open. Dually, if YY has the indiscrete topology {⌀,Y}\{\varnothing,Y\}, every map into YY is continuous. More open sets in the domain or fewer in the target make continuity easier.

ℝ\R and (0,1)(0,1) are homeomorphic (for example via x↦12+1πarctan⁡xx\mapsto\tfrac12+\tfrac1\pi\arctan x). Which property can therefore not be a topological property?

  1. Connectedness.Both are connected, and connectedness is defined with open sets only.
  2. Completeness.
  3. Being Hausdorff.Both are Hausdorff, and Hausdorff is defined with open sets only.
ℝ\R is complete; (0,1)(0,1) is not (1/n1/n is Cauchy with no limit in it). A homeomorphism preserves open sets but can stretch distances without bound, so Cauchy sequences are not preserved.

Practice

The topology of the lineOpen sets in ℝ

Show that the open sets in ℝ\R (with the usual metric) satisfy the axioms of a topology, and that the intersection of the infinitely many open sets (−1/n,1/n)(-1/n,1/n) is not open.

Hint

For finite intersections, take the smallest of finitely many radii.

Solution

⌀\varnothing and ℝ\R are open. If p∈⋃Gαp\in\bigcup G_\alpha, then p∈Gβp\in G_\beta for some β\beta, and a ball around pp inside GβG_\beta lies in the union. If p∈G1∩⋯∩Gnp\in G_1\cap\dots\cap G_n, take balls of radii rir_i and let r=min⁡ri>0r=\min r_i>0. But ⋂n(−1/n,1/n)={0}\bigcap_n(-1/n,1/n)=\{0\}, which contains no ball: with infinitely many radii the minimum can be 0.

Continuity is local, sequences sufficeChapter 3 in action

Let f(x)=sin⁡(1/x)f(x)=\sin(1/x) for x≠0x\ne0 and f(0)=cf(0)=c. Show that ff is discontinuous at 0 for every choice of cc, using sequences.

Solution

Take xn=1/(2πn+π/2)x_n=1/(2\pi n+\pi/2) and yn=1/(2πn−π/2)y_n=1/(2\pi n-\pi/2). Both tend to 0, but f(xn)=1f(x_n)=1 and f(yn)=−1f(y_n)=-1. If ff were continuous at 0, both would converge to cc, so c=1=−1c=1=-1. In the game: for ε<1\varepsilon<1 no δ\delta works.

The Zariski topology on the lineA topology with no metric

On ℝ\R, call a set open if it is empty or its complement is finite. Show this is a topology, that any two nonempty open sets intersect, and conclude it does not come from any metric.

Solution

Unions of cofinite sets are cofinite (or empty); finite intersections of cofinite sets have finite complements, since a finite union of finite sets is finite. Two nonempty open sets miss only finitely many points each, so they share infinitely many points. In a metric space two distinct points have disjoint balls of radius d(p,q)/2d(p,q)/2 around them, so no metric gives these open sets. This is the Zariski topology on the affine line: its closed sets are the zero sets of polynomials.

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 4.1A symmetric limit is not continuity

Suppose f:ℝ→ℝf:\R\to\R satisfies limh→0⁡[f(x+h)−f(x−h)]=0\lim_{h\to0}[f(x+h)-f(x-h)]=0 for every xx. Must ff be continuous?

Hint

The condition compares values at x+hx+h and x−hx-h but never looks at f(x)f(x) itself. Try changing ff at a single point.

Solution

No. Let f(0)=1f(0)=1 and f(x)=0f(x)=0 for x≠0x\ne0. If x≠0x\ne0, then for 0<|h|<|x|0<|h|<|x| both x±hx\pm h are nonzero; if x=0x=0, the points ±h\pm h are nonzero for every h≠0h\ne0. Either way f(x+h)−f(x−h)=0f(x+h)-f(x-h)=0 for all small h≠0h\ne0, so the limit is 0 everywhere. But ff is not continuous at 0.

The condition only says ff has the same behaviour on both sides of each point. It is satisfied by any function that agrees with a continuous one except on a set with no limit points. Even 𝟏ℚ\mathbf 1_{\mathbb Q} fails it, though: take xx irrational and hh with x+h∈ℚx+h\in\mathbb Q, x−h∉ℚx-h\notin\mathbb Q.

Exercise 4.2Images of closures

If f:X→Yf:X\to Y is a continuous map of metric spaces and E⊆XE\subseteq X, prove f(E‾)⊆f(E)f(\bar E)\subseteq\overline{f(E)}. Show by an example that the inclusion can be proper.

Hint

A point of E‾\bar E is a limit of a sequence in EE, and continuous maps send convergent sequences to convergent sequences.

Solution

Let p∈E‾p\in\bar E. Choose pn∈Ep_n\in E with pn→pp_n\to p (if p∈Ep\in E, take pn=pp_n=p). By Rudin 4.2, f(pn)→f(p)f(p_n)\to f(p), and every f(pn)∈f(E)f(p_n)\in f(E), so f(p)∈f(E)f(p)\in\overline{f(E)}.

An open-set proof: f−1(f(E))f^{-1}\big(\overline{f(E)}\big) is closed (preimage of a closed set) and contains EE, so it contains E‾\bar E.

Proper inclusion: X=ℝX=\R, f(x)=1/(1+x2)f(x)=1/(1+x^2), E=ℝE=\R. Then E‾=ℝ\bar E=\R and f(E‾)=(0,1]f(\bar E)=(0,1], but f(E)=[0,1]\overline{f(E)}=[0,1]. Or f:ℤ→ℝf:\mathbb Z\to\R, f(n)=1/nf(n)=1/n for n≥1n\ge1: E=ℤ>0E=\mathbb Z_{>0} is closed, but 0∈f(E)∖f(E‾)0\in\overline{f(E)}\setminus f(\bar E).

Exercise 4.3Zero sets are closed

For a continuous real function ff on a metric space XX, prove that its zero set Z(f)={p:f(p)=0}Z(f)=\{p:f(p)=0\} is closed.

Hint

Z(f)Z(f) is a preimage.

Solution

Z(f)=f−1({0})Z(f)=f^{-1}(\{0\}), and {0}\{0\} is closed in ℝ\R. Preimages of closed sets under continuous maps are closed (take complements in Rudin 4.8). Sequentially: if pn∈Z(f)p_n\in Z(f) and pn→pp_n\to p, then f(p)=lim⁡f(pn)=0f(p)=\lim f(p_n)=0.

This is the bridge to algebraic geometry: if only zero sets of polynomials are declared closed, you get the Zariski topology, in which polynomial maps are continuous.

Exercise 4.4Continuous maps are determined by a dense set

Let f,g:X→Yf,g:X\to Y be continuous maps of metric spaces and E⊆XE\subseteq X dense. Prove f(E)f(E) is dense in f(X)f(X), and that if f=gf=g on EE then f=gf=g on XX.

Hint

Use Exercise 4.2 for the first part. For the second, look at the set where ff and gg agree, or use sequences.

Solution

Density. By Exercise 4.2, f(X)=f(E‾)⊆f(E)f(X)=f(\bar E)\subseteq\overline{f(E)}. So every point of f(X)f(X) is in the closure of f(E)f(E).

Uniqueness. For p∈Xp\in X, pick pn∈Ep_n\in E with pn→pp_n\to p. Then f(p)=lim⁡f(pn)=lim⁡g(pn)=g(p)f(p)=\lim f(p_n)=\lim g(p_n)=g(p), using continuity of both and uniqueness of limits in the metric space YY.

The uniqueness step needs limits in YY to be unique, i.e. YY Hausdorff. For a general topological target it can fail: into the indiscrete space every map is continuous.

InteractiveRudin, Ch. 2: Basic Topology

Metric spaces and open sets

A metric gives balls, balls give open sets, and open sets are all that continuity sees. Different metrics can draw very differently shaped balls and still produce exactly the same open sets.

The idea

Interior, open, closed (Rudin 2.18). pp is an interior point of EE if some ball Nr(p)⊆EN_r(p)\subseteq E. EE is open if all its points are interior. pp is a limit point of EE if every ball around pp contains a point of EE other than pp. EE is closed if it contains all its limit points.
Complements (Rudin 2.23). EE is open if and only if EcE^c is closed.

On ℝ2\R^2 there are three natural distances: d1=|x1−y1|+|x2−y2|d_1=|x_1-y_1|+|x_2-y_2|, d2d_2 (Euclidean), and d∞=max⁡|xi−yi|d_\infty=\max|x_i-y_i|. Their unit balls are a diamond, a disk and a square. Since each ball contains a smaller ball of each other kind with the same centre,

Nr/2(∞)(p)⊆Nr(1)(p)⊆Nr(2)(p)⊆Nr(∞)(p),N^{(\infty)}_{r/2}(p)\subseteq N^{(1)}_{r}(p)\subseteq N^{(2)}_{r}(p)\subseteq N^{(\infty)}_{r}(p),

a set has interior balls of one kind exactly when it has them of every kind. The three metrics give the same open sets, so the same continuous functions.

Explore

Metric
Set E
Drag the point. The shaded ball is the largest ball of the chosen metric around it that stays inside E. Points with no such ball are boundary points.

Worked example

Let XX be any set with the discrete metric: d(p,q)=1d(p,q)=1 if p≠qp\ne q and 00 if p=qp=q. Which sets are open, which are closed, and which are compact?

  1. What is the ball N1/2(p)N_{1/2}(p)?

    Only pp is at distance less than 12\tfrac12 from pp, so N1/2(p)={p}N_{1/2}(p)=\{p\}.

  2. Which sets are open? Which are closed?

    Every set: each of its points has the ball {p}\{p\} inside it. Since complements of open sets are closed, every set is also closed. This metric induces the discrete topology.

  3. Which sets are compact?

    Exactly the finite ones. A finite set is compact. An infinite set KK has the open cover {{p}:p∈K}\{\{p\}:p\in K\}, and no finite subfamily covers it. So "closed and bounded" (every set here is bounded, with diameter at most 1) does not imply compact in general metric spaces; Heine–Borel is special to ℝk\R^k.

Check your understanding

Is [0,1)[0,1) open in ℝ\R? Closed?

  1. Open, not closed.0 is in the set, but every ball around 0 contains negative numbers.
  2. Neither.
  3. Closed, not open.1 is a limit point not in the set.
0 is not an interior point, and 1 is a limit point outside the set. "Not open" does not mean "closed".

Regard [0,1)[0,1) as a metric space by itself. Is the subset [0,12)[0,\tfrac12) open in it?

  1. Yes.
  2. No, 0 is not an interior point.In the space [0,1)[0,1) there are no negative numbers; the ball of radius 14\tfrac14 around 0 is [0,14)[0,\tfrac14).
Openness is relative to the ambient space (Rudin 2.30): EE is open in Y⊆XY\subseteq X iff E=Y∩GE=Y\cap G for some GG open in XX. Here [0,12)=[0,1)∩(−1,12)[0,\tfrac12)=[0,1)\cap(-1,\tfrac12).

Which of these is a metric on ℝ\R?

  1. d(x,y)=(x−y)2d(x,y)=(x-y)^2The triangle inequality fails: d(0,2)=4>d(0,1)+d(1,2)=2d(0,2)=4>d(0,1)+d(1,2)=2.
  2. d(x,y)=|x−y|1+|x−y|d(x,y)=\dfrac{|x-y|}{1+|x-y|}
  3. d(x,y)=|x−2y|d(x,y)=|x-2y|It isn't symmetric, and d(1,1)=1≠0d(1,1)=1\ne0.
t↦t/(1+t)t\mapsto t/(1+t) is increasing and subadditive, which gives the triangle inequality. This bounded metric has the same open sets as |x−y||x-y|, another example of "same topology, different metric" (see Exercise 2.11 below).

Practice

Closures and limit pointsRudin 2.27

Show that the closure E‾=E∪E′\bar E=E\cup E' is closed, and that it is the smallest closed set containing EE.

Solution

If p∉E‾p\notin\bar E, some ball Nr(p)N_r(p) misses EE (else pp would be in EE or a limit point). That ball also misses E′E': any q∈Nr(p)q\in N_r(p) has a smaller ball around it inside Nr(p)N_r(p), which misses EE. So E‾c\bar E^c is open. If F⊇EF\supseteq E is closed, it contains the limit points of EE (they are limit points of FF), so F⊇E‾F\supseteq\bar E.

Balls are openThe triangle inequality at work

Show that every ball Nr(p)N_r(p) in a metric space is an open set.

Solution

If q∈Nr(p)q\in N_r(p), let h=r−d(p,q)>0h=r-d(p,q)>0. For s∈Nh(q)s\in N_h(q), d(p,s)≤d(p,q)+d(q,s)<d(p,q)+h=rd(p,s)\le d(p,q)+d(q,s)<d(p,q)+h=r. So Nh(q)⊆Nr(p)N_h(q)\subseteq N_r(p).

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 2.9The interior

Let E∘E^\circ be the set of interior points of EE. Prove: (a) E∘E^\circ is open; (b) EE is open iff E∘=EE^\circ=E; (c) if G⊆EG\subseteq E is open, then G⊆E∘G\subseteq E^\circ; (d) (E∘)c=Ec(E^\circ)^c=\overline{E^c}. (e) Do EE and E‾\bar E always have the same interior? (f) Do EE and E∘E^\circ always have the same closure?

Hint

(a) Balls are open. (d) p∉E∘p\notin E^\circ iff every ball around pp meets EcE^c. For (e) and (f), try ℚ⊆ℝ\mathbb Q\subseteq\R.

Solution

(a) If p∈E∘p\in E^\circ, some Nr(p)⊆EN_r(p)\subseteq E. Each q∈Nr(p)q\in N_r(p) has a ball Nh(q)⊆Nr(p)⊆EN_h(q)\subseteq N_r(p)\subseteq E (balls are open), so q∈E∘q\in E^\circ. Thus Nr(p)⊆E∘N_r(p)\subseteq E^\circ.

(b) If EE is open, every point is interior. Conversely E∘E^\circ is open by (a).

(c) Each p∈Gp\in G has a ball inside G⊆EG\subseteq E.

(d) p∉E∘p\notin E^\circ iff no ball around pp lies in EE, iff every ball around pp meets EcE^c, iff p∈Ecp\in\overline{E^c}.

(e) No: ℚ\mathbb Q has empty interior, but ℚ‾=ℝ\bar{\mathbb Q}=\R has interior ℝ\R.

(f) No: ℚ∘=⌀\mathbb Q^\circ=\varnothing has closure ⌀\varnothing, but ℚ‾=ℝ\bar{\mathbb Q}=\R.

So E∘E^\circ is the largest open set inside EE, dual to E‾\bar E being the smallest closed set containing EE.

Exercise 2.11Which formulas are metrics?

On ℝ\R, decide which of these are metrics: d1=(x−y)2d_1=(x-y)^2, d2=|x−y|d_2=\sqrt{|x-y|}, d3=|x2−y2|d_3=|x^2-y^2|, d4=|x−2y|d_4=|x-2y|, d5=|x−y|1+|x−y|d_5=\dfrac{|x-y|}{1+|x-y|}.

Hint

Check d(x,x)=0d(x,x)=0, positivity, symmetry and the triangle inequality. Concave increasing functions φ\varphi with φ(0)=0\varphi(0)=0 are subadditive.

Solution
  • d1d_1: not a metric. d1(0,2)=4>d1(0,1)+d1(1,2)=2d_1(0,2)=4>d_1(0,1)+d_1(1,2)=2.
  • d2d_2: a metric. a+b≤a+b\sqrt{a+b}\le\sqrt a+\sqrt b, so |x−z|≤|x−y|+|y−z|≤|x−y|+|y−z|\sqrt{|x-z|}\le\sqrt{|x-y|+|y-z|}\le\sqrt{|x-y|}+\sqrt{|y-z|}.
  • d3d_3: not a metric. d3(1,−1)=0d_3(1,-1)=0 but 1≠−11\ne-1.
  • d4d_4: not a metric. d4(1,1)=1≠0d_4(1,1)=1\ne0, and it isn't symmetric.
  • d5d_5: a metric. φ(t)=t/(1+t)\varphi(t)=t/(1+t) is increasing and φ(a+b)≤φ(a)+φ(b)\varphi(a+b)\le\varphi(a)+\varphi(b), which with |x−z|≤|x−y|+|y−z||x-z|\le|x-y|+|y-z| gives the triangle inequality.

Both d2d_2 and d5d_5 give the usual open sets on ℝ\R, though d5d_5 is bounded: the same topology from very different metrics.

Exercise 2.22ℝᵏ is separable

A metric space is separable if it has a countable dense subset. Show that ℝk\R^k is separable.

Hint

Use the points with rational coordinates.

Solution

ℚk\mathbb Q^k is countable (a finite product of countable sets). Given x∈ℝkx\in\R^k and r>0r>0, choose rationals qiq_i with |qi−xi|<r/k|q_i-x_i|<r/\sqrt k (density of ℚ\mathbb Q in ℝ\R, Rudin 1.20). Then |q−x|<r|q-x|<r, so every ball meets ℚk\mathbb Q^k, i.e. ℚk\mathbb Q^k is dense.

Exercise 2.29Open subsets of the line

Prove that every open set in ℝ\R is the union of an at most countable collection of disjoint open intervals (segments).

Hint

Group the points of GG by the largest interval in GG containing them. Each such interval contains a rational.

Solution

For x∈Gx\in G, let IxI_x be the union of all open intervals containing xx and contained in GG. It is an open interval (possibly infinite) inside GG, and it is the largest one containing xx. If Ix∩Iy≠⌀I_x\cap I_y\ne\varnothing, then Ix∪IyI_x\cup I_y is an interval in GG containing xx, so Iy⊆IxI_y\subseteq I_x by maximality, and symmetrically, so Ix=IyI_x=I_y. Hence the distinct IxI_x are disjoint and their union is GG.

Each IxI_x contains a rational number, and distinct ones contain distinct rationals because they are disjoint. Since ℚ\mathbb Q is countable, there are at most countably many intervals.

InteractiveRudin, Ch. 3: Numerical Sequences and Series

Sequences, Cauchy and series

A limit is a promise: name any ε\varepsilon, and from some index on the terms stay within ε\varepsilon of the limit. The Cauchy criterion makes the same promise without naming the limit, and that is what lets us prove series converge to numbers we can't write down.

The idea

Convergence and Cauchy sequences (Rudin 3.1, 3.8). pn→pp_n\to p if for every ε>0\varepsilon>0 there is NN with d(pn,p)<εd(p_n,p)<\varepsilon for all n≥Nn\ge N. {pn}\{p_n\} is Cauchy if for every ε>0\varepsilon>0 there is NN with d(pm,pn)<εd(p_m,p_n)<\varepsilon for all m,n≥Nm,n\ge N.
Completeness (Rudin 3.11). Every convergent sequence is Cauchy. In ℝk\R^k (and in any compact metric space) every Cauchy sequence converges.

A series ∑an\sum a_n converges if its partial sums sn=a1+⋯+ans_n=a_1+\dots+a_n do. The Cauchy criterion becomes: for every ε\varepsilon there is NN with |am+⋯+an|<ε|a_{m}+\dots+a_n|<\varepsilon for n≥m≥Nn\ge m\ge N (Rudin 3.22). In particular an→0a_n\to0 is necessary, but not sufficient: the harmonic series diverges.

Explore

Sequence
The band has half-width ε around the limit. The dashed line marks the first index N after which every plotted term stays in the band.

Worked example

Show that ∑1/n\sum 1/n diverges, even though its terms tend to 0, and that ∑1/n2\sum 1/n^2 converges.

  1. Group the harmonic series in blocks 2k−1<n≤2k2^{k-1}<n\le2^k. How big is each block?

    The block has 2k−12^{k-1} terms, each at least 2−k2^{-k}, so it sums to at least 12\tfrac12. The partial sums s2k≥1+k/2s_{2^k}\ge1+k/2 are unbounded, so the series diverges (it fails the Cauchy criterion with ε=12\varepsilon=\tfrac12).

  2. Do the same grouping, 2k≤n<2k+12^{k}\le n<2^{k+1}, for ∑1/n2\sum1/n^2.

    The block has 2k2^k terms, each at most 2−2k2^{-2k}, so it sums to at most 2−k2^{-k}. The partial sums are increasing and bounded by ∑k2−k=2\sum_k 2^{-k}=2.

  3. Why does "increasing and bounded" give convergence?

    Monotone bounded sequences converge (Rudin 3.14): the limit is the least upper bound, which exists by the completeness of ℝ\R. This grouping argument is Cauchy's condensation test (Rudin 3.27): ∑1/np\sum1/n^p converges iff p>1p>1.

Check your understanding

In the rational numbers ℚ\mathbb Q with d(p,q)=|p−q|d(p,q)=|p-q|, the decimal truncations 1,1.4,1.41,1.414,…1, 1.4, 1.41, 1.414,\dots of 2\sqrt2 form a sequence that is

  1. Cauchy but not convergent in ℚ\mathbb Q.
  2. Convergent in ℚ\mathbb Q.Its only possible limit is 2\sqrt2, which is not rational.
  3. Not Cauchy.Terms after the nn-th differ by less than 10−n10^{-n}.
ℚ\mathbb Q is not complete. Completeness is exactly what ℝ\R adds, and it is a property of the metric, not just the topology.

The alternating harmonic series 1−12+13−…1-\tfrac12+\tfrac13-\dots converges. If you rearrange its terms, the sum

  1. is always ln⁡2\ln2.That holds for absolutely convergent series only.
  2. can be made any real number you like.
  3. always diverges.Many rearrangements still converge.
Riemann's rearrangement theorem (Rudin 3.54): a conditionally convergent series can be rearranged to converge to any value, or to diverge. Absolutely convergent series can be rearranged freely (Rudin 3.55).

Every bounded sequence in ℝk\R^k has

  1. a limit.(−1)n(-1)^n is bounded with no limit.
  2. a convergent subsequence.
  3. a monotone tail.Some subsequence is monotone, but not necessarily a tail.
Bolzano–Weierstrass (Rudin 3.6): bounded sets in ℝk\R^k lie in compact boxes, and in compact metric spaces every sequence has a convergent subsequence.

Practice

The ratio test misses thingsRudin 3.34

For ∑1/n\sum1/n and ∑1/n2\sum1/n^2, compute lim⁡|an+1/an|\lim|a_{n+1}/a_n|. What does the ratio test conclude?

Solution

Both ratios tend to 1, so the test is inconclusive, yet one series diverges and the other converges. The ratio and root tests only detect geometric decay.

e is irrationalRudin 3.32

Using e=∑k≥01/k!e=\sum_{k\ge0}1/k!, show that if e=m/ne=m/n then n!(e−∑k≤n1/k!)n!\,(e-\sum_{k\le n}1/k!) is an integer in (0,1)(0,1).

Solution

If e=m/ne=m/n, then n!en!e and n!∑k≤n1/k!n!\sum_{k\le n}1/k! are integers, so their difference xx is too. But x=∑k>nn!/k!<1n+1+1(n+1)2+⋯=1n≤1x=\sum_{k>n}n!/k!<\frac1{n+1}+\frac1{(n+1)^2}+\dots=\frac1n\le1, and x>0x>0. No integer lies strictly between 0 and 1.

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 3.1Absolute values of convergent sequences

Prove that if {sn}\{s_n\} converges then {|sn|}\{|s_n|\} converges. Is the converse true?

Hint

The reverse triangle inequality.

Solution

||sn|−|s||≤|sn−s|\big||s_n|-|s|\big|\le|s_n-s|, so |sn|→|s||s_n|\to|s|. In the language of the story: x↦|x|x\mapsto|x| is continuous, and continuous maps preserve limits.

The converse is false: sn=(−1)ns_n=(-1)^n diverges, while |sn|=1|s_n|=1 converges. It is true when the limit is 0: |sn|→0|s_n|\to0 iff sn→0s_n\to0.

Exercise 3.3A nested square root

Let s1=2s_1=\sqrt2 and sn+1=2+sns_{n+1}=\sqrt{2+\sqrt{s_n}}. Prove that {sn}\{s_n\} converges and that sn<2s_n<2 for all nn.

Hint

Show by induction that the sequence is increasing and bounded by 2, then use monotone convergence.

Solution

Bounded: s1<2s_1<2, and if sn<2s_n<2 then sn+1<2+2<2s_{n+1}<\sqrt{2+\sqrt2}<2.

Increasing: s2=2+21/4>2=s1s_2=\sqrt{2+2^{1/4}}>\sqrt2=s_1. If sn>sn−1s_{n}>s_{n-1}, then sn>sn−1\sqrt{s_n}>\sqrt{s_{n-1}}, so sn+1>sns_{n+1}>s_n.

By Rudin 3.14 it converges, to some L∈(2,2]L\in(\sqrt2,2]. Passing to the limit (the map t↦2+tt\mapsto\sqrt{2+\sqrt t} is continuous), L=2+LL=\sqrt{2+\sqrt L}, i.e. L2−2=LL^2-2=\sqrt L. Numerically L≈1.831L\approx1.831.

Exercise 3.20Cauchy plus a convergent subsequence

Let {pn}\{p_n\} be a Cauchy sequence in a metric space, and suppose some subsequence pni→pp_{n_i}\to p. Prove the whole sequence converges to pp.

Hint

Split d(pn,p)d(p_n,p) through a term of the subsequence with a large index.

Solution

Given ε\varepsilon, choose NN with d(pm,pn)<ε/2d(p_m,p_n)<\varepsilon/2 for m,n≥Nm,n\ge N, and choose ii with ni≥Nn_i\ge N and d(pni,p)<ε/2d(p_{n_i},p)<\varepsilon/2. For n≥Nn\ge N, d(pn,p)≤d(pn,pni)+d(pni,p)<εd(p_n,p)\le d(p_n,p_{n_i})+d(p_{n_i},p)<\varepsilon.

Combined with Bolzano–Weierstrass this proves completeness of ℝk\R^k: a Cauchy sequence is bounded, so it has a convergent subsequence, and then the whole sequence converges.

InteractiveRudin, Ch. 2: Basic Topology · Ch. 4: Continuity

Compactness and uniform continuity

Compactness turns "for each point" into "for all points at once". Applied to the ε\varepsilon–δ\delta game, it says that on a compact set one δ\delta can serve every point. That is uniform continuity, and it is what makes integrals of continuous functions exist.

The idea

Compact (Rudin 2.32). KK is compact if every open cover of KK has a finite subcover.
Heine–Borel (Rudin 2.41). In ℝk\R^k, KK is compact iff it is closed and bounded, iff every infinite subset of KK has a limit point in KK.
Continuous images (Rudin 4.14–4.19). If ff is continuous and KK compact, then f(K)f(K) is compact. So a real continuous function on a compact set is bounded and attains its maximum and minimum, and it is uniformly continuous: for every ε\varepsilon there is one δ\delta with d(f(x),f(y))<εd(f(x),f(y))<\varepsilon whenever d(x,y)<δd(x,y)<\delta.

Compactness is a topological property (defined with open sets only), so it survives into the general setting of the story of continuity. Uniform continuity is not: it compares distances at different places, so it needs a metric.

Explore

Function and domain
The function on its domain.
The best δ at each point p for this ε. Uniform continuity asks for a positive lower bound.

Worked example

Prove that a continuous ff on a compact metric space KK is uniformly continuous (Rudin 4.19), using the open cover definition.

  1. Fix ε\varepsilon. What does continuity give at each point pp?

    A radius δp>0\delta_p>0 with d(f(q),f(p))<ε/2d(f(q),f(p))<\varepsilon/2 whenever d(q,p)<δpd(q,p)<\delta_p.

  2. Which open cover should we use, and why half the radius?

    Cover KK by the balls Nδp/2(p)N_{\delta_p/2}(p). By compactness finitely many, centred at p1,…,pnp_1,\dots,p_n, suffice. Let δ=12mini⁡δpi>0\delta=\tfrac12\min_i\delta_{p_i}>0. The halving leaves room for a second point.

  3. Finish: take d(x,y)<δd(x,y)<\delta.

    xx lies in some Nδpi/2(pi)N_{\delta_{p_i}/2}(p_i). Then d(y,pi)≤d(y,x)+d(x,pi)<δ+δpi/2≤δpid(y,p_i)\le d(y,x)+d(x,p_i)<\delta+\delta_{p_i}/2\le\delta_{p_i}. So both xx and yy are within δpi\delta_{p_i} of pip_i, and d(f(x),f(y))<ε/2+ε/2d(f(x),f(y))<\varepsilon/2+\varepsilon/2. The point of compactness: the minimum of finitely many positive numbers is positive.

Check your understanding

Which set is compact?

  1. (0,1](0,1]The cover by (1/n,2)(1/n,2) has no finite subcover.
  2. {0}∪{1/n:n≥1}\{0\}\cup\{1/n:n\ge1\}
  3. ℤ\mathbb ZUnbounded, so not compact.
Any open set containing 0 contains all but finitely many 1/n1/n; finitely many more open sets cover the rest. It is also closed and bounded.

f(x)=x2f(x)=x^2 on [0,∞)[0,\infty) is

  1. uniformly continuous, since it is continuous.Continuity gives a δ\delta for each point, not one for all.
  2. continuous but not uniformly continuous.
  3. not continuous at infinity.Infinity is not in the domain.
(x+δ)2−x2=2xδ+δ2(x+\delta)^2-x^2=2x\delta+\delta^2 exceeds any ε\varepsilon once xx is large, so the best δ\delta tends to 0. The domain is not compact. Compare with the figure.

A continuous f:[0,1]→ℝf:[0,1]\to\R takes the values −1-1 and 22. Which fact guarantees a zero?

  1. Compactness of [0,1][0,1].Compactness gives a maximum and minimum, not intermediate values.
  2. Connectedness of [0,1][0,1].
  3. Uniform continuity.Uniform continuity alone doesn't force intermediate values (think of a function on two separated intervals).
Continuous images of connected sets are connected (Rudin 4.22), and connected subsets of ℝ\R are intervals. This is the intermediate value theorem, and again it only uses open sets.

Practice

An open cover with no finite subcoverCompactness fails

Give an open cover of (0,1)(0,1) with no finite subcover. Why does the same idea fail for [0,1][0,1]?

Solution

{(1/n,1)}n≥2\{(1/n,1)\}_{n\ge2}: finitely many of them have a largest nn, and miss (0,1/n](0,1/n]. For [0,1][0,1], any cover must have a set containing 0, and that set contains some [0,r)[0,r); the sets (1/n,1)(1/n,1) alone don't cover [0,1][0,1].

Lipschitz implies uniformly continuousA δ that works everywhere

If |f(x)−f(y)|≤L|x−y||f(x)-f(y)|\le L|x-y| for all x,yx,y, show ff is uniformly continuous, and that x\sqrt x on [0,1][0,1] is uniformly continuous but not Lipschitz.

Solution

Take δ=ε/L\delta=\varepsilon/L. For x\sqrt x: it is continuous on the compact [0,1][0,1], hence uniformly continuous; but x/x=1/x\sqrt x/x=1/\sqrt x is unbounded near 0, so no LL works.

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 2.12Compactness from the definition

Let K={0}∪{1/n:n≥1}⊆ℝK=\{0\}\cup\{1/n:n\ge1\}\subseteq\R. Prove KK is compact directly from the open-cover definition, without Heine–Borel.

Hint

Start with an open set of the cover that contains 0.

Solution

Let {Gα}\{G_\alpha\} be an open cover. Some Gα0∋0G_{\alpha_0}\ni0. Being open, it contains (−r,r)(-r,r) for some r>0r>0, hence every 1/n1/n with n>1/rn>1/r. The finitely many remaining points 1/n1/n, n≤1/rn\le1/r, each lie in some GαnG_{\alpha_n}. These finitely many sets cover KK.

Exercise 4.14A fixed point theorem

Let I=[0,1]I=[0,1]. Prove that every continuous f:I→If:I\to I has a fixed point: f(x)=xf(x)=x for some x∈Ix\in I.

Hint

Apply the intermediate value theorem to g(x)=f(x)−xg(x)=f(x)-x.

Solution

gg is continuous, g(0)=f(0)≥0g(0)=f(0)\ge0 and g(1)=f(1)−1≤0g(1)=f(1)-1\le0. Since [0,1][0,1] is connected, g(I)g(I) is a connected subset of ℝ\R (Rudin 4.22), i.e. an interval, containing a number ≥0\ge0 and a number ≤0\le0, hence 0.

This is the one-dimensional Brouwer fixed point theorem. It uses only topological facts: continuity and connectedness, no distances. Compare the contraction principle (Rudin 9.23), which needs a metric but gives uniqueness and a way to compute the fixed point.

InteractiveRudin, Ch. 5: Differentiation

The derivative and the mean value theorem

The derivative is a limit of difference quotients, so everything from the story of continuity applies to it. The mean value theorem is the workhorse: it turns information about f′f' into information about ff.

The idea

Derivative (Rudin 5.1). f′(x)=limt→x⁡f(t)−f(x)t−xf'(x)=\lim_{t\to x}\dfrac{f(t)-f(x)}{t-x}, when the limit exists. Differentiable functions are continuous (Rudin 5.2), but not conversely: |x||x| at 0.
Mean value theorem (Rudin 5.10). If ff is continuous on [a,b][a,b] and differentiable on (a,b)(a,b), there is c∈(a,b)c\in(a,b) with f(b)−f(a)=f′(c)(b−a)f(b)-f(a)=f'(c)(b-a).

The proof uses everything so far: the function h(x)=f(x)−f(a)−f(b)−f(a)b−a(x−a)h(x)=f(x)-f(a)-\frac{f(b)-f(a)}{b-a}(x-a) is continuous on a compact set, so it attains a maximum or minimum inside (a,b)(a,b) (or is constant), and at an interior extremum the derivative is zero (Rudin 5.8).

Explore

Function
Drag the endpoints a and b. Every point c where the tangent is parallel to the secant is marked.

Worked example

Show that if |f′(x)|≤M|f'(x)|\le M on an interval, then |f(x)−f(y)|≤M|x−y||f(x)-f(y)|\le M|x-y| there, and deduce that f′=0f'=0 on an interval forces ff to be constant.

  1. Apply the mean value theorem between xx and yy.

    f(x)−f(y)=f′(c)(x−y)f(x)-f(y)=f'(c)(x-y) for some cc between them, so |f(x)−f(y)|≤M|x−y||f(x)-f(y)|\le M|x-y|.

  2. Take M=0M=0.

    Then f(x)=f(y)f(x)=f(y) for all x,yx,y: ff is constant. The interval matters: on (0,1)∪(2,3)(0,1)\cup(2,3) a function can have zero derivative and two different values.

Check your understanding

For f(x)=|x|f(x)=|x| on [−1,2][-1,2], is there cc with f′(c)=f(2)−f(−1)3=13f'(c)=\dfrac{f(2)-f(-1)}{3}=\tfrac13?

  1. Yes, at c=0c=0.ff isn't differentiable at 0.
  2. No; the theorem's hypothesis fails at 0.
f′=±1f'=\pm1 wherever it exists. Differentiability on the whole open interval is essential. Try it in the figure.

f(x)=x2sin⁡(1/x)f(x)=x^2\sin(1/x) (with f(0)=0f(0)=0) is differentiable everywhere. Is f′f' continuous at 0?

  1. Yes.Compute f′(x)f'(x) for x≠0x\ne0 and look at its limit.
  2. No: f′(0)=0f'(0)=0 but f′(x)=2xsin⁡(1/x)−cos⁡(1/x)f'(x)=2x\sin(1/x)-\cos(1/x) has no limit at 0.
Derivatives need not be continuous. They do, however, have the intermediate value property (Darboux, Rudin 5.12), so they can't have simple jumps.

Practice

L'Hospital's rule, onceRudin 5.13

Compute limx→0⁡1−cos⁡xx2\lim_{x\to0}\dfrac{1-\cos x}{x^2} with L'Hospital's rule, and check the hypotheses.

Solution

Numerator and denominator tend to 0 and are differentiable near 0 with 2x≠02x\ne0 for x≠0x\ne0. The quotient of derivatives sin⁡x/(2x)→12\sin x/(2x)\to\tfrac12, so the limit is 12\tfrac12.

Taylor with remainderRudin 5.15

Use Taylor's theorem to show |sin⁡x−(x−x3/6)|≤|x|5/120|\sin x-(x-x^3/6)|\le|x|^5/120.

Solution

The degree-4 Taylor polynomial of sin⁡\sin at 0 is x−x3/6x-x^3/6 (the x4x^4 term vanishes), and the remainder is sin(5)⁡(ξ)x5/5!=cos⁡(ξ)x5/120\sin^{(5)}(\xi)x^5/5!=\cos(\xi)x^5/120 for some ξ\xi between 0 and xx. Its absolute value is at most |x|5/120|x|^5/120.

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 5.1A tiny difference quotient

Suppose |f(x)−f(y)|≤(x−y)2|f(x)-f(y)|\le(x-y)^2 for all real x,yx,y. Prove ff is constant.

Hint

Divide by |x−y||x-y| and let y→xy\to x.

Solution

For y≠xy\ne x, |f(y)−f(x)y−x|≤|y−x|→0\left|\dfrac{f(y)-f(x)}{y-x}\right|\le|y-x|\to0. So f′(x)=0f'(x)=0 for every xx, and by the mean value theorem f(x)−f(y)=f′(c)(x−y)=0f(x)-f(y)=f'(c)(x-y)=0.

Exercise 5.2Positive derivative and the inverse function

Suppose f′(x)>0f'(x)>0 on (a,b)(a,b). Prove ff is strictly increasing there, and that its inverse gg is differentiable with g′(f(x))=1/f′(x)g'(f(x))=1/f'(x).

Hint

The mean value theorem for monotonicity. For g′g', write the difference quotient of gg in terms of ff, and use that gg is continuous.

Solution

For x<yx<y, f(y)−f(x)=f′(c)(y−x)>0f(y)-f(x)=f'(c)(y-x)>0. So ff is strictly increasing, hence injective, and maps (a,b)(a,b) onto an interval JJ (it is continuous, so the image is connected). g:J→(a,b)g:J\to(a,b) is increasing and its image is an interval, so it has no jumps: gg is continuous.

Fix y0=f(x0)y_0=f(x_0). For y≠y0y\ne y_0 in JJ, with x=g(y)x=g(y),

g(y)−g(y0)y−y0=x−x0f(x)−f(x0).\frac{g(y)-g(y_0)}{y-y_0}=\frac{x-x_0}{f(x)-f(x_0)}.

As y→y0y\to y_0, continuity of gg gives x→x0x\to x_0, so the right side tends to 1/f′(x0)1/f'(x_0).

Exercise 5.3Small perturbations of the identity are injective

Suppose gg is differentiable on ℝ\R with |g′|≤M|g'|\le M. For ε>0\varepsilon>0 let f(x)=x+εg(x)f(x)=x+\varepsilon g(x). Prove ff is one-to-one when ε\varepsilon is small enough, and find admissible ε\varepsilon depending only on MM.

Hint

f′=1+εg′f'=1+\varepsilon g'. When is it positive?

Solution

f′(x)=1+εg′(x)≥1−εMf'(x)=1+\varepsilon g'(x)\ge1-\varepsilon M. If ε<1/M\varepsilon<1/M, then f′>0f'>0 everywhere, so ff is strictly increasing by Exercise 5.2, hence one-to-one. (If M=0M=0, every ε\varepsilon works.)

Alternatively, |f(x)−f(y)|≥|x−y|−εM|x−y|>0|f(x)-f(y)|\ge|x-y|-\varepsilon M|x-y|>0 for x≠yx\ne y. This is a baby version of the inverse function theorem.

InteractiveRudin, Ch. 6: The Riemann–Stieltjes Integral

The Riemann–Stieltjes integral

Squeeze the area between upper and lower sums. Rudin does this against a general increasing weight α\alpha, which covers ordinary integrals, finite sums and probability expectations in one definition.

The idea

Upper and lower sums (Rudin 6.1–6.2). For a partition P:a=x0<⋯<xn=bP:a=x_0<\dots<x_n=b, let Mi=sup[xi−1,xi]⁡fM_i=\sup_{[x_{i-1},x_i]}f, mi=inf⁡fm_i=\inf f, and Δαi=α(xi)−α(xi−1)\Delta\alpha_i=\alpha(x_i)-\alpha(x_{i-1}). Then U(P,f,α)=∑MiΔαiU(P,f,\alpha)=\sum M_i\Delta\alpha_i and L(P,f,α)=∑miΔαiL(P,f,\alpha)=\sum m_i\Delta\alpha_i. f∈ℛ(α)f\in\mathscr R(\alpha) if infP⁡U=supP⁡L\inf_PU=\sup_PL, and the common value is ∫fdα\int f\,d\alpha.
Riemann's criterion (Rudin 6.6, 6.8). f∈ℛ(α)f\in\mathscr R(\alpha) iff for every ε\varepsilon some partition has U−L<εU-L<\varepsilon. Every continuous ff on [a,b][a,b] is integrable, because it is uniformly continuous: once the mesh is below δ\delta, each Mi−mi<εM_i-m_i<\varepsilon.

With α(x)=x\alpha(x)=x this is the Riemann integral. If α\alpha jumps by 1 at x0x_0 and is constant elsewhere, ∫fdα=f(x0)\int f\,d\alpha=f(x_0) for continuous ff: a point mass. Sums and integrals become one thing.

Explore

Integrand f
Weight α
Upper rectangles (height Mi) in gold, lower (height mi) in blue, on a uniform partition of [0, 1]. The sums weight each piece by Δαi, not by its width.

Worked example

Compute ∫01x2dx\int_0^1x^2\,dx from the definition with uniform partitions.

  1. Write U(Pn)U(P_n) and L(Pn)L(P_n) for Pn={k/n}P_n=\{k/n\}.

    x2x^2 is increasing, so Mk=(k/n)2M_k=(k/n)^2 and mk=((k−1)/n)2m_k=((k-1)/n)^2. Then U=1n3∑k=1nk2=(n+1)(2n+1)6n2U=\frac1{n^3}\sum_{k=1}^nk^2=\frac{(n+1)(2n+1)}{6n^2} and L=(n−1)(2n−1)6n2L=\frac{(n-1)(2n-1)}{6n^2}.

  2. Conclude.

    U−L=1/n→0U-L=1/n\to0, so x2x^2 is integrable, and both sums tend to 13\tfrac13. The figure shows U−LU-L shrinking like 1/n1/n.

Check your understanding

For f=𝟏ℚf=\mathbf 1_{\mathbb Q} on [0,1][0,1] and α(x)=x\alpha(x)=x, what are U(P)U(P) and L(P)L(P) for every partition?

  1. U=1U=1, L=0L=0.
  2. Both tend to 0 as the mesh shrinks.Every subinterval contains rationals, so every Mi=1M_i=1.
Rationals and irrationals are dense, so Mi=1M_i=1, mi=0m_i=0 always. The function is not Riemann integrable. (It is Lebesgue integrable with integral 0, which is one reason measure theory exists.)

If α\alpha jumps by 1 at x0=0.3x_0=0.3 and is constant elsewhere, and ff is continuous, ∫01fdα=\int_0^1f\,d\alpha=

  1. 0Δα\Delta\alpha is 1 on the subinterval containing 0.3.
  2. f(0.3)f(0.3)
  3. ∫01f(x)dx\int_0^1f(x)\,dxThat is the case α(x)=x\alpha(x)=x.
Only the subinterval containing the jump contributes, with weight 1, and both MiM_i and mim_i tend to f(0.3)f(0.3) by continuity (Rudin 6.15).

Practice

The fundamental theoremRudin 6.21

If FF is differentiable on [a,b][a,b] with F′=fF'=f integrable, show ∫abf=F(b)−F(a)\int_a^bf=F(b)-F(a).

Hint

Apply the mean value theorem to FF on each subinterval of a partition.

Solution

For any partition, F(b)−F(a)=∑(F(xi)−F(xi−1))=∑f(ti)ΔxiF(b)-F(a)=\sum(F(x_i)-F(x_{i-1}))=\sum f(t_i)\Delta x_i for some tit_i in each piece, by the mean value theorem. This Riemann sum lies between L(P,f)L(P,f) and U(P,f)U(P,f). Since ff is integrable, both squeeze to ∫f\int f, so F(b)−F(a)=∫fF(b)-F(a)=\int f.

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 6.1A function supported at one point

Let α\alpha be increasing on [a,b][a,b] and continuous at x0∈[a,b]x_0\in[a,b]. Let f(x0)=1f(x_0)=1 and f(x)=0f(x)=0 for x≠x0x\ne x_0. Prove f∈ℛ(α)f\in\mathscr R(\alpha) and ∫fdα=0\int f\,d\alpha=0.

Hint

L(P,f,α)=0L(P,f,\alpha)=0 always. Make the piece containing x0x_0 have small Δα\Delta\alpha.

Solution

Every subinterval contains points where f=0f=0, so every mi=0m_i=0 and L(P)=0L(P)=0. For U(P)U(P), only the subintervals containing x0x_0 (at most two) have Mi=1M_i=1. Given ε\varepsilon, continuity of α\alpha at x0x_0 gives δ\delta with α(x0+δ)−α(x0−δ)<ε\alpha(x_0+\delta)-\alpha(x_0-\delta)<\varepsilon. Take a partition with x0±δx_0\pm\delta as consecutive points around x0x_0 (clipped to [a,b][a,b]). Then U(P)<εU(P)<\varepsilon. Hence inf⁡U=0=sup⁡L\inf U=0=\sup L.

Compare the quiz in this module: if α\alpha jumps at x0x_0, the same ff integrates to the size of the jump.

Exercise 6.2A nonnegative continuous function with zero integral

Suppose f≥0f\ge0 is continuous on [a,b][a,b] and ∫abf=0\int_a^bf=0. Prove f=0f=0 on [a,b][a,b].

Hint

If f(x0)>0f(x_0)>0, continuity keeps ff above f(x0)/2f(x_0)/2 on an interval.

Solution

Suppose f(x0)=c>0f(x_0)=c>0. By continuity there is an interval J⊆[a,b]J\subseteq[a,b] of length ℓ>0\ell>0 containing x0x_0 on which f>c/2f>c/2. Since f≥0f\ge0, ∫abf≥∫Jf≥cℓ/2>0\int_a^bf\ge\int_Jf\ge c\ell/2>0, a contradiction.

Exercise 6.1 shows continuity is essential: there f≥0f\ge0, f≠0f\ne0, and the integral is 0.

Exercise 6.4The rational indicator

Let f(x)=0f(x)=0 for irrational xx and f(x)=1f(x)=1 for rational xx. Prove f∉ℛf\notin\mathscr R on [a,b][a,b] for any a<ba<b.

Hint

Every subinterval contains both kinds of numbers.

Solution

Every subinterval of every partition contains rationals and irrationals (both are dense), so Mi=1M_i=1, mi=0m_i=0, U(P,f)=b−aU(P,f)=b-a and L(P,f)=0L(P,f)=0 for every PP. Since inf⁡U=b−a≠0=sup⁡L\inf U=b-a\ne0=\sup L, ff is not integrable. Try it in the figure: the gap never closes.

InteractiveRudin, Ch. 7: Sequences and Series of Functions

Uniform convergence

Pointwise limits of continuous functions can be discontinuous. Uniform convergence is the fix, and it is just convergence in the metric d(f,g)=sup⁡|f−g|d(f,g)=\sup|f-g|: the story of continuity, applied to a space whose points are functions.

The idea

Pointwise vs uniform (Rudin 7.1, 7.7). fn→ff_n\to f pointwise if fn(x)→f(x)f_n(x)\to f(x) for each xx (the NN may depend on xx). Uniformly if for every ε\varepsilon one NN works for all xx: equivalently supx⁡|fn(x)−f(x)|→0\sup_x|f_n(x)-f(x)|\to0 (Rudin 7.9).
Uniform limits keep continuity (Rudin 7.12). If continuous fn→ff_n\to f uniformly, ff is continuous. Uniform limits also commute with integrals (Rudin 7.16), but not with derivatives without more hypotheses (Rudin 7.17).

In the language of the story: C([a,b])C([a,b]) with the sup metric is a complete metric space (Rudin 7.15), and the Weierstrass theorem (Rudin 7.26) says polynomials are dense in it. Pointwise convergence, by contrast, is convergence in a topology that comes from no metric.

Explore

Sequence fn
The limit f in ink, with an ε-tube around it. fn is in blue where it stays in the tube and red where it leaves.

Worked example

Prove Rudin 7.12: a uniform limit of continuous functions is continuous.

  1. Fix pp and ε\varepsilon. Which nn do you use?

    One with sup⁡|fn−f|<ε/3\sup|f_n-f|<\varepsilon/3. This is where uniformity matters: the same nn is good at pp and at every nearby xx.

  2. Now use continuity of that fnf_n at pp.

    Pick δ\delta with |fn(x)−fn(p)|<ε/3|f_n(x)-f_n(p)|<\varepsilon/3 when |x−p|<δ|x-p|<\delta. Then |f(x)−f(p)|≤|f(x)−fn(x)|+|fn(x)−fn(p)|+|fn(p)−f(p)|<ε|f(x)-f(p)|\le|f(x)-f_n(x)|+|f_n(x)-f_n(p)|+|f_n(p)-f(p)|<\varepsilon. This "ε/3\varepsilon/3 argument" is the template for many proofs in analysis.

Check your understanding

fn(x)=xnf_n(x)=x^n on [0,1][0,1] converges pointwise to ff with f(1)=1f(1)=1 and f=0f=0 elsewhere. Is the convergence uniform?

  1. Yes, since each fnf_n is continuous.Continuity of the fnf_n doesn't force uniform convergence.
  2. No: a uniform limit of continuous functions would be continuous.
Rudin 7.12 in reverse: ff is discontinuous at 1, so the convergence can't be uniform. Directly, sup[0,1)⁡xn=1\sup_{[0,1)}x^n=1 for every nn. On [0,0.9][0,0.9] it is uniform, with sup⁡=0.9n\sup=0.9^n.

fn(x)=nxe−nxf_n(x)=nxe^{-nx} on [0,∞)[0,\infty) tends to 0 pointwise. Then supx⁡fn(x)\sup_x f_n(x)

  1. tends to 0.Look at x=1/nx=1/n.
  2. equals 1/e1/e for every nn.
The maximum is at x=1/nx=1/n with value e−1e^{-1}. The bump slides toward 0 and never shrinks: pointwise but not uniform convergence, even though the limit is continuous.

Practice

The Weierstrass M-testRudin 7.10

Show that ∑n≥1sin⁡(nx)n2\sum_{n\ge1}\dfrac{\sin(nx)}{n^2} converges uniformly on ℝ\R to a continuous function.

Solution

|sin⁡(nx)/n2|≤1/n2|\sin(nx)/n^2|\le1/n^2 and ∑1/n2<∞\sum1/n^2<\infty. The partial sums are uniformly Cauchy: supx⁡|∑k=mn…|≤∑k=mn1/k2→0\sup_x|\sum_{k=m}^n\dots|\le\sum_{k=m}^n1/k^2\to0. So they converge uniformly, and the limit is continuous by Rudin 7.12.

Limits and integralsWhen can you swap them?

For fn(x)=n2xe−nxf_n(x)=n^2xe^{-nx} on [0,1][0,1], compute lim⁡∫01fn\lim\int_0^1f_n and ∫01lim⁡fn\int_0^1\lim f_n.

Solution

fn→0f_n\to0 pointwise, so the second is 0. But ∫01n2xe−nxdx=∫0nue−udu→1\int_0^1n^2xe^{-nx}dx=\int_0^nue^{-u}du\to1. The convergence is not uniform (sup⁡fn=n/e\sup f_n=n/e), so Rudin 7.16 doesn't apply, and the swap fails.

From Rudin, Principles of Mathematical Analysis (3rd ed., McGraw–Hill, 1976)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 7.1Uniform limits of bounded functions

Prove that every uniformly convergent sequence of bounded functions is uniformly bounded.

Hint

Use one NN from the uniform Cauchy condition, then handle the finitely many earlier functions separately.

Solution

Let fn→ff_n\to f uniformly on EE. Choose NN with |fn(x)−fN(x)|<1|f_n(x)-f_N(x)|<1 for all n≥Nn\ge N and all xx (the uniform Cauchy condition, Rudin 7.8). fNf_N is bounded by some BB, so |fn|<B+1|f_n|<B+1 for n≥Nn\ge N. The finitely many f1,…,fN−1f_1,\dots,f_{N-1} are bounded by B1,…,BN−1B_1,\dots,B_{N-1}. Then max⁡(B+1,B1,…,BN−1)\max(B+1,B_1,\dots,B_{N-1}) bounds all fnf_n.

Exercise 7.2Sums and products

If fn→ff_n\to f and gn→gg_n\to g uniformly on EE, prove fn+gn→f+gf_n+g_n\to f+g uniformly. If in addition the fnf_n and gng_n are bounded, prove fngn→fgf_ng_n\to fg uniformly.

Hint

For the product, add and subtract fngf_ng and use Exercise 7.1.

Solution

Sums: sup⁡|(fn+gn)−(f+g)|≤sup⁡|fn−f|+sup⁡|gn−g|→0\sup|(f_n+g_n)-(f+g)|\le\sup|f_n-f|+\sup|g_n-g|\to0.

Products: by Exercise 7.1 there is BB with |fn|,|gn|≤B|f_n|,|g_n|\le B, and then |f|,|g|≤B|f|,|g|\le B too. Then |fngn−fg|≤|fn||gn−g|+|g||fn−f|≤Bsup⁡|gn−g|+Bsup⁡|fn−f|→0|f_ng_n-fg|\le|f_n||g_n-g|+|g||f_n-f|\le B\sup|g_n-g|+B\sup|f_n-f|\to0.

Without boundedness it fails: on ℝ\R, fn=gn=x+1/nf_n=g_n=x+1/n converge uniformly to xx, but fngn−x2=2x/n+1/n2f_ng_n-x^2=2x/n+1/n^2 is unbounded for each nn.

Exercise 7.9Uniform convergence and moving points

Let fnf_n be continuous and fn→ff_n\to f uniformly on EE. Prove fn(xn)→f(x)f_n(x_n)\to f(x) whenever xn→xx_n\to x in EE. Is the converse true?

Hint

Split |fn(xn)−f(x)||f_n(x_n)-f(x)| through f(xn)f(x_n), using that ff is continuous (Rudin 7.12).

Solution

|fn(xn)−f(x)|≤|fn(xn)−f(xn)|+|f(xn)−f(x)|≤sup⁡|fn−f|+|f(xn)−f(x)||f_n(x_n)-f(x)|\le|f_n(x_n)-f(x_n)|+|f(x_n)-f(x)|\le\sup|f_n-f|+|f(x_n)-f(x)|. The first term tends to 0 by uniformity, the second by continuity of ff.

The converse fails. Take fn(x)=x/nf_n(x)=x/n on E=ℝE=\R. If xn→xx_n\to x, then fn(xn)=xn/n→0=f(x)f_n(x_n)=x_n/n\to0=f(x), since xnx_n is bounded. But supℝ⁡|x/n|=∞\sup_{\R}|x/n|=\infty, so the convergence is not uniform. (On a compact EE the converse is true: this condition is called continuous convergence.)