Integrability and countability

This question’s been bugging me for over a week now and I’m afraid it’s beyond my capabilities. It concerns the Riemann integral and conditions for it (in a section just after studying the Riemann-Lebesgue Theorem).

Here it is, as stated (‘integrable’ = ‘Riemann integrable’):

Let f be integrable on [a,b]. If g is bounded and f = g except for countably many points, must it be true that g is integrable on [a,b]?

The answer given is ‘no’, without further explanation. But I can’t see why … it seems g must have only countably many discontinuities where f = g, and potentially countably many where f != g, which is still only countably many. Then g should be integrable. Unless I’m missing something.

The other thing I thought is that it might be an elaborate “Simon Says” question, where an assumption was made somewhere (e.g. “For the next two chapters, all circles will be regarded as types of squares”) that isn’t supposed to be assumed here. Though I can’t figure out what it would be.

Here’s an example where g is not integrable:

Let [a,b]=[0,1] and let f(x)=0 for all x in [0,1]. Clearly, f is integrable on this interval. Now let g be the Dirichlet function. That is, g(x)=0 if x is irrational, and g(x)=1 if x is rational. Therefore g=f for all but countably many points of the [0,1] interval. Moreover, g is bounded on this interval.

So, using the techniques I learned in my Analysis II class, we attempt to find the “Upper Sum” U(g,P) and “Lower Sum” L(g,P) over all partitions P of [0,1]. Here U(g,P) is the sum of the maximum values over the intervals of the partition times the width of the interval of the partition. L(g,P) is defined similarly. Clearly, U(g,P)=1 (since the rationals are dense), and L(g,P)=0 (since the irrationals are dense).

Since U(g,P) - L(g,P) = 1 for all P, then by the definition of Reimann integrability we used in that class (in particular, g is integrable if for every epsilon, there exists a P such that, etc. etc.), g is not integrable on [0,1].

I should note that we later proved that the above definition is equivalent to the “usual” definition of integrability, involving Reimann Sums.

Ah, thanks, Qir nha. I should have realized that countably many points themselves do not give rise to only countably many discontinuities.

I had a similar problem whose solution I’d like to check (which, if I’d been thinking, might have helped me with this one.)

Consider a modified Dirichlet function where f(x) = 1/n if x is m/n in lowest terms and f(x) = 0 if x is irrational (does this one have a name?) ; if integrable, find the integral from 0 to 1.

To prove integrability, I said that f is continuous at any irrational x’, since for any (eps.) I can find a prime N, such that f(x) < 1/N < (eps.) if f(m/N) < f(x’) < f((m+1)/N). Except I’m not so sure f(x) must be < 1/N in that interval, but it seems there would only be a countable number of values of f(x) in the interval greater than that N, and there will be some larger N, so it might still work out. Any ideas on that?

(Of course once that’s proven, actually evaluating the integral is too easy.)

Given N, there are only finitely many fractions in lowest terms with N or less in the denominator. Pick your interval to exclude those finitely many fractions, and you got it.

Interestingly, the modified Dirichlet function has only a countable number of discontinuities (at every rational point).

Let f be the modified Dirichlet function, which we know is integrable. Let H be the Heaviside unit step function (H(x) = 0 if x <= 0, 1 otherwise). H is also integrable. But H(f) is the non-integrable characteristic function of the rationals. So composition doesn’t always preserve integrability, even though it does preserve differentiability. Weird, huh?

could someone please kick the server. This thread seems to be full of gibberish :slight_smile: