Solution Set 6: Part A

Benjamin Bakker Mathematics 25a Prof. Berger

October 31, 2003

A.1. Filling holes. Let f, g be two continuous functions on the interval [a, b] and fix c ∈ (a, b). Suppose that f is C^{1} on [a, b] \ {c} and that f′ = g on [a, b] \ {c}.

(1) Prove that f is differentiable at c and that f′ = g on [a, b].

Solution. Consider the function α(x) = f(x) − ∫_{c}^{x} g. By the fundamental theorem of calculus, G(x) = ∫_{c}^{x} g is C^{1} on [a, b], and therefore α is C^{1} on [a, b] \ {c}; note that α(c) = f(c) and α′ = 0 on [a, b] \ {c}. It will follow that f is differentiable at c and f′(c) = g(c) once we prove that α is differentiable at c with α′(c) = 0 since G′(c) = g(c). In that case, f′ = g on [a, b], and as g is continuous, f is C^{1} on [a, b].

For any h > 0, by the mean value theorem for integrals, there exists y ∈ (c, c + h) such that ∫_{c}^{c+h} g = hg(y); since f is continuous on [a, b] and differentiable on (c, c + h), the mean value theorem for derivatives guarantees a z ∈ (c, c + h) such that hf′(z) = hg(z) = f(c + h) − f(c). Thus,

α(c + h) = f(c + h) − ∫_{c}^{c+h} g = f(c) + h(g(z) − g(y))

As h ⟶ 0, z, y ⟶ c and thus g(z) − g(y) ⟶ 0 since g is continuous on [a, b]. By definition of the derivative, α′(c) = 0. □

(2) Prove that the function f defined by f(0) = 1 and f(x) = x/ sin x is C^{1} on [−π/2, π/2].

Solution. Let f = x/ sin x on [−π/2, π/2] \ {0}. x and sin x are both nonzero, C^{1}, and with nonzero derivative on (−π/2, π/2) \ {0}, so f is C^{1} on [−π/2, π/2] \ {0} (the way we defined it, f is C^{1} on [a, b] if it has a continuous derivative on (a, b)). Let f(0) = 1. By L’Hôpital’s rule, lim_{x→0} f(x) = lim_{x→0} 1/ cos x = 1 = f(0), and thus f is continuous on [a, b]. By part (1), f is C^{1} on [−π/2, π/2]. □

A.2 Some Riemann sums I. Let I = [0, 1] and let f : I → ℝ be a continuous function. For n ≥ 1, define a step function f_{n} by:

f_{n}(x) = \{ \begin{matrix}f(1/n) & if 0 ≤ x ≤ 1/n \\ f(k/n) & if 0 ≤ k ≤ n and (k − 1)/n < x ≤ k/n \end{matrix}

(1) Prove that |f_{n} − f|_{I} → 0 as n → +∞.

Solution. f is continuous, and therefore uniformly continuous, so for any ϵ > 0, there exists δ > 0 such that |f(x) − f(y)| < ϵ whenever |x − y| < δ. Take N such that \frac{1}{N} < δ/2. For any n > N and x ∈ I, there is a k for which x ∈ B(k/n, 1/n), in which case f_{n}(x) = f(k/n) or f_{n}(x) = f((k + 1)/n); by uniform continuity, since x, k/n, (k + 1)/n are all in B(k/n, δ), their images under f are no more than ϵ away from each other, and therefore |f(x)−f_{n}(x)| < ϵ ∀x ∈ I ⇒ sup_{y∈I} |f(y)−f_{n}(y)| ≤ ϵ. Thus, |f −f_{n}|_{I} ⟶ 0. □

(2) Use this to show that

lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} f (\frac{k}{n}) = ∫_{0}^{1} f  (1)

Solution. ∫_{a}^{b} is a continuous function from the set ℛ of ruled functions on I = [a, b] (endowed with the uniform metric | · |_{I}) into ℝ, so for any convergent sequence f_{n} ∈ ℛ (with respect to | · |_{I}, i.e., a uniformly convergent sequence of functions) with limit f ∈ ℛ, the sequence ∫_{0}^{1} f_{n} converges to ∫_{0}^{1} f in ℝ. f_{n} is a step function, so by definition,

∫_{0}^{1} f_{n} = \frac{1}{n} ∑_{k=1}^{n} f (\frac{k}{n})

and equation (1) follows. □

(3) Prove that the above formula still holds if f is a ruled function on I.

Solution. If f is ruled, then by definition there is a sequence g_{n} of step functions uniformly converging to f. Note that f is bounded (problem 3.1 on the midterm), as are the g_{n}, so there is some B such that B > |f(x)| and B > |g_{n}(x)| for all n.

