Appendix B Results From Basic Analysis

I refuse to answer that question on the grounds that I don’t know the answer.

—Douglas Adams

For this book, we assume as a prerequisite a basic knowledge of analysis on the real line. Let us, however, survey some basic results that the reader might not have seen in such a course, and that are useful in the text. Furthermore, we require some of these results in metric spaces and although their proofs are essentially the same as on the real line, it is worth it to put them down. The text is partly adapted from [L1] and [L2]. See those two texts for more details.

B.1i  \  Sequences of functions

B.1.1i  •  Pointwise and uniform convergence and the uniform norm

In the following, S is any set.

Definition B.1.1.

The sequence {fn}n=1∞ of functions fn:S→ℝ converges pointwise to f:S→ℝ, if for every x∈S,

f⁡(x)=limn→∞fn⁢(x).

If we say fn:S→ℝ converges to f on T⊂S we mean that the restrictions of fn to T converge pointwise to f. As limits of sequences of numbers are unique, the limit function f is unique.

Pointwise convergence does not preserve much structure about f. For example, a pointwise limit of continuous functions is not continuous, see the exercises.

Definition B.1.2.

Let fn:S→ℝ and f:S→ℝ be functions. The sequence {fn} converges uniformly to f, if for every ϵ>0 there exists an N∈ℕ such that for all n≥N,

|fn⁢(x)−f⁡(x)|<ϵfor all ⁢x∈S.

In uniform convergence, N cannot depend on x. Given ϵ>0, we must find an N that works for all x∈S. See Figure B.1 for an illustration. It can easily be seen that uniform convergence implies pointwise convergence. The converse does not hold.

 

A thick curve f between two dashed curves f plus epsilon and f minus epsilon, and a wiggly curve f sub n staying within the dashed band.

Figure B.1: In uniform convergence, for n≥N, the functions fn are within a strip of ±ϵ from f.
 
Exercise B.1.1:

Let fn⁢(x)=xn be functions on [0,1].

  1. a)

    Show that {fn} converges pointwise to a discontinuous function.

  2. b)

    Prove that {fn} converges pointwise but not uniformly.

Exercise B.1.2:

Suppose fn:S→ℝ are functions that converge uniformly to f:S→ℝ. Suppose A⊂S. Show that the sequence of restrictions {fn|A} converges uniformly to f|A.

Exercise B.1.3:
  1. a)

    Suppose {fn} and {gn} defined on some set A converge pointwise to f and g, respectively. For a,b∈ℝ, show that {a⁢fn+b⁢gn} converges pointwise to a⁢f+b⁢g.

  2. b)

    Show the same for uniform convergence.

Exercise B.1.4:

Find an example of a sequence of functions {fn} and {gn} that converge uniformly to some f and g on some set A, but such that {fn⁢gn} (the multiple) does not converge uniformly to f⁢g on A.

Exercise B.1.5:

Suppose there exists a sequence of functions {gn} uniformly converging to 0 on A. Now suppose we have a sequence of functions {fn} and a function f on A such that

|fn⁢(x)−f⁡(x)|≤gn⁢(x)

for all x∈A. Show that {fn} converges uniformly to f on A.

Exercise B.1.6:

Let {fn}, {gn} and {hn} be sequences of functions on some set S. Suppose {fn} and {hn} converge uniformly to some function f:S→ℝ and suppose fn⁢(x)≤gn⁢(x)≤hn⁢(x) for all x∈S. Show that {gn} converges uniformly to f.

Exercise B.1.7:

Prove that if a sequence of functions fn:S→ℝ converge uniformly to a bounded function f:S→ℝ, then there exists an N such that for all n≥N, the fn are bounded.

Definition B.1.3.

For f:S→ℝ, define the uniform norm,

∥f∥S⁢=def⁢sup{|f⁡(x)|:x∈S}.

Note that if f is not bounded, then ∥f∥S=∞. Therefore, unless dealing with bounded functions, we treat the norm as an extended real, so it is not what people would call a “norm” unless we restrict to bounded functions.

Proposition B.1.4.

A sequence fn:S→ℝ converges uniformly to f:S→ℝ if and only if

limn→∞∥fn−f∥S=0.
Exercise B.1.8:

Prove the proposition.

We may say {fn} converges to f in uniform norm instead of converges uniformly. The proposition says that the two notions are the same thing. It is generally easiest to think about uniform convergence of functions using metric spaces. A Cauchy sequence of functions in the uniform norm is said to be Cauchy in the uniform norm or uniformly Cauchy.

Proposition B.1.5.

The set of bounded real-valued functions on S is a complete metric space with the metric d⁡(f,g)=∥f−g∥S. In particular, if a sequence is uniformly Cauchy, then it is uniformly convergent.

Exercise B.1.9:

Prove the proposition. There are two things to prove. First, prove that the set is a metric space, that is, d⁡(f,g) is a metric. Second, prove that it is complete.

Remark B.1.6.

It is perhaps surprising that on the set of functions f:S→ℝ for an uncountable S, there is no metric that gives pointwise convergence. You could even require f to be bounded and/or continuous, and there is still no metric. A metric space (X,d) is so-called first countable, that is, at each x∈X there exists a sequence of neighborhoods Uj such that any neighborhood U of x contains one of the Ujs, a so-called countable neighborhood basis. In a metric space, B⁡(x,1/n) does the job. But functions on an uncountable set S with pointwise convergence do not have a first countable topology. We do not want to wade too deep into general topology to prove this fact.

B.1.2i  •  Continuity of the limit

If we have a sequence {fn} of continuous functions, is the limit continuous? We have seen that for pointwise convergence, it need not be the case, see Exercise B.1.1. If we, however, require the convergence to be uniform, the limits can be interchanged.

Theorem B.1.7.

Let S be a metric space. Let {fn} be a sequence of continuous functions fn:S→ℝ converging uniformly to f:S→ℝ. Then f is continuous.

Proof.

Let x∈S be fixed. Let {xn} be a sequence in S converging to x. Let ϵ>0 be given. As {fk} converges uniformly to f, we find a k∈ℕ such that

|fk⁢(y)−f⁡(y)|<ϵ/3

for all y∈S. As fk is continuous at x, we find an N∈ℕ such that for m≥N we have

|fk⁢(xm)−fk⁢(x)|<ϵ/3.

Thus for m≥N,

|f⁡(xm)−f⁡(x)|⁠=|f⁡(xm)−fk⁢(xm)+fk⁢(xm)−fk⁢(x)+fk⁢(x)−f⁡(x)|⁠≤|f⁡(xm)−fk⁢(xm)|+|fk⁢(xm)−fk⁢(x)|+|fk⁢(x)−f⁡(x)|⁠<ϵ/3+ϵ/3+ϵ/3=ϵ.

Therefore, {f⁡(xm)} converges to f⁡(x) and hence f is continuous at x. As x was arbitrary, f is continuous everywhere. ∎

In the language of metric spaces, as uniform limits of continuous functions are continuous, the set of bounded continuous functions is a complete metric space. The proof is left as an exercise. More precisely, let Cb⁢(S,ℝ) denote the set of bounded real-valued continuous functions on S. We use the uniform norm as metric and Cb⁢(S,ℝ) is a metric space for any S. If S is compact, then all continuous functions are bounded and C⁡(S,ℝ) itself is a metric space.

Corollary B.1.8.

Let S be a metric space. Then Cb⁢(S,ℝ) is a complete metric space. If S is compact, then C⁡(S,ℝ) is a complete metric space.

Exercise B.1.10:
Definition B.1.9.

A sequence of functions fn:S→ℝ converges uniformly on compact subsets if for every compact K⊂S the sequence {fn} converges uniformly on K.

Corollary B.1.10.

Let U⊂ℝn be open. If fn:U→ℝ is a sequence of continuous functions converging uniformly on compact subsets, then the limit is continuous.

Exercise B.1.11:

Prove the corollary.

B.1.3i  •  Integral of the limit

As with continuity, if we simply require pointwise convergence, then the integral of a limit of a sequence of functions need not be equal to the limit of the integrals.

Example B.1.11:

Let χT be the characteristic function of a set T, that is, χT⁢(x)=1 if x∈T and χT⁢(x)=0 otherwise. The functions n⁢χ(0,1/n) all integrate (on the interval [0,1]) to 1. Their pointwise limit is 0 (whose integral is 0).

If we require the convergence to be uniform, the limits can be interchanged.

Theorem B.1.12.

Let {fn} be a sequence of Riemann integrable functions fn:[a,b]→ℝ converging uniformly to f:[a,b]→ℝ. Then f is Riemann integrable and

∫abf⁡(x)⁢𝑑x=limn→∞∫abfn⁢(x)⁢𝑑x.

In the following, let ∫ab¯⁢f⁢(x)⁢𝑑x and ∫ab¯⁢f⁢(x)⁢𝑑x denote the upper and lower Darboux integral. Briefly,

∫ab¯⁢f⁢(t)⁢𝑑t⁢=def⁢inf{∫abs⁡(t)⁢𝑑t:s⁢ is a step function and ⁢f⁢(t)≤s⁡(t)⁢ for ⁢t∈[a,b]},
∫ab¯⁢f⁢(t)⁢𝑑t⁢=def⁢sup{∫abs⁡(t)⁢𝑑t:s⁢ is a step function and ⁢s⁢(t)≤f⁡(t)⁢ for ⁢t∈[a,b]}.

The definition of the Riemann integral using Darboux sums and integrals is beyond the scope of this book, but let us just mention that if the upper and lower Darboux integrals are equal, then a function is Riemann integrable, and the common value is the integral. Given this fact, let us prove the theorem.

Proof.

Let ϵ>0 be given. As fn goes to f uniformly, we find an M∈ℕ such that for all n≥M, we have |fn⁢(x)−f⁡(x)|<ϵ2⁢(b−a) for all x∈[a,b]. In particular, by reverse triangle inequality |f⁡(x)|<ϵ2⁢(b−a)+|fn⁢(x)| for all x, hence f is bounded as fn is bounded. Note that fn is integrable and compute

∫ab¯ f⁡(x)⁢𝑑x−∫ab¯⁢f⁢(x)⁢𝑑x
⁠=∫ab¯⁢(f⁡(x)−fn⁢(x)+fn⁢(x))⁢𝑑x−∫ab¯⁢(f⁡(x)−fn⁢(x)+fn⁢(x))⁢𝑑x
⁠≤∫ab¯⁢(f⁡(x)−fn⁢(x))⁢𝑑x+∫ab¯⁢fn⁢(x)⁢𝑑x−∫ab¯⁢(f⁡(x)−fn⁢(x))⁢𝑑x−∫ab¯⁢fn⁢(x)⁢𝑑x
⁠=∫ab¯⁢(f⁡(x)−fn⁢(x))⁢𝑑x+∫abfn⁢(x)⁢𝑑x−∫ab¯⁢(f⁡(x)−fn⁢(x))⁢𝑑x−∫abfn⁢(x)⁢𝑑x
⁠=∫ab¯⁢(f⁡(x)−fn⁢(x))⁢𝑑x−∫ab¯⁢(f⁡(x)−fn⁢(x))⁢𝑑x
⁠≤ϵ2⁢(b−a)⁢(b−a)+ϵ2⁢(b−a)⁢(b−a)=ϵ.

The first inequality is due to the upper integral being only subadditive (∫¯⁢(a+b)≤∫¯⁢a+∫¯⁢b) and the lower integral being superadditive. The final inequality follows from the fact that for all x∈[a,b], we have −ϵ2⁢(b−a)<f⁡(x)−fn⁢(x)<ϵ2⁢(b−a). As ϵ>0 was arbitrary, f is Riemann integrable.

We compute ∫abf⁡(x)⁢𝑑x. For n≥M (M is the same as above),

|∫abf⁡(x)⁢𝑑x−∫abfn⁢(x)⁢𝑑x|⁠=|∫ab(f⁡(x)−fn⁢(x))⁢𝑑x|⁠≤ϵ2⁢(b−a)⁢(b−a)=ϵ2<ϵ.

Therefore, {∫abfn⁢(x)⁢𝑑x} converges to ∫abf⁡(x)⁢𝑑x. ∎

Remark B.1.13.

While we do not require the Lebesgue integral in this book, note that for the Lebesgue integral, a much stronger convergence theorem holds. In particular, the dominated convergence theorem implies that if {fn} is a sequence of measurable functions on [a,b], converging pointwise to f:[a,b]→ℝ, and such that {fn} is uniformly bounded (there is a single B∈ℝ such that ∥fn∥[a,b]≤B for all n), then

∫abf⁡(x)⁢𝑑x=limn→∞∫abfn⁢(x)⁢𝑑x.

Here, of course, the integrals must be the Lebesgue integrals, not the Riemann integrals. The pointwise limit of Riemann integrable functions need not even be Riemann integrable.

Exercise B.1.12:

Compute limn→∞∫12e−n⁢x2⁢𝑑x.

Exercise B.1.13:

Find a sequence of Riemann integrable functions fn:[0,1]→ℝ such that {fn} converges to zero pointwise, and such that

  1. a)

    {∫01fn⁢(x)⁢𝑑x}n=1∞ increases without bound,

  2. b)

    {∫01fn⁢(x)⁢𝑑x}n=1∞ is the sequence −1,1,−1,1,−1,1,….

B.1.4i  •  Derivative of the limit

Uniform convergence is enough to swap limits with integrals. It is not, however, enough to swap limits with derivatives, unless the derivatives themselves converge uniformly.

Example B.1.14:

The functions fn⁢(x)=sin⁡(n⁢x)n converge uniformly to 0. See Figure B.2. The derivative of the limit is 0. But fn′⁢(x)=cos⁡(n⁢x), and that sequence does not converge even pointwise: For example, fn′⁢(π)=(−1)n. Furthermore, fn′⁢(0)=1 for all n, which does converge, but not to 0.

 

Overlaid sine curves sin of n x quantity over n for n from 1 to 10, with amplitude decreasing and frequency increasing as n grows. One can see for example that at x equals pi, the graphs cross the x axis either upwards or downwards but always at the same angle.

Figure B.2: Graphs of sin⁡(n⁢x)n for n=1,2,…,10, with higher n in lighter gray.
 

The following theorem is true even if we do not assume continuity of the derivatives, but the proof is more difficult.

Theorem B.1.15.

Let I be a bounded interval and let fn:I→ℝ be continuously differentiable functions. Suppose {fn′} converges uniformly to g:I→ℝ, and suppose {fn⁢(c)}n=1∞ is a convergent sequence for some c∈I. Then {fn} converges uniformly to a continuously differentiable function f:I→ℝ, and f′=g.

Proof.

Define f⁡(c)=limn→∞fn⁢(c). As fn′ are continuous and hence Riemann integrable, via the fundamental theorem of calculus, we find that for x∈I,

fn⁢(x)=fn⁢(c)+∫cxfn′⁢(t)⁢𝑑t.

As {fn′} converges uniformly on I, it converges uniformly on [c,x] (or [x,c] if x<c). Thus, the limit on the right-hand side exists. Define f at the remaining points by

f⁡(x)=limn→∞fn⁢(c)+limn→∞∫cxfn′⁢(t)⁢𝑑t=f⁡(c)+∫cxg⁡(t)⁢𝑑t.

The function g is continuous, being the uniform limit of continuous functions. Hence, f is differentiable and f′⁢(x)=g⁡(x) for all x∈I by the fundamental theorem of calculus.

It remains to prove uniform convergence. Suppose I has a lower bound a and upper bound b. Let ϵ>0 be given. Take M such that for n≥M, we have |f⁡(c)−fn⁢(c)|<ϵ/2 and |g⁡(x)−fn′⁢(x)|<ϵ2⁢(b−a) for all x∈I. Then,

|f⁡(x)−fn⁢(x)|⁠=|f⁡(c)+∫cxg⁡(t)⁢𝑑t−fn⁢(c)−∫cxfn′⁢(t)⁢𝑑t|⁠≤|f⁡(c)−fn⁢(c)|+|∫cxg⁡(t)⁢𝑑t−∫cxfn′⁢(t)⁢𝑑t|⁠=|f⁡(c)−fn⁢(c)|+|∫cx(g⁡(t)−fn′⁢(t))⁢𝑑t|⁠<ϵ2+ϵ2⁢(b−a)⁢(b−a)=ϵ.∎

The proof goes through without boundedness of I, except for the uniform convergence of fn to f. For an example let I=ℝ and fn⁢(x)=x/n. Then fn′⁢(x)=1/n, which converges uniformly to 0. However, {fn} converges to 0 only pointwise.

Example B.1.16:

In Exercise A.1.8, you proved that the set of once continuously differentiable functions on [a,b], that is, C1⁢([a,b],ℝ), is a metric space with the so-called C1 metric (or C1 norm)

d⁡(f,g)=∥f−g∥C1⁢([a,b],ℝ)⁢=def⁢∥f−g∥[a,b]+∥f′−g′∥[a,b].

The theorem says that C1⁢([a,b],ℝ) is a complete metric space.

Exercise B.1.14:

Find an explicit example of a sequence of differentiable functions on [−1,1] that converge uniformly to a function f such that f is not differentiable. Hint: Perhaps x2+(1/n)2?

Exercise B.1.15:

Let fn⁢(x)=xnn. Show that {fn} converges uniformly to a differentiable function f on [0,1] (find f). However, show that f′⁢(1)≠limn→∞fn′⁢(1).

B.2i  \  Continuity, Fubini, derivatives under the integral

B.2.1i  •  Continuity

Let f⁡(x,y) be a function of two variables and define

g⁡(y)=∫abf⁡(x,y)⁢𝑑x.

The question is: Is g continuous? We are really asking when two limits commute, which is not always possible, so some extra hypothesis is necessary. A sufficient (but not necessary) condition is that f is continuous on a closed rectangle.

Proposition B.2.1.

If f:[a,b]×[c,d]→ℝ is continuous, then g:[c,d]→ℝ defined by

g⁡(y)=∫abf⁡(x,y)⁢𝑑xis continuous.
Proof.

Fix y∈[c,d], and let {yn} be a sequence in [c,d] converging to y. Let ϵ>0 be given. As f is continuous on the compact set [a,b]×[c,d], f is uniformly continuous. Thus, there exists a δ>0 such that whenever y~∈[c,d] and |y~−y|<δ, we have |f⁡(x,y~)−f⁡(x,y)|<ϵb−a for all x∈[a,b]. Suppose |y~−y|<δ. Then

|g⁡(y~)−g⁡(y)|=|∫abf⁡(x,y~)⁢𝑑x−∫abf⁡(x,y)⁢𝑑x|⁠=|∫ab(f⁡(x,y~)−f⁡(x,y))⁢𝑑x|≤(b−a)⁢ϵb−a=ϵ.∎

In applications, if we are interested in continuity at y0, we just need to apply the proposition in [a,b]×[y0−ϵ,y0+ϵ] for some small ϵ>0. For example, if f is continuous in [a,b]×ℝ, then g is continuous on ℝ.

Exercise B.2.1:

Prove a stronger version of Proposition B.2.1: If f:(a,b)×(c,d)→ℝ is a bounded continuous function, then g:(c,d)→ℝ defined by

g⁡(y)=∫abf⁡(x,y)⁢𝑑xis continuous.

Hint: First integrate over [a+1/n,b−1/n].

B.2.2i  •  Fubini’s theorem

Fubini’s theorem says that under some mild conditions one can generally swap the order of integrals in an iterated integral. We prove the following simple case of Fubini that is generally enough for the purposes of this book.

Theorem B.2.2 (Fubini).

Suppose f:[a,b]×[c,d]→ℝ is continuous. Then

∫cd∫abf⁡(x,y)⁢𝑑x⁢𝑑y=∫ab∫cdf⁡(x,y)⁢𝑑y⁢𝑑x.

One of the tricky bits about Fubini for the Riemann integral is that the integrand of the outer integral, for example ∫abf⁡(x,y)⁢𝑑x as a function of y, is not necessarily Riemann integrable even if f⁡(x,y) is Riemann integrable as a function of two variables. However, by the previous subsection, if f is continuous, then ∫abf⁡(x,y)⁢𝑑x is a continuous function of y and hence integrable. So for continuous functions we sidestep the integrability issues.11 1 For more complicated scenarios, the reader is encouraged to just learn the Lebesgue integral.

Proof.

As [a,b]×[c,d] is compact, f is uniformly continuous. So for any ϵ>0, there is a δ>0 such that if |x−x′|<δ and |y−y′|<δ, then |f⁡(x,y)−f⁡(x′,y′)|<ϵ. Let

