← 10. Differentiation

Exercises

Problems to check your understanding of this chapter. The solutions are folded away — try them yourself first.

Easy

1Easy

Let ff be continuous on [a,b][a,b] and differentiable on (a,b)(a,b), with ∣f′(x)∣≤M\lvert f'(x) \rvert \le M for all x∈(a,b)x \in (a,b) and some constant M≥0M \ge 0.

Prove the inequality below for all x,y∈[a,b]x, y \in [a,b]. (Hence ff is uniformly continuous on [a,b][a,b].)

∣f(x)−f(y)∣≤M∣x−y∣\lvert f(x) - f(y) \rvert \le M\lvert x - y \rvert
Show solution
  1. The case x=yx = y is trivial, so let x<yx < y. Since ff is continuous on [x,y]⊂[a,b][x,y] \subset [a,b] and differentiable on (x,y)⊂(a,b)(x,y) \subset (a,b), the Mean Value Theorem applies on [x,y][x,y]: for some c∈(x,y)c \in (x,y), f(y)−f(x)=f′(c)(y−x)f(y) - f(x) = f'(c)(y - x).

  2. Taking absolute values, ∣f(y)−f(x)∣=∣f′(c)∣⋅∣y−x∣≤M∣y−x∣\lvert f(y) - f(x) \rvert = \lvert f'(c) \rvert \cdot \lvert y - x \rvert \le M\lvert y - x \rvert. The case x>yx > y is the same with the roles swapped, so the inequality holds for all x,y∈[a,b]x, y \in [a,b].

    This is the Lipschitz condition, and uniform continuity follows with δ=ε/M\delta = \varepsilon / M (any δ>0\delta > 0 if M=0M = 0).

2Easy

Start Newton's iteration for x2−2=0x^2 - 2 = 0, xn+1=xn−xn2−22xn=xn+2/xn2x_{n+1} = x_n - \dfrac{x_n^2 - 2}{2x_n} = \dfrac{x_n + 2/x_n}{2}, at x0=1x_0 = 1.

(a) Show xn>0x_n > 0 for all nn. (b) Use AM-GM to show xn+1≥2x_{n+1} \ge \sqrt{2} for all nn. (c) Show x1>2x_1 > \sqrt{2} and that (xn)n≥1(x_n)_{n \ge 1} is decreasing. (d) Conclude xn→2x_n \to \sqrt{2}.

xn+1=xn+2/xn2,x0=1,x1=32x_{n+1} = \frac{x_n + 2/x_n}{2}, \qquad x_0 = 1, \quad x_1 = \frac32
Starting at x0=1x_0 = 1: the first tangent overshoots 2\sqrt{2} to x1=3/2x_1 = 3/2, then the iterates descend monotonically to the root.
Show solution
  1. (a) x0=1>0x_0 = 1 > 0, and if xn>0x_n > 0 then xn+1x_{n+1} is the average of two positive numbers, hence positive — by induction xn>0x_n > 0 for all nn. (b) By AM-GM, xn+1=xn+2/xn2≥xn⋅2xn=2x_{n+1} = \dfrac{x_n + 2/x_n}{2} \ge \sqrt{x_n \cdot \dfrac{2}{x_n}} = \sqrt{2}.

  2. (c) x1=1+22=32x_1 = \dfrac{1 + 2}{2} = \dfrac32, and (32)2=94>2\left(\dfrac32\right)^2 = \dfrac94 > 2, so x1>2x_1 > \sqrt{2} — the first step overshoots the root.

    For n≥1n \ge 1, xn+1−xn=2/xn−xn2=2−xn22xnx_{n+1} - x_n = \dfrac{2/x_n - x_n}{2} = \dfrac{2 - x_n^2}{2x_n}; by (b), xn≥2x_n \ge \sqrt{2}, so the numerator is ≤0\le 0. Hence (xn)n≥1(x_n)_{n \ge 1} is decreasing.

  3. (d) (xn)n≥1(x_n)_{n \ge 1} is decreasing and bounded below by 2\sqrt{2}, so it converges to some L≥2L \ge \sqrt{2}.

    Passing to the limit in the recurrence gives L=L+2/L2L = \dfrac{L + 2/L}{2}, i.e. 2L=L+2/L2L = L + 2/L, so L=2/LL = 2/L. Since L>0L > 0, L2=2L^2 = 2, i.e. L=2L = \sqrt{2}.