Choose ϵ > 0. There exists N such that |f − g_{N}|_{I} < ϵ/3. Let 0 = x_{0} < x_{1} < ⋯ < x_{n−1} < x_{n} = 1 be the partition of I associated with g_{N}, so g_{N} is a constant g_{i} on the interval (x_{i}, x_{i+1}) for 0 = x_{0} < x_{1} < ⋯ < x_{n−1} < x_{n} = 1. For every x ∈ (x_{i}, x_{i+1}), we have |f(x) − g_{i}| < ϵ. In particular, for any rational k/m ∈ (x_{i}, x_{i+1}), |f(k/m) − g_{i}| < ϵ and therefore |f_{m}(x) − g_{N}(x)| < ϵ for all x ∈ (x_{i}, k_{i}/m), where k_{i} is the largest integer such that k_{i}/m < x_{i+1}; let A_{nm} be the union of all the (x_{i}, k_{i}/m). Thus, f_{m} is close to g_{n} on A_{nm}, and we need only show that the possible differences between f_{m} and g_{n} at points x not in the closure of A_{mn}^{1}, located to the left of some x_{i} with no k/m between x and x_{i} do not contribute to the integral ∫_{0}^{1} f_{m} in the limit m ⟶ ∞.

Take M > 6BN/ϵ so that there is a rational k/m no more than \frac{ϵ}{6BN} to the left of every x_{i} (i > 0) for any m > M. By the above, ∫_{0}^{1} f_{m} −∫_{0}^{1} g_{n} splits into two pieces—on A_{nm}, f_{m} and g_{n} differ by no more than ϵ/3, while on I \ A_{nm}, whose total length is N · \frac{ϵ}{6BN} = \frac{ϵ}{6B}, they differ by at most 2B, so

|∫_{0}^{1} f_{m} − ∫_{0}^{1} g_{N} | ≤ \frac{ϵ}{3} + 2B · \frac{ϵ}{6B} = \frac{2ϵ}{3} ∀m > M

and since |∫_{0}^{1} g_{N} − ∫_{0}^{1} f| < ϵ/3 by construction,

|∫_{0}^{1} f_{m} − ∫_{0}^{1} f| < ϵ ∀m > M

It then follows that

∫_{0}^{1} f = lim_{m→∞} ∫_{0}^{1} f_{m} = lim_{m→∞} \frac{1}{m} ∑_{k=1}^{m} f(k/m)

as claimed.

Note: f_{n} does not necessarily uniformly converge to f if f is ruled; what the above shows is that the set of points at which f and f_{n} always have a finite difference is small enough that in the limit m ⟶ ∞, it doesn’t matter. □

A.3 Some Riemann sums II. Using the results of the previous exercise, compute the following limits:

(a) lim_{n→+∞} ∑_{k=1}^{n} \frac{1}{k + n}, (b) lim_{n→+∞} ∑_{k=1}^{n} \frac{n}{k^{2} + n^{2}} , (c) lim_{n→+∞} ∑_{k=1}^{n} \frac{k^{3}}{n^{4}} cos (\frac{4k}{n} )

Solution. We can rewrite the sums as

(a) lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} \frac{1}{k/n + 1}, (b) lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} \frac{1}{(k/n)^{2} + 1}, (c) lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} (\frac{k}{n})^{3} cos (\frac{4k}{n} )

1We don’t really care about the value of g_{N} at the endpoints x_{i}, since it doesn’t change the integral. Thus, “not in the closure of A_{nm}” is just shorthand for not in A_{nm} and not an endpoint x_{i}.

or

(a) lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} f(k/n), (b) lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} g(k/n), (c) lim_{n→+∞} \frac{1}{n} ∑_{k=1}^{n} h(k/n)

where f(x) = \frac{1}{x+1}, g(x) = \frac{1}{x^{2}+1}, and h(x) = x^{3} cos(4x), all of which are continuous. Thus, by A.2, these limits are

(a) ∫_{0}^{1} \frac{1}{x + 1}dx = log(1 + x)|_{0}^{1} = log 2

(b) ∫_{0}^{1} \frac{1}{x^{2} + 1}dx = tan^{−1} x|_{0}^{1} = \frac{π}{4}

(c) ∫_{0}^{1} x^{3} cos(4x)dx = \frac{x^{3}}{4} sin(4x)|_{0}^{1}−\frac{3}{4} ∫_{0}^{1} x^{2} sin(4x)dx = \frac{sin 4}{4}+ \frac{3x^{2}}{16} cos(4x)|_{0}^{1}−\frac{3}{8} ∫_{0}^{1} x cos(4x)dx