gn⁢(x,y)={f⁡(a,y)if ⁢x=a,f⁡(a+k⁡(b−a)n,y)if ⁢a+(k−1)⁢(b−a)n<x≤a+k⁡(b−a)n,k=1,…,n.

This gn is the “right-hand rule” step function with subinterval length b−an: Integrating gn with respect to x is the right-hand rule for integrating f. Let n be large enough so that b−an<δ. Then, via the uniform continuity estimate, we find that |f⁡(x,y)−gn⁢(x,y)|<ϵ for all x and y. So

|∫abf⁡(x,y)⁢𝑑x−∫abgn⁢(x,y)⁢𝑑x|≤∫ab|f⁡(x,y)−gn⁢(x,y)|⁢𝑑x≤(b−a)⁢ϵ.

So ∫abgn⁢(x,y)⁢𝑑x converges uniformly as a function of y to ∫abf⁡(x,y)⁢𝑑x. Finally, the integral of gn is just the right-hand rule. Putting it all together,

∫cd∫abf⁡(x,y)⁢𝑑x⁢𝑑y⁠=∫cd(limn→∞∫abgn⁢(x,y)⁢𝑑x)⁢𝑑y⁠=limn→∞∫cd(∫abgn⁢(x,y)⁢𝑑x)⁢𝑑y⁠=limn→∞∫cd(∑k=1nb−an⁢f⁢(a+k⁡(b−a)n,y))⁢𝑑y⁠=limn→∞∑k=1nb−an⁢∫cdf⁡(a+k⁡(b−a)n,y)⁢𝑑y⁠=∫ab∫cdf⁡(x,y)⁢𝑑y⁢𝑑x.

The final equation is simply the realization that ∫cdf⁡(x,y)⁢𝑑y is a continuous function of x, hence integrable, and what we have is just the right-hand rule for the integral of this function over [a,b]. ∎

Exercise B.2.2:

Suppose f⁡(x,y)=1 if x∈ℚ and y=1/2 and 0 otherwise. Using the Riemann integral, prove that one of ∫01∫01f⁡(x,y)⁢𝑑x⁢𝑑y and ∫01∫01f⁡(x,y)⁢𝑑y⁢𝑑x exists and the other does not (the integrand is not a well-defined function).

Exercise B.2.3:

Compute

∫01∫01x2−y2(x2+y2)2⁢𝑑x⁢𝑑yand∫01∫01x2−y2(x2+y2)2⁢𝑑y⁢𝑑x.

You will need to interpret the integrals as improper, that is, the limit of ∫ϵ1 as ϵ↓0.

B.2.3i  •  Differentiation under the integral

Let f⁡(x,y) be a function of two variables and

g⁡(y)=∫abf⁡(x,y)⁢𝑑x.

If f is continuous on [a,b]×[c,d], then Proposition B.2.1 says that g is continuous on [c,d]. Suppose f is differentiable in y. Can we “differentiate under the integral?” Differentiation is a limit and we are again asking when two limits, namely integration and differentiation, commute. The first question we face is the integrability of ∂f∂y, but the formula can fail even if ∂f∂y is integrable as a function of x for every fixed y. We prove a simple, but perhaps the most useful, version of the theorem.

Theorem B.2.3 (Leibniz integral rule).

Suppose f:[a,b]×[c,d]→ℝ is a continuous function, such that ∂f∂y exists for all (x,y)∈[a,b]×[c,d] and is continuous. Define

g⁡(y)=∫abf⁡(x,y)⁢𝑑x.

Then g:[c,d]→ℝ is continuously differentiable and

g′⁢(y)=∫ab∂f∂y⁢(x,y)⁢𝑑x.

The hypotheses on f and ∂f∂y can be weakened to a degree. See, e.g., Exercise B.2.10. The proof below requires that ∂f∂y exists and is continuous as a function of two variables, and the x interval must be the entire closed interval [a,b]. The y interval [c,d] can be replaced by a small (open or closed) interval if needed, and in applications, we often make [c,d] be a small interval around the point where we need to differentiate.

Proof.

Fix y∈[c,d] and let ϵ>0 be given. As ∂f∂y is continuous on [a,b]×[c,d], it is uniformly continuous. In particular, there exists δ>0 such that whenever y1∈[c,d] with |y1−y|<δ and all x∈[a,b], we have

|∂f∂y⁢(x,y1)−∂f∂y⁢(x,y)|<ϵ.

Suppose h is such that y+h∈[c,d] and |h|<δ. Fix x for a moment and apply the mean value theorem to find a y1 between y and y+h such that

f⁡(x,y+h)−f⁡(x,y)h=∂f∂y⁢(x,y1).

As |y1−y|≤|h|<δ,

|f⁡(x,y+h)−f⁡(x,y)h−∂f∂y⁢(x,y)|=|∂f∂y⁢(x,y1)−∂f∂y⁢(x,y)|<ϵ.

This argument worked for every x∈[a,b]. Therefore, as a function of x

x↦f⁡(x,y+h)−f⁡(x,y)hconverges uniformly tox↦∂f∂y⁢(x,y)as ⁢h→0.

We defined uniform convergence for sequences although the idea is the same. You may replace h with a sequence of nonzero numbers {hn} converging to 0 such that y+hn∈[c,d] and let n→∞.

Consider the difference quotient of g,

g⁡(y+h)−g⁡(y)h=∫abf⁡(x,y+h)⁢𝑑x−∫abf⁡(x,y)⁢𝑑xh=∫abf⁡(x,y+h)−f⁡(x,y)h⁢𝑑x.

Uniform convergence implies the limit can be taken underneath the integral. So

limh→0g⁡(y+h)−g⁡(y)h=∫ablimh→0f⁡(x,y+h)−f⁡(x,y)h⁢𝑑x=∫ab∂f∂y⁢(x,y)⁢𝑑x.

Then g′ is continuous on [c,d] by Proposition B.2.1. ∎

Example B.2.4:

Consider

∫01x−1ln⁡(x)⁢𝑑x.

The integral exists as the function under the integral extends continuously to [0,1], see Exercise B.2.4. Trouble is finding it. Introduce a parameter y and define a function:

g⁡(y)=∫01xy−1ln⁡(x)⁢𝑑x.

The function xy−1ln⁡(x) also extends to a continuous function of x and y for (x,y)∈[0,1]×[0,1] (also in the exercise). See Figure B.3.

 

3D surface plot over the unit square that rises from 0 along the edges at x equals 0 and y equals 0 up to 1 at the corner 1 comma 1.

Figure B.3: The graph z=xy−1ln⁡(x) on [0,1]×[0,1].
 

Therefore, g is a continuous function on [0,1], and g⁡(0)=0. For 0<ϵ<1, the y derivative of the integrand, xy, is continuous on [0,1]×[ϵ,1]. Therefore, for y>0 we may differentiate under the integral sign

g′⁢(y)=∫01ln⁡(x)⁢xyln⁡(x)⁢𝑑x=∫01xy⁢𝑑x=1y+1.

We know g is continuous on [0,1], g⁡(0)=0, and for y∈(0,1), g is differentiable and g′⁢(y)=1y+1. So g⁡(1)=∫01g′⁢(y)⁢𝑑y=ln⁡(2). In other words,

∫01x−1ln⁡(x)⁢𝑑x=ln⁡(2).
Exercise B.2.4:

Prove the two statements that were asserted in Example B.2.4:

  1. a)

    Prove x−1ln⁡(x) extends to a continuous function on [0,1]. That is, there exists a continuous function on [0,1] that equals x−1ln⁡(x) on (0,1).

  2. b)

    Prove xy−1ln⁡(x) extends to a continuous function on [0,1]×[0,1].

Exercise B.2.5:

Suppose h:ℝ→ℝ is continuous and g:ℝ→ℝ is continuously differentiable and compactly supported (g is zero outside a compact interval). Define

f⁡(x)=∫−∞∞h⁡(y)⁢g⁡(x−y)⁢𝑑y.

Show that f is differentiable.

Exercise B.2.6:

Suppose f:ℝ→ℝ is an infinitely differentiable function (all derivatives exist) such that f⁡(0)=0.

  1. a)

    Show that there exists an infinitely differentiable function g:ℝ→ℝ such that f⁡(x)=x⁢g⁢(x).

  2. b)

    Show that if f′⁢(0)≠0, then g⁡(0)≠0.

Hint: First write f⁡(x)=∫0xf′⁢(s)⁢𝑑s and then rewrite the integral to go from 0 to 1.

Exercise B.2.7:

Let U⊂ℝn be open and suppose f⁡(x,y1,y2,…,yn) is a continuous function defined on [0,1]×U⊂ℝn+1. Suppose ∂f∂y1,∂f∂y2,…,∂f∂yn exist and are continuous on [0,1]×U. Prove that F:U→ℝ defined by

F⁡(y1,y2,…,yn)=∫01f⁡(x,y1,y2,…,yn)⁢𝑑x

is continuously differentiable (the partial derivatives exist and are continuous).

Exercise B.2.8:

Work out the following counterexample: Let

f⁡(x,y)={x⁢y3(x2+y2)2if ⁢x≠0⁢ or ⁢y≠0,0if ⁢x=0⁢ and ⁢y=0.
  1. a)

    Prove that for each fixed y the function x↦f⁡(x,y) is Riemann integrable on [0,1] and

    g⁡(y)=∫01f⁡(x,y)⁢𝑑x=y2⁢y2+2.

    Therefore g′⁢(y) exists and we get the continuous function

    g′⁢(y)=1−y22⁢(y2+1)2.
  2. b)

    Prove ∂f∂y exists at all x and y and compute it.

  3. c)

    Show that for all y

    ∫01∂f∂y⁢(x,y)⁢𝑑xexists, butg′⁢(0)≠∫01∂f∂y⁢(x,0)⁢𝑑x.
Exercise B.2.9:

Work out the following counterexample: Let

f⁡(x,y)={x⁢sin⁡(yx2+y2)if ⁢(x,y)≠(0,0),0if ⁢(x,y)=(0,0).
  1. a)

    Prove f is continuous on all of ℝ2. Therefore the following function is well-defined for every y∈ℝ:

    g⁡(y)=∫01f⁡(x,y)⁢𝑑x.
  2. b)

    Prove ∂f∂y exists for all (x,y), but is not continuous at (0,0).

  3. c)

    Show that ∫01∂f∂y⁢(x,0)⁢𝑑x does not exist even if we take improper integrals, that is, that the limit limh↓0∫h1∂f∂y⁢(x,0)⁢𝑑x does not exist.

Note: Feel free to use what you know about sine and cosine from calculus.

Exercise B.2.10:

Strengthen the Leibniz integral rule in the following way. Suppose f:(a,b)×(c,d)→ℝ is a bounded continuous function, such that ∂f∂y exists for all (x,y)∈(a,b)×(c,d) and is continuous and bounded. Define

g⁡(y)=∫abf⁡(x,y)⁢𝑑x.

Then g:(c,d)→ℝ is continuously differentiable and

g′⁢(y)=∫ab∂f∂y⁢(x,y)⁢𝑑x.

Hint: See also Exercise B.2.1 and Theorem B.1.15.

B.3i  \  The derivative in several real variables

B.3.1i  •  The derivative

In the following, the norm ∥⋅∥ of a vector in ℝn is the euclidean norm ∥x∥=x12+⋯+xn2. When applied to a linear mapping (a matrix) it is the operator norm:

∥A∥⁢=def⁢sup∥x∥=1∥A⁢x∥.

The following exercise collects some key facts about the operator norm for the reader who has not seen this norm yet.

Exercise B.3.1:
  1. a)

    Prove that if A is a linear mapping between finite-dimensional vector spaces, then ∥A∥<∞.

  2. b)

    Prove that if A is a linear mapping of vector spaces, then ∥A⁢x∥≤∥A∥⁢∥x∥.

  3. c)

    Find an explicit 2×2 matrix A and a vector x∈ℝ2 such that ∥A⁢x∥<∥A∥⁢∥x∥.

  4. d)

    If A is a 1×n or n×1 matrix, then the operator norm ∥A∥ is the same as the euclidean norm of the entries of A.

The derivative of f:ℝ→ℝ at x∈ℝ exists if there is a number a (the derivative of f at x) such that

limh→0|f⁡(x+h)−f⁡(x)h−a|=limh→0|f⁡(x+h)−f⁡(x)−a⁢h||h|=0.

Multiplying by a is a linear map in one dimension: h↦a⁢h. So the derivative is a linear map. Let us extend this idea to more variables.

Definition B.3.1.

Let U⊂ℝn be open. We say f:U→ℝm is (real) differentiable at x∈U if there exists a linear A:ℝn→ℝm such that

limh→0h∈ℝn∥f⁡(x+h)−f⁡(x)−A⁢h∥∥h∥=0.

We write D⁢f|x=A and we say A is the (real) derivative of f at x. When f is (real) differentiable at every x∈U, we say that f is (real) differentiable. See Figure B.4.

 

A curved surface y equals f of x sub 1 comma x sub 2 drawn over the x sub 1 x sub 2 plane with its tangent plane at a point, a vector h in the plane below, and the corresponding vertical change Ah.

Figure B.4: Illustration of a derivative for a function f:ℝ2→ℝ. The vector h is shown in the x1⁢x2-plane based at (x1,x2), and the vector A⁢h∈ℝ1 is shown along the y direction.
 

Intuitively, f is differentiable at x if f is “infinitesimally close” to a linear map near x. We cheated a bit and said that A is the derivative, let us prove we were justified.

Proposition B.3.2.

Let U⊂ℝn be open, f:U→ℝm a function, and x∈U. Suppose A,B:ℝn→ℝm are linear such that

limh→0∥f⁡(x+h)−f⁡(x)−A⁢h∥∥h∥=0andlimh→0∥f⁡(x+h)−f⁡(x)−B⁢h∥∥h∥=0.

Then A=B.

Proof.

Suppose h∈ℝn, h≠0. Compute

∥(A−B)⁢h∥∥h∥⁠=∥−(f⁡(x+h)−f⁡(x)−A⁢h)+f⁡(x+h)−f⁡(x)−B⁢h∥∥h∥⁠≤∥f⁡(x+h)−f⁡(x)−A⁢h∥∥h∥+∥f⁡(x+h)−f⁡(x)−B⁢h∥∥h∥.

So ∥(A−B)⁢h∥∥h∥=‖(A−B)⁢h∥h∥‖→0 as h→0. Any point on the unit sphere can be written as h∥h∥ for an arbitrarily small h, and a linear mapping vanishing on the unit sphere is zero everywhere. ∎

Example B.3.3:

If f⁡(x)=A⁢x for a linear mapping A, then D⁢f|x=A:

∥f⁡(x+h)−f⁡(x)−A⁢h∥∥h∥=∥A⁡(x+h)−A⁢x−A⁢h∥∥h∥=0∥h∥=0.
Example B.3.4:

Let f:ℝ2→ℝ2 be defined by

f⁡(x,y)=(f1⁢(x,y),f2⁢(x,y))=(1+x+2⁢y+x2,2⁢x+3⁢y+x⁢y).

Let us show that f is differentiable at the origin and compute the derivative, directly using the definition. If the derivative exists, it can be represented by a 2-by-2 matrix [abcd]. Suppose h=(h1,h2). We need the following expression to go to zero.

∥f⁡(h1,h2)−f⁡(0,0)−(a⁢h1+b⁢h2,c⁢h1+d⁢h2)∥∥(h1,h2)∥=⁠((1−a)⁢h1+(2−b)⁢h2+h12)2+((2−c)⁢h1+(3−d)⁢h2+h1⁢h2)2h12+h22.

If we choose a=1, b=2, c=2, d=3, the expression becomes

h14+h12⁢h22h12+h22=|h1|⁢h12+h22h12+h22=|h1|.

And this expression does indeed go to zero as h→0. The function f is differentiable at the origin and the derivative D⁢f|0 is represented by the matrix [1223].

Proposition B.3.5.

Let U⊂ℝn be open and f:U→ℝm be differentiable at p∈U. Then f is continuous at p.

Proof.

Another way to write the differentiability of f at p is to consider

r⁡(h)=f⁡(p+h)−f⁡(p)−D⁢f|p⁢h.

The function f is differentiable at p if ∥r⁡(h)∥∥h∥→0 as h→0, so r⁡(h)→0. The derivative D⁢f|p is a linear map from ℝn to ℝm and hence D⁢f|p⁢h→0 as h→0. Thus, f⁡(p+h)→f⁡(p) as h→0. ∎

The derivative is itself a linear operator on the space of differentiable functions.

Proposition B.3.6.

Suppose U⊂ℝn is open, f:U→ℝm and g:U→ℝm are differentiable at p, and α∈ℝ. Then the functions f+g and α⁢f are differentiable at p, and

D⁡(f+g)|p=D⁢f|p+D⁢g|pandD⁡(α⁢f)|p=α⁢D⁢f|p.
Proof.

Let h∈ℝn, h≠0. The proposition follows from the following estimates:

‖f⁡(p+h)+g⁡(p+h)−(f⁡(p)+g⁡(p))−(D⁢f|p+D⁢g|p)⁢h‖∥h∥⁠≤‖f⁡(p+h)−f⁡(p)−D⁢f|p⁢h‖∥h∥+‖g⁡(p+h)−g⁡(p)−D⁢g|p⁢h‖∥h∥,

and

‖α⁢f⁢(p+h)−α⁢f⁢(p)−α⁢D⁢f|p⁢h‖∥h∥=|α|⁢‖f⁡(p+h)−f⁡(p)−D⁢f|p⁢h‖∥h∥.∎

If A:ℝn→ℝm and B:ℝm→ℝk are linear, then they are their own derivative. The composition B⁢A, a linear map from ℝn to ℝk, is also its own derivative, and so the derivative of the composition is the composition of the derivatives. As differentiable maps are “infinitesimally close” to linear maps, they have the same property:

Theorem B.3.7 (Chain rule).

Let U⊂ℝn be open and let f:U→ℝm be differentiable at p∈U. Let V⊂ℝm be open, f⁡(U)⊂V and let g:V→ℝℓ be differentiable at f⁡(p). Then

F⁡(x)=g⁡(f⁡(x))

is differentiable at p and

D⁢F|p=D⁢g|f⁡(p)⁢D⁢f|p.
Proof.

Let A=D⁢f|p and B=D⁢g|f⁡(p). Take a nonzero h∈ℝn, write q=f⁡(p), k=f⁡(p+h)−f⁡(p), and let

r⁡(h)=f⁡(p+h)−f⁡(p)−A⁢h.

Then r⁡(h)=k−A⁢h or A⁢h=k−r⁡(h), and f⁡(p+h)=q+k. Then

∥F⁡(p+h)−F⁡(p)−B⁢A⁢h∥∥h∥⁠=‖g⁡(f⁡(p+h))−g⁡(f⁡(p))−B⁢A⁢h‖∥h∥⁠=‖g⁡(q+k)−g⁡(q)−B⁡(k−r⁡(h))‖∥h∥⁠≤∥g⁡(q+k)−g⁡(q)−B⁢k∥∥h∥+∥B∥⁢∥r⁡(h)∥∥h∥

First, ∥B∥ is constant and f is differentiable at p, so ∥B∥⁢∥r⁡(h)∥∥h∥→0 as h→0. Next, if k=0, then ∥g⁡(q+k)−g⁡(q)−B⁢k∥∥h∥=0 and so assume k≠0. We have

∥g⁡(q+k)−g⁡(q)−B⁢k∥∥h∥=∥g⁡(q+k)−g⁡(q)−B⁢k∥∥k∥⁢∥f⁡(p+h)−f⁡(p)∥∥h∥.