3Easy

Prove via the triangle inequality that f(x)=∣x∣f(x) = \lvert x \rvert is convex on R\mathbb{R}, and cite the continuity theorem for convex functions to conclude ff is continuous.

Show ff is not differentiable at 00, confirming that convexity does not imply differentiability.

∣tx+(1−t)y∣≤t∣x∣+(1−t)∣y∣(0≤t≤1)\lvert tx + (1-t)y \rvert \le t\lvert x \rvert + (1-t)\lvert y \rvert \qquad (0 \le t \le 1)
Show solution
  1. For 0≤t≤10 \le t \le 1 and x,y∈Rx, y \in \mathbb{R}, the triangle inequality and homogeneity of the absolute value give ∣tx+(1−t)y∣≤∣tx∣+∣(1−t)y∣=t∣x∣+(1−t)∣y∣\lvert tx + (1-t)y \rvert \le \lvert tx \rvert + \lvert (1-t)y \rvert = t\lvert x \rvert + (1-t)\lvert y \rvert. This is exactly the definition of convexity, so ff is convex on R\mathbb{R}.

    A convex function is continuous on every open interval (the theorem of the convex scene), so ff is continuous everywhere.

  2. But the difference quotient at 00 is given by the formula below, which has no limit. Hence ff is not differentiable at 00 — the simplest example of a function that is convex and continuous but not differentiable.

    f(h)−f(0)h=∣h∣h={1h>0−1h<0\dfrac{f(h) - f(0)}{h} = \dfrac{\lvert h \rvert}{h} = \begin{cases} 1 & h > 0 \\ -1 & h < 0 \end{cases}

Medium

4Medium

Let ff be differentiable on [a,b][a,b] with f′(x)≠0f'(x) \ne 0 for every x∈[a,b]x \in [a,b].

Combining Darboux's theorem with the Mean Value Theorem, prove that ff is strictly monotone on [a,b][a,b].

Show solution
  1. By Darboux's theorem, f′f' has the intermediate value property. Suppose f′f' changed sign: there exist u,v∈[a,b]u, v \in [a,b] with f′(u)>0>f′(v)f'(u) > 0 > f'(v).

    Applying Darboux's theorem on the interval between uu and vv would produce a point cc with f′(c)=0f'(c) = 0, contradicting the hypothesis. Hence f′f' cannot change sign, and since it never vanishes, it is either everywhere positive or everywhere negative on [a,b][a,b].

  2. Consider the case f′>0f' > 0 (the negative case differs only in sign). For x<yx < y, the Mean Value Theorem gives c∈(x,y)c \in (x,y) with f(y)−f(x)=f′(c)(y−x)f(y) - f(x) = f'(c)(y - x); since f′(c)>0f'(c) > 0, we get f(y)>f(x)f(y) > f(x).

    So ff is strictly increasing. Likewise f′<0f' < 0 makes ff strictly decreasing.

5Medium

Let ff be n+1n+1 times continuously differentiable on [a,b][a,b] (n≥0n \ge 0).

For a≤x≤ba \le x \le b, prove Taylor's formula with integral remainder \[f(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k + R_n(x), \qquad R_n(x) = \frac{1}{n!}\int_a^x (x-t)^n f^{(n+1)}(t)\,dt.\]

The case n=0n = 0 is the Fundamental Theorem of Calculus; for the induction step apply integration by parts once.

Degree n=5n = 5: the band trapping the remainder R5(x)R_5(x) — the integral remainder is the exact formula measuring this error.
Show solution
  1. For n=0n = 0 the formula is f(x)=f(a)+∫axf′(t) dtf(x) = f(a) + \int_a^x f'(t)\,dt, the Fundamental Theorem of Calculus. As the induction hypothesis, assume the formula for nn holds for Cn+1C^{n+1} functions.

    For g∈Cn+2g \in C^{n+2}, applying it to gg gives g(x)=Tn(x)+1n!∫ax(x−t)ng(n+1)(t) dtg(x) = T_n(x) + \frac{1}{n!}\int_a^x (x-t)^n g^{(n+1)}(t)\,dt, where TnT_n is the degree-nn Taylor polynomial.

  2. Apply integration by parts to the remainder integral: with u=g(n+1)(t)u = g^{(n+1)}(t) and dv=(x−t)n dtdv = (x-t)^n\,dt, we have du=g(n+2)(t) dtdu = g^{(n+2)}(t)\,dt and v=−(x−t)n+1n+1v = -\dfrac{(x-t)^{n+1}}{n+1}.

    Since g(n+1)g^{(n+1)} and (x−t)n+1(x-t)^{n+1} are continuous, parts is legitimate and \[\int_a^x (x-t)^n g^{(n+1)}(t)\,dt = \left[-\frac{(x-t)^{n+1}}{n+1}\,g^{(n+1)}(t)\right]_a^x + \frac{1}{n+1}\int_a^x (x-t)^{n+1} g^{(n+2)}(t)\,dt.\] The boundary term is 00 at t=xt = x and gives (x−a)n+1n+1 g(n+1)(a)\dfrac{(x-a)^{n+1}}{n+1}\,g^{(n+1)}(a) at t=at = a (the minus sign flips).

  3. Multiplying by 1n!\frac{1}{n!}, the remainder integral becomes g(n+1)(a)(n+1)!(x−a)n+1+1(n+1)!∫ax(x−t)n+1g(n+2)(t) dt\dfrac{g^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1} + \dfrac{1}{(n+1)!}\int_a^x (x-t)^{n+1} g^{(n+2)}(t)\,dt. The first term is exactly the degree-(n+1)(n+1) Taylor term, and the second is Rn+1(x)R_{n+1}(x).

    Hence g(x)=Tn+1(x)+Rn+1(x)g(x) = T_{n+1}(x) + R_{n+1}(x), which is the formula for n+1n+1. By induction the proof is complete for all n≥0n \ge 0.

6Medium

Consider the map T(x)=12+xT(x) = \dfrac{1}{2+x} on [0,1][0,1].

(a) Show TT maps [0,1][0,1] into itself and is a contraction with constant c=1/4c = 1/4. (b) Cite the Banach fixed point theorem to find the unique fixed point of TT (solve the quadratic), and explain why iteration from any starting point converges to it.

∣T(x)−T(y)∣=∣x−y∣(2+x)(2+y)≤14 ∣x−y∣\lvert T(x) - T(y) \rvert = \frac{\lvert x - y \rvert}{(2+x)(2+y)} \le \frac14\,\lvert x - y \rvert
x=12+x  ⟺  x2+2x−1=0  ⟺  x=2−1≈0.4142x = \frac{1}{2+x} \iff x^2 + 2x - 1 = 0 \iff x = \sqrt{2} - 1 \approx 0.4142
Show solution
  1. (a) TT is decreasing on [0,1][0,1] with T(0)=1/2T(0) = 1/2 and T(1)=1/3T(1) = 1/3, so T([0,1])=[1/3,1/2]⊂[0,1]T([0,1]) = [1/3, 1/2] \subset [0,1].

    For x,y∈[0,1]x, y \in [0,1], ∣T(x)−T(y)∣=∣2+y−(2+x)(2+x)(2+y)∣=∣x−y∣(2+x)(2+y)\lvert T(x) - T(y) \rvert = \left\lvert \dfrac{2+y-(2+x)}{(2+x)(2+y)} \right\rvert = \dfrac{\lvert x - y \rvert}{(2+x)(2+y)}. Since (2+x)(2+y)≥2⋅2=4(2+x)(2+y) \ge 2 \cdot 2 = 4, we get ∣T(x)−T(y)∣≤14∣x−y∣\lvert T(x) - T(y) \rvert \le \dfrac14\lvert x - y \rvert — a contraction with constant 1/41/4.

  2. (b) [0,1][0,1] is complete, so the Banach fixed point theorem (the Banach scene) gives TT a unique fixed point x∗∈[0,1]x^\ast \in [0,1]. The equation x=12+xx = \dfrac{1}{2+x} is equivalent to x2+2x−1=0x^2 + 2x - 1 = 0, with roots x=−1±2x = -1 \pm \sqrt{2}. The only one in [0,1][0,1] is x∗=2−1≈0.4142x^\ast = \sqrt{2} - 1 \approx 0.4142.

    By the same theorem, the iteration xn+1=T(xn)x_{n+1} = T(x_n) from any x0∈[0,1]x_0 \in [0,1] converges to x∗x^\ast — the error shrinks by at least a factor of 1/41/4 each step.

Hard

7Hard

Let f(x)=e−1/x2f(x) = e^{-1/x^2} for x≠0x \ne 0 and f(0)=0f(0) = 0.

Prove ff is infinitely differentiable on R\mathbb{R} with f(n)(0)=0f^{(n)}(0) = 0 for every n≥0n \ge 0. Deduce that the Maclaurin series of ff converges for every xx but equals f(x)f(x) only at x=0x = 0 — a Taylor series need not recover the function.

f(n)(x)=Pn(1/x) e−1/x2(x≠0),lim⁡∣u∣→∞P(u)e−u2=0f^{(n)}(x) = P_n(1/x)\,e^{-1/x^2} \quad (x \ne 0),\qquad \lim_{\lvert u \rvert \to \infty} P(u)e^{-u^2} = 0
T(x)=∑n=0∞f(n)(0)n!xn≡0butf(x)>0 (x≠0)T(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n \equiv 0 \quad\text{but}\quad f(x) > 0\ (x \ne 0)
Show solution
  1. Lemma: for any polynomial PP, lim⁡∣u∣→∞P(u)e−u2=0\lim_{\lvert u \rvert \to \infty} P(u)e^{-u^2} = 0. Indeed, for v=u2≥0v = u^2 \ge 0, ev≥vmm!e^{v} \ge \dfrac{v^m}{m!} (one term of the exponential's Taylor expansion), so with 2m>deg⁡P2m > \deg P we get ∣P(u)∣e−u2≤m! ∣P(u)∣u2m→0\lvert P(u) \rvert e^{-u^2} \le m!\,\dfrac{\lvert P(u) \rvert}{u^{2m}} \to 0.

  2. We claim f(n)(x)=Pn(1/x)e−1/x2f^{(n)}(x) = P_n(1/x)e^{-1/x^2} for x≠0x \ne 0, for some polynomial PnP_n, by induction. For n=0n = 0, P0≡1P_0 \equiv 1.

    With u=1/xu = 1/x, \[\frac{d}{dx}\Bigl[P(u)e^{-1/x^2}\Bigr] = P'(u)\!\left(-\frac{1}{x^2}\right)e^{-1/x^2} + P(u)e^{-1/x^2}\!\left(\frac{2}{x^3}\right) = \bigl[-u^2P'(u) + 2u^3P(u)\bigr]e^{-u^2},\] and the bracket is a polynomial in uu, completing the induction step. Hence ff is infinitely differentiable at x≠0x \ne 0.

  3. Now f(n)(0)=0f^{(n)}(0) = 0 by induction. The case n=0n = 0 is the definition. f′(0)=lim⁡h→0e−1/h2h=lim⁡∣u∣→∞ue−u2=0f'(0) = \lim_{h \to 0} \dfrac{e^{-1/h^2}}{h} = \lim_{\lvert u \rvert \to \infty} u e^{-u^2} = 0 (lemma, with u=1/hu = 1/h).

    Assuming f(n)(0)=0f^{(n)}(0) = 0, \[f^{(n+1)}(0) = \lim_{h \to 0}\frac{f^{(n)}(h) - f^{(n)}(0)}{h} = \lim_{h \to 0}\frac{P_n(1/h)e^{-1/h^2}}{h} = \lim_{\lvert u \rvert \to \infty} uP_n(u)e^{-u^2} = 0\] (lemma applied to uPn(u)uP_n(u)). Thus f(n)(0)=0f^{(n)}(0) = 0 for all nn, and ff is infinitely differentiable at 00 too.

  4. The Maclaurin series is T(x)=∑n=0∞f(n)(0)n!xn≡0T(x) = \sum_{n=0}^{\infty} \dfrac{f^{(n)}(0)}{n!}x^n \equiv 0 — it converges (to 00) at every xx.

    But for x≠0x \ne 0, f(x)=e−1/x2>0f(x) = e^{-1/x^2} > 0. So the Taylor series converges everywhere yet matches ff only at x=0x = 0: even a smooth function need not be recovered by its Taylor series.