Math 127B-B, Spring 2019 Final: Solutions

1. [20pts] In each case, give an example of a or of functions with the stated property, or explain why no such example exists. (a) A function f : R → R that is differentiable at 0 but not differentiable at any other point. (b) An infinitely differentiable function f : R → R such that the Taylor of f(x) centered at 0 converges if and only if −1 < x < 1.

(c) A sequence (fn) of continuous functions fn : [0, 1] → R such that (fn) converges pointwise but not uniformly on [0, 1] to a f : [0, 1] → R. (d) A sequence (fn) of functions fn : [0, 1] → R with finitely many disconti- nuities that converges uniformly on [0, 1] to a function f : [0, 1] → R that is not Riemann integrable.

Solution. • (a) For example, ( x2 if x ∈ , f(x) = Q 0 if x 6∈ Q, is differentiable at 0, with f 0(0) = 0, and discontinuous — so not differentiable — at any x 6= 0. • (b) For example, the for the C∞-function 1 = 1 − x2 + x4 − x6 + ··· + (−1)nx2n + ... 1 + x2 has interval of convergence (−1, 1).

• (c) For example, the sequence (fn) of continuous functions  nx if 0 ≤ x ≤ 1/n  fn(x) = 2 − nx if 1/n < x < 2/n, 0 if 2/n ≤ x ≤ 1

converges pointwise but not uniformly to the continuous function 0.

1 • (d) No such example exists, since a function with finitely many dis- continuities is Riemann integrable, and the uniform limit of Riemann integrable functions is integrable.

2 2. [20pts] (a) State the mean value theorem. (b) Use the mean value theorem to prove that 1 1 − < ln x < x − 1 for all x > 1. x

Solution.

• (a) If f :[a, b] → R is continuous on [a, b] and differentiable in (a, b), then there exists c ∈ (a, b) such that

f(b) − f(a) = f 0(c)(b − a).

• (b) Since ln x is differentiable on (0, ∞) with (ln x)0 = 1/x, we have for x > 1 that 1 ln x − ln 1 = (x − 1) c for some 1 < c < x. Then 1/x < 1/c < 1, x − 1 > 0 and ln 1 = 0, so x − 1 < ln x < x − 1. x

3 3. [20pts] Find all points x ∈ R where the following converges:

∞ ( X n 2 3 4 1 if n is even anx = 1 + 2x + x + 2x + x + . . . , an = n=0 2 if n is odd

Solution.

n n n • Since |x| ≤ |anx | ≤ 2|x| for every n ∈ N0, comparison with a geo- metric series implies that the series converges for |x| < 1 and diverges for |x| > 1, so the of the power series is R = 1.

1/n • Alternatively note that limn→∞ 2 = 1, because, for example, ln 2 lim ln 21/n = lim = 0, n→∞ n→∞ n and ex is continuous at x = 0. Since 11/n = 1, it follows that

1/n lim |an| = 1, n→∞ so the Hadamard formula implies that R = 1/1 = 1.

• At x = 1, the series

∞ X an =1+2+1+2+1+ ... n=0 diverges to ∞. At x = −1, the the series

∞ X n (−1) an = 1 − 2 + 1 − 2 + 1 + ... n=0 diverges to −∞.

• The interval of convergence of the power series is (−1, 1).

Remark. We can sum the series explicitly as 1 + 2x (1 + 2x) 1 + x2 + x4 + x6 + ...  = for |x| < 1. 1 − x2

4 4. [20pts] Define a function f : [0, 1] → R by ( x if x ∈ , f(x) = Q 1 − x if x∈ / Q. (a) Find the the upper Darboux integral U(f) of f on [0, 1], and justify your answer. (b) Find the the lower Darboux integral L(f) of f on [0, 1], and justify your answer. (c) Is f Riemann integrable on [0, 1]?

Solution. • (a) It is sufficient to consider partitions which include x = 1/2 as an endpoint, since refining a partition by adding 1/2 decreases the upper sums and increases the lower sums. • We have x ≤ 1 − x on [0, 1/2] and 1 − x ≤ x on [1/2, 1]. Every interval in a partition contains rational and irrational numbers, so the upper sums of f on [0, 1/2] are equal to the upper sums of 1 − x, and the upper sums of f on [1/2, 1] are equal to the upper sums of x. Since these functions are Riemann integrable, it follows that

Z 1/2 Z 1 U(f) = (1 − x) dx + x dx 0 1/2  1 1/2 1 1 = x − x2 + x2 2 0 2 1/2 3 = . 4

• (b) Similarly, the lower sums of f on [0, 1/2] are equal to the lower sums of x, and the lower sums of f on [1/2, 1] are equal to the lower sums of 1 − x, so

Z 1/2 Z 1 1 L(f) = x dx + (1 − x) dx = . 0 1/2 4

• (c) Since U(f) 6= L(f), the function isn’t Riemann integrable.

5 5. [20pts] Consider the series ∞ X 1 1 1 1 = 1 + + + + ... where 1 < x < ∞. nx 2x 3x 4x n=1 (a) Show that the series converges uniformly on [p, ∞) for every p > 1. Explain why the sum defines a continuous function f : (1, ∞) → R. (b) Does the series converge uniformly on (1, ∞)? Give a brief justification of your answer. A complete proof is not required. Solution. • (a) The function nx = ex ln n is an increasing funtion of x for every n ≥ 1, so nx ≥ np if x ≥ p, and 1 1 0 < ≤ for all x ≥ p. nx np Since the series P 1/np converges for p > 1, the M-test implies that the series P 1/nx converges uniformly on [p, ∞). • Since 1/nx is a continuous function, and a uniformly convergent sum of continuous functions is continuous, the sum defines a continuous function on [p, ∞) for every p > 1, and hence a continuous function on [ (1, ∞) = [p, ∞). p>1

• (b) The series doesn’t converge uniformly on (1, ∞). The previous proof doesn’t apply, since 1/nx ≤ 1/n for all x > 1, but the harmonic series P 1/n diverges. Of course, the failure of the proof doesn’t imply that the convergence isn’t uniform. • To prove the failure of uniform convergence, we observe that, by the integral test for series, ∞ X 1 Z ∞ 1 1 ≥ dt = for p > 1, np tp p − 1 n=1 1 so f(x) → ∞ as x → 1+, and f is unbounded on (1, ∞). Since each of the partial sums of the series is bounded on (1, ∞), and the uni- form limit of bounded functions is bounded, the convergence cannot be uniform.

6 Remark. In more usual notation,

∞ X 1 ζ(s) = ns n=1 is called the . This series converges for real 1 < s < ∞, and more generally for all complex numbers s ∈ C with real part 1. The Riemann zeta function extends to an f : C\{1} → C, with a singularity (a simple pole) at s = 1. In 1859, Riemann suggested that all the nontrivial zeros of ζ(s) lie on the line

7 6. [20pts] (a) Define the following improper as a limit of Riemann integrals: Z e 1 √ dx. 1 x ln x (b) Determine if the improper integral in (a) converges, and, if it does, eval- uate the integral.

Solution.

• (a) The integrand is unbounded at x = 1 and continuous on [a, e] for every 1 < a < e, so we define Z e 1 Z e 1 √ dx = lim √ dx. + 1 x ln x a→1 a x ln x

• (b) Using the substitution u = ln x, we get that

Z e 1 Z ln e du √ dx = √ a x ln x ln a u √ = 2 u1 √ln a = 2 − 2 ln a → 2 as a → 1+.

So the integral converges to 2.

8 7. [30pts] (a) Define the Taylor polynomial of order n of a function f : (a, b) → R at c ∈ (a, b) and state Taylor’s theorem with the Lagrange ex- pression for the remainder. (b) Let Z x f(x) = esin t dt. 0

Compute the Taylor polynomial P2(x) of order 2 of f(x) at x = 0.

(c) Use P2(0.1) to give an approximate value for the integral Z 0.1 f(0.1) = esin t dt. 0 (d) Provide an estimate for the maximum possible error between f(0.1) and P2(0.1). (You don’t have to give the best possible estimate, and it’s fine if your estimate includes powers of e.)

Solution. • (a) Suppose that f :(a, b) → R is (n + 1)-times differentiable and c ∈ (a, b). The Taylor polynomial of order n of f at c is n X f (k)(c) P (x) = (x − c)k. n k! k=0 Taylor’s theorem with Lagrange remainder states that for x ∈ (a, b), there exists ξ between c and x, depending on x, such that f (n+1)(ξ) f(x) = P (x) + R (x),R (x) = (x − c)n+1. n n n (n + 1)!

• (b) Since esin x is continuous, one direction of the fundamental theorem of calculus ( of the integral) implies that f is differentiable and f 0(x) = esin x. It follows from the chain rule that f 00(x) = (cos x)esin x. In particular, f(0) = 0, f 0(0) = f 00(0) = 1, so 1 P (x) = x + x2. 2 2 9 • (c) Using P2(x) to approximate the integral, we have

Z 0.1 0.01 esin t dt ≈ 0.1 + = 0.105. 0 2

• By the chain and product rules, we have

f 000(x) = cos2 x − sin x esin x.

If 0 < ξ < 0.1, then, for example, we have

0 < cos2 ξ − sin ξ < 1, esin ξ < esin 0.1 < e0.1,

so 0 < f 000(ξ) < e0.1, and, by the Lagrange formula for the remainder, 1 0 < f(0.1) − P (0.1) < (0.1)3e0.1. 2 6

Remark. Numerical integration gives

Z 0.1 esin t dt = 0.105166405510520..., 0 so f(0.1) − P2(0.1) = 0.000166... We also have 1 (0.1)3e0.1 = 0.000184..., 6 so our upper-bound estimate for the error is a reasonable one.

10