As f is continuous at p, we have that k→0 as h→0. Therefore, ∥g⁡(q+k)−g⁡(q)−B⁢k∥∥k∥→0 because g is differentiable at q. Finally,

∥f⁡(p+h)−f⁡(p)∥∥h∥≤∥f⁡(p+h)−f⁡(p)−A⁢h∥∥h∥+∥A∥.

As f is differentiable at p, the right-hand side stays bounded as h→0. So ∥g⁡(q+k)−g⁡(q)−B⁢k∥∥h∥→0 as h→0. Hence, ∥F⁡(p+h)−F⁡(p)−B⁢A⁢h∥∥h∥→0, and D⁢F|p=B⁢A. ∎

Let us prove a “mean value theorem” for vector-valued functions. For a function φ:[a,b]→ℝn, we think of the derivative D⁢φ|t0 as a vector in ℝn, and as a vector we will write it as φ′⁢(t0). It is not hard to check that the entries of the matrix D⁢φ|t0 (a linear map from ℝ to ℝn) are just the derivatives of the components of φ, and D⁢φ|t0⁢h=h⁢φ′⁢(t0). Then ∥φ′⁢(t0)∥ is the euclidean norm in ℝn. In fact, in this setting it is the same as the operator norm of D⁢φ|t0.

Lemma B.3.8.

If φ:[a,b]→ℝn is differentiable on (a,b) and continuous on [a,b], then there exists a t0∈(a,b) such that

∥φ⁡(b)−φ⁡(a)∥≤(b−a)⁢∥φ′⁢(t0)∥.
Proof.

By the mean value theorem on the scalar-valued function t↦(φ⁡(b)−φ⁡(a))⋅φ⁡(t), where the dot is the dot product, we obtain that there is a t0∈(a,b) such that

∥φ⁡(b)−φ⁡(a)∥2⁠=(φ⁡(b)−φ⁡(a))⋅(φ⁡(b)−φ⁡(a))⁠=(φ⁡(b)−φ⁡(a))⋅φ⁡(b)−(φ⁡(b)−φ⁡(a))⋅φ⁡(a)⁠=(b−a)⁢(φ⁡(b)−φ⁡(a))⋅φ′⁢(t0).

By the Cauchy–Schwarz inequality

∥φ⁡(b)−φ⁡(a)∥2=(b−a)⁢(φ⁡(b)−φ⁡(a))⋅φ′⁢(t0)≤(b−a)⁢∥φ⁡(b)−φ⁡(a)∥⁢∥φ′⁢(t0)∥.∎

Recall that a set U is convex if whenever x,y∈U, the line segment from x to y lies in U.

Proposition B.3.9.

Let U⊂ℝn be a convex open set, f:U→ℝm a differentiable function, and M be such that

∥D⁢f|x∥≤Mfor all ⁢x∈U.

Then f is Lipschitz with constant M, that is,

∥f⁡(x)−f⁡(y)∥≤M⁡∥x−y∥for all ⁢x,y∈U.
Proof.

Fix x,y∈U. By convexity, (1−t)⁢x+t⁢y∈U for all t∈[0,1]. Next

d𝑑t⁢[f⁡((1−t)⁢x+t⁢y)]=D⁢f|((1−t)⁢x+t⁢y)⁢(y−x).

By the mean value theorem above, for some t0∈(0,1),

∥f⁡(x)−f⁡(y)∥⁠≤‖d𝑑t|t=t0⁢[f⁡((1−t)⁢x+t⁢y)]‖⁠≤‖D⁢f|((1−t0)⁢x+t0⁢y)‖⁢∥y−x∥≤M⁡∥y−x∥.∎

Let us solve the differential equation D⁢f=0.

Corollary B.3.10.

If U⊂ℝn is open and connected, f:U→ℝm is differentiable, and D⁢f|x=0 for all x∈U, then f is constant.

Proof.

For any x∈U, there is an open ball B⁡(x,δ)⊂U. The ball B⁡(x,δ) is convex. Since ∥D⁢f|y∥≤0 for all y∈B⁡(x,δ), we have ∥f⁡(x)−f⁡(y)∥≤0⁢∥x−y∥=0. Thus f−1⁢(c) is open for any c∈ℝm. Suppose f−1⁢(c) is nonempty. The two sets

U′=f−1⁢(c),U′′=f−1⁢(ℝm∖{c})

are open and disjoint, and further U=U′∪U′′. As U′ is nonempty and U is connected, U′′=∅. So f⁡(x)=c for all x∈U. ∎

Exercise B.3.2:

Using only the definition of the derivative, show that the following f:ℝ2→ℝ2 are differentiable at the origin and find their derivative.

  1. a)

    f⁡(x,y)=(1+x+x⁢y,x),

  2. b)

    f⁡(x,y)=(y−y10,x),

  3. c)

    f⁡(x,y)=((x+y+1)2,(x−y+2)2).

Exercise B.3.3:

Define f:ℝ2→ℝ2 by f⁡(x,y)=(x,y+φ⁡(x)) for some differentiable function φ of one variable. Show f is differentiable and find D⁢f.

Exercise B.3.4:

Suppose f:ℝn→ℝ and h:ℝn→ℝ are differentiable and D⁢f|x=D⁢h|x for all x∈ℝn. Prove that if f⁡(0)=h⁡(0), then f⁡(x)=h⁡(x) for all x∈ℝn.

B.3.2i  •  The derivative in terms of partial derivatives

Partial derivatives are easier to compute with all the machinery of calculus, and they provide a way to compute the derivative of a function.

Proposition B.3.11.

Let U⊂ℝn be open and let f:U→ℝm be differentiable at p∈U. Then all the partial derivatives at p exist and, in terms of the standard bases of ℝn and ℝm, D⁢f|p is represented by the matrix

[∂f1∂x1|p∂f1∂x2|p…∂f1∂xn|p∂f2∂x1|p∂f2∂x2|p…∂f2∂xn|p⋱∂fm∂x1|p∂fm∂x2|p…∂fm∂xn|p].

In other words,

D⁢f|p⁢ej=∑k=1m∂fk∂xj|p⁢ek,

where ej denote the vectors of the standard basis in the appropriate space. Recall that the standard basis element ej is the vector with all zeros except a 1 at the jth entry.

Proof.

Fix a j and note that for nonzero h,

‖f⁡(p+h⁢ej)−f⁡(p)h−D⁢f|p⁢ej‖⁠=‖f⁡(p+h⁢ej)−f⁡(p)−D⁢f|p⁢h⁢ejh‖⁠=∥f⁡(p+h⁢ej)−f⁡(p)−D⁢f|p⁢h⁢ej∥∥h⁢ej∥.

As h goes to 0, the right-hand side goes to 0 by differentiability of f, and hence

limh→0f⁡(p+h⁢ej)−f⁡(p)h=D⁢f|p⁢ej.

Let us represent f by components f=(f1,f2,…,fm), since it is vector-valued. Taking a limit in ℝm is the same as taking the limit in each component separately. For any k,

∂fk∂xj|p=limh→0fk⁢(p+h⁢ej)−fk⁢(p)h

exists and is equal to the kth component of D⁢f|p⁢ej, and we are done. ∎

The converse of the proposition is not true. Just because the partial derivatives exist, does not mean that the function is differentiable. However, when the partial derivatives are continuous, the converse holds.

Definition B.3.12.

Let U⊂ℝn be open. We say f:U→ℝm is continuously differentiable, if all partial derivatives ∂fj∂xk exist and are continuous.22 2 Alternatively, people define f being continuously differentiable if D⁢f|x is a continuous function taking x∈U to the space of linear operators. The propositions in this section say the two definitions are equivalent.

Proposition B.3.13.

Let U⊂ℝn be open. If f:U→ℝm is continuously differentiable, then f is differentiable.

Proof.

Fix p∈U. We do induction on dimension. The case n=1 is left as an exercise. Suppose the conclusion is true for ℝn−1, that is, if we restrict to the first n−1 variables, the function is differentiable. The first n−1 partial derivatives of f restricted to the set where the last coordinate is fixed are the same as those for f. In the following, by a slight abuse of notation, we think of ℝn−1 as a subset of ℝn, that is, the set in ℝn where xn=0. In other words, we identify the vectors (x1,x2,…,xn−1) and (x1,x2,…,xn−1,0). Let