= \frac{sin 4}{4} + \frac{3 cos 4}{16} − \frac{3x}{32} sin(4x)|_{0}^{1} + \frac{3}{32} ∫_{0}^{1} sin(4x)dx = \frac{5 sin 4}{32} + \frac{21 cos 4}{128} + \frac{3}{128}

□

A.4 Some Riemann sums III. Let n be an integer ≥ 2. If 1 ≤ i ≤ n, we write n = q_{i,n}i + r_{i.n}, where q_{i,n}, r_{i,n} are integers and 0 ≤ r_{i,n} ≤ i − 1. Let a_{n} be the number of i’s with 1 ≤ i ≤ n such that r_{i,n} ≥ i/2. Let ϕ : I → ℝ be defined by ϕ(0) = 0 and ϕ(x) = ⌊2/x⌋ − 2⌊1/x⌋.

(1) prove that q_{i,n} and r_{i,n} are uniquely determined;

Solution. Suppose we had q′_{i,n} and r′_{i,n} such that n = q′_{i,n}i + r′_{i,n}. Then

0 = (q_{i,n} − q′_{i,n})i + r_{i,n} − r′_{i,n} ⇒ (q_{i,n} − q′_{i,n}) = r′_{i,n} − r_{i,n}

the left hand side is divisible by i, so the right must as well; since 0 ≤ r_{i,n}, r′_{i,n} ≤ i − 1, this is only possible if r_{i,n} = r′_{i,n}. We must then have q_{i,n} = q′_{i,n}. □

(2) prove that ϕ is a ruled function on any interval [1/k, 1]

Solution. It is not true that ϕ is ruled on [0, 1], for while ϕ (\frac{1}{n+1/2}) = 1 for all n, ϕ (\frac{1}{n}) = 0 for all n, and therefore ϕ does not have a right limit at 0, contrary to the third problem of the midterm. But on any interval [1/k, 1], ϕ is a step function and therefore ruled. Indeed, ϕ(x) = 0 if n ≤ 1/x < n + 1/2 for some n while ϕ(x) = 1 if n + 1/2 ≤ 1/x < n + 1, so

ϕ(x) = \{ \begin{matrix}0 & \frac{1}{n+1/2} < x ≤ \frac{1}{n}, for some n ∈ ℤ_{≥1} \\ 1 & \frac{1}{n+1} < x ≤ \frac{1}{n+1/2}, for some n ∈ ℤ_{≥1} \end{matrix}  (2)
□

(3) compute ∫_{1/k}^{1} ϕ if k ≥ 2 and use this to compute ∫_{0}^{1} ϕ;

Solution. According to equation (2),

∫_{1/k}^{1} ϕ = ∑_{i=1}^{k−1} (\frac{1}{i + 1/2} − \frac{1}{i + 1}) = ∑_{i=1}^{k−1} (\frac{2}{2i + 1} − \frac{1}{i + 1})  (3)

This can be rewritten as

2 ∑_{i=1}^{k} \frac{1}{k + i} − 1

and thus, as an improper integral,

∫_{0}^{1} ϕ = lim_{k→∞} ∫_{1/k}^{1} ϕ = −1 + 2 lim_{k∞} ∑_{i=1}^{k} \frac{1}{k + i} = 2 log 2 − 1

by problem A.2. □

(4) prove that a_{n} = ∑_{k=1}^{n} ϕ(k/n); Solution. For a given pair n, i, we have r_{i,n} ≥ 1/2 iff q_{i,n} + 1/2 ≤ n/i < q_{i,n} + 1 iff ϕ(i/n) = 1 from the above. Thus, the number of i, 1 ≤ i ≤ n, for which r_{i,n} ≥ i/2 is a_{n} = ∑_{i=1}^{n} ϕ(i/n). □

(5) prove that lim_{n→+∞} a_{n}/n exists and compute it;

Solution. If ϕ were ruled on [0, 1], then by A.2, the limit

∫_{0}^{1} ϕ = lim_{n→∞} \frac{1}{n} ∑_{k=1}^{n} ϕ(k/n) = lim_{n→∞} a_{n}/n

would exist; by part 3, the limit is, in fact,

lim_{n→∞} a_{n}/n = 2 log 2 − 1

But ϕ is only ruled on [1/k, 1], so equation (4) is not exact, but differs from the above sum by no more than 2/k, since ϕ ≤ 1 on [0, 1]. More precisely, for any ϵ > 0, there exists N such that for all n > N,

|∫_{1/k}^{1} ϕ − \frac{1}{n} ∑_{i=1}^{n} ϕ(i/n) − \frac{2}{k} | < ϵ

and taking the limit as n → ∞, and then as k → ∞,

2 log 2 − 1 = ∫_{0}^{1} ϕ = lim_{n→∞} a_{n}/n

□