HOMEWORK 1

MATH 4121

(1) Textbook, I.3.B, page 34. Show that if f :[a, b] → R is a Rie- mann integrable function defined on the interval [a, b], then f is bounded. Solution: Assume that f is not bounded. We will show that f is not Riemann integrable. To do so, we will show that for any partition P , there exists two choices of sample points ξj and ηj so that the Riemann sum S(P ; f; ξ) and S(P ; f; η) are not close to each other. If f is not bounded, then its values are either not bounded above or not bounded below (or both). Assume without loss of generality that the values of f are not bounded above. Now let P be a partition, and let δ be the length of the smallest interval of P . Let ξj be an arbitrary choice of sample points, and let M = max{f(ξ1), . . . , f(ξn)}. Because f is not bounded above, there exists some x∗ such that f(x∗) ≥ M + δ−1.

We now choose our second set of sample points ηj as follows. Let ∗ ∗ ∗ j be the index of an interval of P that contains x . Set ηj∗ = x . For all other intervals, set ηj = ξj. Because ηj agrees with ξj on all but one of the intervals, it is easy to compute S(P ; f; η) − S(P ; f; ξ). Indeed,

∗ S(P ; f; η) − S(P ; f; ξ) = (f(x ) − f(ξj))(xj∗ − xj∗−1) ≥ (M + δ−1) − M δ = 1. On the other hand, if f were Riemann integrable, there would exist an L such that for some partition P , we would have |S(P ; f; ξ) − L| < 1 1 2 and |S(P ; f; η) − L| < 2 . This would imply that |S(P ; f; ξ) − S(P ; f; η)| < 1, which contradicts our construction where S(P ; f; η) − S(P ; f; ξ) ≥ 1. (2) Textbook, I.3.C, page 34. Show that the Dirichlet function is not Riemann integrable. Recall that the Dirichlet function D : [0, 1] → R is defined as ( 1 if x ∈ D(x) = Q 0 if x∈ / Q. 1 2 MATH 4121

Solution: Because every nonempty open interval in [0, 1] must con- tain both rational and irrational numbers, for an arbitrary parti- tion P the upper and lower Darboux sums satisfy S(P, f) = 1 and S(P, f) = 0. Therefore, Z b Z b D(x) dx − D(x) dx = 1 a a so D(x) cannot be Riemann integrable. (3) Textbook, I.3.D, page 34. Prove that every on [a, b] is Riemann integrable on [a, b].

Solution: If f :[a, b] → R is continutous, then f is uniformly contin- uous. (This is Heine’s theorem 0.6.6, on page 17 of the textbook.) Hence for each  > 0 there is δ > 0 so that |f(x) − f(x0)| <  when- ever |x − x0| < δ. If P is a partition of [a, b] with |P | < δ then it follows that fi − fi ≤  for each i, so X  X S(P, f) − S(P, f) = fi − fi (xi − xi−1) ≤  (xi − xi−1) = (b − a). i i  Therefore, infP S(P, f) − supP S(P, f) ≤ infP S(P, f) − S(P, f) = 0, which means that f is Riemann-integrable. (4) Textbook, I.3.H, page 35. Let f : [0, 1] → R be defined by ( 1/q if x = p/q where p, q are coprime positive integers and q 6= 0 f(x) = 0 if x∈ / Q or x = 0, 1. (a) Prove that f is continuous at every irrational point of [0, 1] and discontinuous where f(x) 6= 0. R 1 (b) Prove that f is Riemann integrable on [0, 1] and 0 f(x) dx = 0. Solution: (a) It is clear that f is discontinuous at every point where it is non-zero. In fact, let x0 = p/q ∈ (0, 1) be such a point. Then f(x0) > 0 while arbitrarily near x0 there are irrational points, where f is zero. In order to show that f is continuous at any irrational x ∈ [0, 1], 1 let  > 0 be given and choose q ∈ N big enough so that q < . Let S be the finite set consisting of all rational numbers between m 0 and 1 that can be written as n for m, n ∈ N and n ≤ q. Since x is irrational, it can’t be an element of S, hence there are consecutive numbers s, s0 ∈ S, s < s0, such that x ∈ (s, s0). By consecutive I mean that no element of S lies in (s, s0). Now let δ > 0 be sufficiently small that (x − δ, x + δ) ⊂ (s, s0). It follows that for all y such that |x − y| < δ, either y is irrational, in which case f(y) = f(x) = 0, or y is a rational number that cannot be written as a fraction with denominator less than q, HOMEWORK 1 3

1 in which case |f(x) − f(y)| = f(y) < q < . This shows that f is continuous at x. (b) The claim that f is Riemann integrable is an immediate conse- quence of Lebesgue’s theorem (I.5.1, page 41), which says that a bounded function on [a, b] is Riemann integrable if and only if it is continuous almost everywhere. We can also prove this directly as follows. For any given  > 0 1 let us fix q ∈ N such that q < . Let S = {s1, s2, . . . , sN } be the same finite set of rational numbers with denominators less than or equal to q introduced in the first part of this exercise, where s1 < s2 < ··· < sN . We now define a partition P of [0, 1] + − ±  consisting of 0, 1 and the points xi and xi given by xi = si± M for i = 1, 2,...,N where M ≥ 2N is big enough in order to + − guarantee that xi−1 < xi for each i.  + − Notice that f ≤ 1/q on each interval of the form xi−1, xi and f is bounded by 1 on each interval (around si) of the form  − + xi , xi . The sum of the lengths of the intervals of the second kind is less than  and the sum of the lengths of the intervals of first kind is less than 1. Thus we obtain

1 S(P, f) ≤ +  < 2. q

Therefore, the upper Dirichlet is 0, and since the lower Dirichlet integral is not negative for a non-negative function, we must have

Z 1 Z 1 f(x) dx = f(x) dx. 0 0

R 1 Thus we conclude that f is Riemann-integrable with 0 f(x) dx = 0. (5) Riemann’s example. To demonstrate the value of his formulation of the integral, Riemann (1854) proposed the following example of a function which is discontinuous on a dense set of points but still integrable. (The previous problem gives a simpler but less interesting example of such a function.) First define hxi = the integer closest to x (and for definiteness let us require it to be right-continuous, so that h1/2i = 1 for example. It is not important how it is defined on the points of discontinuity.) Now set ( x − hxi if x 6= k/2 for any k ∈ B(x) = Z 0 if x = k/2 for some k ∈ Z 4 MATH 4121

and finally define Riemann’s function as ∞ X B(nx) f(x) = . n2 n=1 The graph of this function over [0, 1] is shown in figure 1. (a) Show that f is discontinuous at every rational point with an even denominator (and odd numerator). (b) Show that f is integrable over [0, 1]. (c) Show that ∞ Z 1/2 1 X 1 f(x) dx = ≈ 0.131475. 8 (2k − 1)3 0 k=1 Solution: (a) B(x) is clearly discontinuous at every point of the form (2m + 1)/2, for m ∈ Z. It follows that B(nx) is discontinuous at each point x = (2m + 1)/2n, m ∈ Z. At such point, the jump (the difference between the right-limit and the left-limit) is negative: B(nx+) − B(nx−) < 0, so there cannot be a cancellation of Pn B(kx) jumps in the partial sums fn(x) = k=1 k2 . Therefore, each point of discontinuity of B(kx) for each k ∈ N is also a point of discontinuity for fn(x) for n ≥ k, and the jump in fn at x is at B(kx) 1 least as big as the jump in k2 at x, namely at least k2 in the negative direction. The limit of the partial sums fn is the function f, and we would like to conclude that because the fn are discontinuous at the point x, so is f. To do so, we must use the fact that the fn converge to f uniformly, proved in part (b) below. As discussed, since x is a point of discontinuity for B(kx), it is also a point 1 of discontinuity for fn for n ≥ k, with a jump at least k2 . By uniform convergence, we can choose an n large enough so that 1 we also have |f(t) − fn(t)| < 5k2 for all t. We know that there exists a δ such that for all y with x−δ < y < 1 x, we have that fn(y) is within 5k2 of the left-hand limit fn(x−). Similarly, for all z with x < z < x + δ, we have that fn(z) is 1 within 5k2 of the right-hand limit fn(x+). We have a bound on 1 the jump, that is, fn(x+) − fn(x−) ≥ k2 . Thus, by the triangle 1 1 1 3 inequality, fn(z) − fn(y) ≥ k2 − 5k2 − 5k2 = 5k2 . Then, using 1 the bound |f(t) − fn(t)| < 5k2 , we once again use the triangle 3 1 1 1 inequality to conclude that f(z) − f(y) ≥ 5k2 − 5k2 − 5k2 = 5k2 . Thus, no matter how small a neighborhood we choose around x, there will be a value z to the right of x in that neighborhood and a value y to the left of x in that neighborhood such that 1 f(z) − f(y) ≥ 5k2 , so f is not continuous at x. HOMEWORK 1 5

(b) Let us define n X B(kx) f (x) := . n k2 k=1 By the remarks made at the bottom of this assignment we can conclude that fn(x) is Riemann integrable for each n. The theorem also stated at the end of this assignment will imply that f(x) is Riemann integrable once we verify that the fn(x) converge to f(x) uniformly. In this case, we can also conclude R 1/2 that 0 fn(x) dx converges to the desired integral. We have ∞ X 1 |f(x) − f (x)| ≤ <  n k2 k=n+1 P∞ 2 for all n sufficiently large, since the k=1 1/k converges. But this means that fn(x) converges to f(x) uniformly. (c) Thus the integral of f(x) can be obtained as the limit of the in- tegrals of the fn(x) over any given subinterval. For the integral of fn(x) we have n n Z 1/2 X 1 Z 1/2 X 1 Z k/2 f (x) dx = B(kx) dx = B(u) du. n k2 k3 0 k=1 0 k=1 0 R m Note that 0 B(u) du = 0 whenever m is an integer, so only the terms with odd k will contribute to the series. In this case (k ∈ N odd) Z k/2 Z 1/2 1 B(u) du = B(u) du = . 0 0 8 R 1/2 1 P∞ 1 Therefore, 0 f(x) dx = 8 k=1 (2k−1)3 as claimed.

Remark. The following observations may be useful regarding Riemann’s example (and others!). They are easily proved. First, it is an easy fact to prove fact that if f(x) is Riemann integrable on [a, b] then it is Riemann integrable on any subinterval of [a, b]. Second, let a < b < c and suppose that f :[a, c] → R is a function whose restrictions to [a, b] and [b, c] are integrable. Then f is integrable over [a, c] and Z c Z b Z c f(x) dx = f(x) dx + f(x) dx. a a b Conversely, integrability over [a, c] implies integrability over subintervals. This and other elementary properties of the will be dis- cussed in class. 6 MATH 4121

Figure 1. Graph of Riemann’s function.

The following theorem gives a sufficient condition for passing a limit across the integral sign. (Much more general results of this kind will be seen for the Lebesgue integral.)

Theorem. Consider a sequence fn(x) of integrable functions and suppose that it converges uniformly on [a, b] to a function f(x). Then f :[a, b] → R is integrable and Z b Z b lim fn(x) dx = f(x) dx. n→∞ a a Proof. Let us first check that f is integrable. Uniform convergence of the sequence implies, for any given  > 0, the existence of an integer N such that for all n ≥ N all all x ∈ [a, b] one has |fn(x) − f(x)| < . Thus for all x, y ∈ [a, b], an application of the triangle inequality gives

(1) |f(x) − f(y)| ≤ |fN (x) − fN (y)| + 2.

Since fN is integrable, there exists a partition of [a, b] such that the differ- ence between its upper and lower Darboux sums is less than . This means that for this partition, denoted (x0, . . . , xn), we have the following inequal- ities, where we write fi = sup{f(x): x ∈ [xi−1, xi]}, fi = inf{f(x): x ∈ [xi−1, xi]}:   fi − fi ≤ fNi − fNi + 2, which follows from inequality (1) and, by the integrability of fN , X  fNi − fNi (xi − xi−1) < . i Consequently, X  fi − fi (xi − xi−1) < (1 + 2(b − a)) i HOMEWORK 1 7 and f(x) is integrable. With the integrability of f(x) assured, we can con- clude that for all n ≥ N, Z b Z b Z b

fn(x) dx − f(x) dx ≤ |fn(x) − f(x)| dx ≤ (b − a). a a a This concludes the proof.