A=[∂f1∂x1|p…∂f1∂xn|p⋱∂fm∂x1|p…∂fm∂xn|p],A′=[∂f1∂x1|p…∂f1∂xn−1|p⋱∂fm∂x1|p…∂fm∂xn−1|p],v=[∂f1∂xn|p∂fm∂xn|p].

Let ϵ>0 be given. By the induction hypothesis, there is a δ>0 such that for any h′∈ℝn−1 with ∥h′∥<δ,

∥f⁡(p+h′)−f⁡(p)−A′⁢h′∥∥h′∥<ϵ.

By continuity of the partial derivatives, suppose δ is small enough so that

|∂fk∂xn|p+h−∂fk∂xn|p|<ϵ,

for all k and all h∈ℝn with ∥h∥<δ.

Suppose h=h′+t⁢en is a vector in ℝn, where h′∈ℝn−1, t∈ℝ, such that ∥h∥<δ. Then ∥h′∥≤∥h∥<δ. Note that A⁢h=A′⁢h′+t⁢v.

∥f⁡(p+h)−f⁡(p)−A⁢h∥⁠=∥f⁡(p+h′+t⁢en)−f⁡(p+h′)−t⁢v+f⁡(p+h′)−f⁡(p)−A′⁢h′∥⁠≤∥f⁡(p+h′+t⁢en)−f⁡(p+h′)−t⁢v∥+∥f⁡(p+h′)−f⁡(p)−A′⁢h′∥⁠≤∥f⁡(p+h′+t⁢en)−f⁡(p+h′)−t⁢v∥+ϵ⁡∥h′∥.

As all the partial derivatives exist, by the mean value theorem, for each k there is a θk, where |θk|≤|t|, such that

fk⁢(p+h′+t⁢en)−fk⁢(p+h′)=t⁢∂fk∂xn|(p+h′+θk⁢en).

Note that ∥h′+θk⁢en∥≤∥h∥<δ. To finish,

∥f⁡(p+h)−f⁡(p)−A⁢h∥⁠≤∥f⁡(p+h′+t⁢en)−f⁡(p+h′)−t⁢v∥+ϵ⁡∥h′∥⁠≤∑k=1m(t⁢∂fk∂xn|(p+h′+θk⁢en)−t⁢∂fk∂xn|p)2+ϵ⁡∥h′∥⁠≤m⁢ϵ⁢|t|+ϵ⁡∥h′∥⁠≤(m+1)⁢ϵ⁢∥h∥.∎
Exercise B.3.5:

Prove the base case in Proposition B.3.13: If n=1 and “the partials exist and are continuous,” then the function is differentiable. Note that f is vector-valued.

Exercise B.3.6:

Define a function f:ℝ2→ℝ by (see Figure B.5)

f⁡(x,y)={x⁢yx2+y2if ⁢(x,y)≠(0,0),0if ⁢(x,y)=(0,0).
  1. a)

    Show that the partial derivatives ∂f∂x and ∂f∂y exist at all points (including the origin).

  2. b)

    Show that f is not continuous at the origin (and hence not differentiable).

  3. c)

    Show that the partial derivatives are not continuous.

Exercise B.3.7:

Define f:ℝ2→ℝ as

f⁡(x,y)={(x2+y2)⁢sin⁡((x2+y2)−1)if ⁢(x,y)≠(0,0),0if ⁢(x,y)=(0,0).

Show that f is differentiable at the origin, but that it is not continuously differentiable.

 

3D surface plot of x y over x squared plus y squared: a saddle-like surface with a twisting discontinuity at the origin.

Figure B.5: Graph of x⁢yx2+y2.
 

B.3.3i  •  Fixed point theorem

Before we prove the inverse function theorem we must take a detour to prove a fixed point theorem for metric spaces.

Definition B.3.14.

Let (X,dX) and (Y,dY) be metric spaces. A mapping f:X→Y is said to be a contraction (or a contractive map) if it is a k-Lipschitz map for some k<1, i.e., if there exists a k<1 such that

dY⁢(f⁡(p),f⁡(q))≤k⁢dX⁢(p,q)for all ⁢p,q∈X.

If f:X→X is a map, x∈X is called a fixed point if f⁡(x)=x.

Theorem B.3.15 (Contraction mapping principle or Banach fixed point theorem).

Let (X,d) be a nonempty complete metric space and f:X→X a contraction. Then f has a unique fixed point.

Proof.

Pick any x0∈X. Define a sequence {xn} by xn+1=f⁡(xn).

d⁡(xn+1,xn)=d⁡(f⁡(xn),f⁡(xn−1))≤k⁢d⁢(xn,xn−1)≤⋯≤kn⁢d⁢(x1,x0).

Suppose m>n. Then

d⁡(xm,xn)≤∑ℓ=nm−1d⁡(xℓ+1,xℓ)≤∑ℓ=nm−1kℓ⁢d⁢(x1,x0)=kn⁢d⁢(x1,x0)⁢∑ℓ=0m−n−1kℓ⁠≤kn⁢d⁢(x1,x0)⁢∑ℓ=0∞kℓ=kn⁢d⁢(x1,x0)⁢11−k.

So the sequence is Cauchy. Since X is complete, let x=limxn. We claim that x is our unique fixed point.

Fixed point? The function f is a contraction, so it is Lipschitz continuous:

f⁡(x)=f⁡(limxn)=limf⁡(xn)=limxn+1=x.

Unique? Let x and y both be fixed points.

d⁡(x,y)=d⁡(f⁡(x),f⁡(y))≤k⁢d⁢(x,y).

As k<1, we have d⁡(x,y)=0 and hence x=y. The theorem is proved. ∎

The proof is constructive. Not only do we know a unique fixed point exists, we also know how to find it. Start with any x0∈X and iterate f⁡(x0), f⁡(f⁡(x0)), f⁡(f⁡(f⁡(x0))), etc.

Exercise B.3.8:
  1. a)

    Find an example of a contraction f:X→X of a non-complete metric space X with no fixed point.

  2. b)

    Find a 1-Lipschitz map f:X→X of a complete metric space X with no fixed point.

Exercise B.3.9:

Let f⁡(x)=x−x2−22⁢x (you may recognize Newton’s method for 2).

  1. a)

    Prove f⁡([1,∞))⊂[1,∞).

  2. b)

    Prove that f:[1,∞)→[1,∞) is a contraction.

  3. c)

    Apply the fixed point theorem to find an x≥1 such that f⁡(x)=x, and show that x=2.

B.3.4i  •  Inverse function theorem

Intuitively, we again consider that if a function is continuously differentiable, then it locally “behaves like” the derivative (a linear function). The idea of the inverse function theorem is that if a function is continuously differentiable and the derivative is invertible, the function is (locally) invertible.

Theorem B.3.16 (Inverse function theorem).

Suppose U⊂ℝn is open, f:U→ℝn is continuously differentiable, p∈U, and D⁢f|p is invertible (that is, detD⁢f|p≠0). Then there exist open sets V,W⊂ℝn such that p∈V⊂U, f⁡(V)=W, the restriction f|V is injective (one-to-one), and hence a g:W→V exists such that g⁡(y)=(f|V)−1⁢(y) for all y∈W. See Figure B.6. Furthermore, g is continuously differentiable and

D⁢g|y=(D⁢f|x)−1,for all ⁢x∈V,y=f⁡(x).
 

A set U with a smaller neighborhood V of p mapped by f onto W which equals f of V and contains f of p, with a point x in V and y in f of V, and with arrows f and g going between p and f of p and between x and y.

Figure B.6: Setup of the inverse function theorem in ℝn.
 
Proof.

Write A=D⁢f|p. As D⁢f is continuous, there exists an open ball V around p such that

∥A−D⁢f|x∥<12⁢∥A−1∥for all ⁢x∈V.

The inequality implies that D⁢f|x is invertible for all x∈V (see exercise below).

Given y∈ℝn, define φy:V→ℝn by

φy⁢(x)=x+A−1⁢(y−f⁡(x)).

As A−1 is one-to-one, φy⁢(x)=x (x is a fixed point) if and only if y−f⁡(x)=0, or in other words f⁡(x)=y. Using the chain rule we obtain

D⁢φy|x=I−A−1⁢D⁢f|x=A−1⁢(A−D⁢f|x).

So for x∈V,

∥D⁢φy|x∥≤∥A−1∥⁢∥A−D⁢f|x∥<1/2.

As V is a ball, it is convex. Hence,

∥φy⁢(x1)−φy⁢(x2)∥≤12⁢∥x1−x2∥for all ⁢x1,x2∈V.

In other words, φy is a contraction defined on V, though we so far do not know what is the range of φy. We cannot yet apply the fixed point theorem, but we can say that φy has at most one fixed point in V: If φy⁢(x1)=x1 and φy⁢(x2)=x2, then ∥x1−x2∥=∥φy⁢(x1)−φy⁢(x2)∥≤12⁢∥x1−x2∥, so x1=x2. That is, there exists at most one x∈V such that f⁡(x)=y, and so f|V is one-to-one.

Let W=f⁡(V) and let g:W→V be the inverse of f|V. We need to show that W is open. Take a y0∈W. There is a unique x0∈V such that f⁡(x0)=y0. Let r>0 be small enough such that the closed ball C⁡(x0,r)⊂V (such r>0 exists as V is open). Suppose y is such that

∥y−y0∥<r2⁢∥A−1∥.

If we show that y∈W, then we have shown that W is open. If x1∈C⁡(x0,r), then

∥φy⁢(x1)−x0∥⁠≤∥φy⁢(x1)−φy⁢(x0)∥+∥φy⁢(x0)−x0∥⁠≤12⁢∥x1−x0∥+∥A−1⁢(y−y0)∥⁠≤12⁢r+∥A−1∥⁢∥y−y0∥⁠<12⁢r+∥A−1∥⁢r2⁢∥A−1∥=r.

So φy takes C⁡(x0,r) into B⁡(x0,r)⊂C⁡(x0,r). It is a contraction on C⁡(x0,r) and C⁡(x0,r) is complete (closed subset of ℝn is complete). Apply the contraction mapping principle (Theorem B.3.15) to obtain a fixed point x, i.e., φy⁢(x)=x. That is, f⁡(x)=y, and y∈f⁡(C⁡(x0,r))⊂f⁡(V)=W. Therefore, W is open.

Next we need to show that g is continuously differentiable and compute its derivative. First, let us show that it is differentiable. Consider y∈W and k∈ℝn, k≠0, such that y+k∈W. Because f|V is a one-to-one and onto mapping of V onto W, there are unique x∈V and h∈ℝn, where h≠0 and x+h∈V, such that f⁡(x)=y and f⁡(x+h)=y+k. In other words, g⁡(y)=x and g⁡(y+k)=x+h. See Figure B.7.

 

Two sets V and W with f mapping x to y and x plus h to y plus k, and g mapping back in the opposite direction.

Figure B.7: Proving that g is differentiable.
 

We can still squeeze some information from the fact that φy is a contraction.

φy⁢(x+h)−φy⁢(x)=h+A−1⁢(f⁡(x)−f⁡(x+h))=h−A−1⁢k.

So

∥h−A−1⁢k∥=∥φy⁢(x+h)−φy⁢(x)∥≤12⁢∥x+h−x∥=∥h∥2.

By the inverse triangle inequality, ∥h∥−∥A−1⁢k∥≤12⁢∥h∥. Hence,

∥h∥≤2⁢∥A−1⁢k∥≤2⁢∥A−1∥⁢∥k∥.

In particular, as k goes to 0, so does h.

As x∈V, we find that D⁢f|x is invertible. Let B=(D⁢f|x)−1, which is what we think the derivative of g at y is. Then

∥g⁡(y+k)−g⁡(y)−B⁢k∥∥k∥⁠=∥h−B⁢k∥∥k∥⁠=∥h−B⁡(f⁡(x+h)−f⁡(x))∥∥k∥⁠=∥B⁡(f⁡(x+h)−f⁡(x)−D⁢f|x⁢h)∥∥k∥⁠≤∥B∥⁢∥h∥∥k∥⁢∥f⁡(x+h)−f⁡(x)−D⁢f|x⁢h∥∥h∥⁠≤2⁢∥B∥⁢∥A−1∥⁢∥f⁡(x+h)−f⁡(x)−D⁢f|x⁢h∥∥h∥.

As k goes to 0, so does h, and, as f is differentiable, the right-hand side goes to 0. So g is differentiable, and B is precisely what we claimed D⁢g|y to be.

Let us show g is continuously differentiable. The function g:W→V is continuous (it is differentiable), D⁢f is a continuous function from V to the space of n×n matrices (each entry is continuous), and the inverse of a matrix M is M−1=1detM⁢adj⁡M, so M↦M−1 is continuous outside the set where detM=0. As D⁢g|y=(D⁢f|g⁡(y))−1 is the composition of these three continuous functions, it is continuous. ∎

Example B.3.17:

Just because D⁢f|x is invertible everywhere does not mean that f is one-to-one globally. Consider f:ℝ2∖{0}→ℝ2∖{0} defined by f⁡(x,y)=(x2−y2,2⁢x⁢y), that is, the mapping z↦z2 in the complex plane. It is not hard to check that the derivative is invertible on ℝ2∖{0}. On the other hand, the mapping is 2-to-1 globally (except at the origin). For every (a,b)≠(0,0), there are exactly two solutions to x2−y2=a and 2⁢x⁢y=b.

The invertibility of the derivative is not a necessary condition, just sufficient, for having a continuous inverse and being an open mapping. For example, the function f⁡(x)=x3 is an open mapping from ℝ to ℝ and is globally one-to-one with a continuous inverse, although the inverse is not differentiable at x=0.

Remark B.3.18.

As a side note, there is a famous related, and as yet not fully solved, problem called the Jacobian conjecture. If F:ℝn→ℝn (or more famously F:ℂn→ℂn) is polynomial (each component is a polynomial) and detD⁢F is a nonzero constant, does F have a polynomial inverse? The inverse function theorem gives a local C1 inverse, but can one always find a global polynomial inverse is the question. The answer is trivially true if n=1, and there is a counterexample when n≥3.

Exercise B.3.10:
  1. a)

    Suppose A is a linear operator on ℝn such that ∥I−A∥<1 (I is the identity). Prove that A is invertible.

  2. b)

    For two linear operators A and B on ℝn where A is invertible, prove that ∥A−B∥<1∥A−1∥ implies that B is invertible.

Exercise B.3.11:

Define f:ℝ2→ℝ2 by f⁡(x,y)=(x,y+h⁡(x)) for some continuously differentiable function h of one variable.

  1. a)

    Show that f is one-to-one and onto.

  2. b)

    Compute D⁢f.

  3. c)

    Show that D⁢f is invertible at all points, and compute its inverse.

Exercise B.3.12:

Define f:ℝ2→ℝ2

f⁡(x,y)={(x2⁢sin⁡(1/x)+x/2,y)if ⁢x≠0,(0,y)if ⁢x=0.
  1. a)

    Show that f is differentiable everywhere.

  2. b)

    Show that D⁢f|(0,0) is invertible.

  3. c)

    Show that f is not one-to-one in every neighborhood of the origin (it is not locally invertible, that is, the inverse function theorem does not work).

  4. d)

    Show that f is not continuously differentiable.

Exercise B.3.13 (Polar coordinates):

Define a mapping F⁡(r,θ)=(r⁢cos⁡(θ),r⁢sin⁡(θ)).

  1. a)

    Show that F is continuously differentiable (for all (r,θ)∈ℝ2).

  2. b)

    Compute D⁢F|(0,θ) for all θ.

  3. c)

    Show that if r≠0, then D⁢F|(r,θ) is invertible, and so an inverse of F exists locally as long as r≠0.

  4. d)

    Show that F:ℝ2→ℝ2 is onto, and for each point (x,y)∈ℝ2, the set F−1⁢(x,y) is infinite.

  5. e)

    Show that F|(0,∞)×[0,2⁢π) is one-to-one and onto ℝ2∖{(0,0)}.