Riemann Integral: Does g(x)=f(x) Almost Everywhere?

In summary, the question discusses the Riemann and Lebesgue integrability of a bounded continuous function on [0,1] that is equal to a given function on all rational points in the interval. The question asks whether the function is equal to the given function almost everywhere in the interval, and if so, for a proof. The answer discusses the density of rationals in the reals and the role of continuity in Riemann integrability, and suggests a possible approach for proving the equality of the functions.
  • #1
mathman
Science Advisor
8,140
572
Let f(x) be a bounded continuous function on [0,1]. Let g(x)=f(x) on all rational points in [0,1]. Let g(x) be Riemann integrable on [0,1]. Does g(x)=f(x) almost everywhere in the interval? If so - proof? If not -counterexample.
 
Physics news on Phys.org
  • #3
a riemann integrable function is continuous almost everywhere. if g is continuous at c, the value of g at c is determined by its values at all rational points. so...?
 
  • Like
Likes StoneTemplePython and bhobba
  • #4
mathwonk said:
a riemann integrable function is continuous almost everywhere. if g is continuous at c, the value of g at c is determined by its values at all rational points. so...?

First I do not consider this homework and as a mentor I am discussing it now with the other mentors, but for now it will remain here. As is often the case MIT comes to the rescue:
https://ocw.mit.edu/courses/mathema.../readings-notes/MIT18_100BF10_RiemannInte.pdf

Now the question is why is the Dirichlet Function not Riemann Integrable - but is Lebesgue Integrable? What condition of the theorem is broken?

Thanks
Bill
 
  • Like
Likes FactChecker
  • #5
Ok maybe another hint - the rationals are dense in the reals.

Thanks
Bill
 
  • #6
My apologies, @mathwonk, I just didn't look at the author of the OP.

I believe it's rigorous to recast the question into a comparison of [itex]0 = f(x)-f(x)[/itex] and [itex]h(x) = g(x)-f(x)[/itex], since sums of Riemann integrable(RI) functions are also RI and since continuous function are RI. Then one is basically deconstructing the proof of non-integrability of the Dirichlet function and its modified cousins as an RAA proof of the hypothesis.

bhobba said:
...Now the question is why is the Dirichlet Function not Riemann Integrable - but is Lebesgue Integrable? What condition of the theorem is broken?

The problem with Riemann integrability of Dirichlet's function is in the necessary discretion in the evaluation of the function within the subintervals of the Riemann sums. Since both the rationals and irrationals are dense in the interval one can choose to only evaluate [itex]f(x^*_k)[/itex] at rational values or only evaluate at irrational values and you'd get non-convergence of the limits. By making measure the issue instead of density, Lebesgue integration circumvents this problem.
 
  • Like
Likes bhobba
  • #7
Ok you almost got the answer of the original question. Since the rationals are dense in the reals and both functions are continuous let xn be a series of rationals that converge to any x then limit f(xn) = limit g(xn) (as they are the same at the rationals) hence f(x) = g(x) for all reals.and the functions are equal.

The Dirchlet function is the counter example to do you need continuity - its required. The Dirichlet function is continuous nowhere and has no Riemann integral (as you would expect if nowhere continuous) - specifically in every interval the supremum of f is 1 and the infimum is 0 therefore it is not Riemann integrable.

This leads directly to the Lebesgue Integral which can integrate the Dirichlet function, plus has all sorts of other neat features like Fubini and Dominated convergence. I don't know about others but once I learned Lebesgue integration I forgot Riemann - I think everyone should know it. Its good old MIT to the rescue again:
https://math.mit.edu/~rbm/18-102-S14/Chapter2.pdf

Added later: Just as an overview of the above development of Lebesgue Integration - there are a few (all equivalent of course) - the above is a bit different and more related to distribution theory I am interested in. A function is of compact support if it is zero outside some interval. Consider all such continuous functions. Suppose a sequence of such functions f(n) are absolutely sumable then of course its normal sumable to f. f = ∑f(n) is Lebesgue integrable if ∑ ∫ |f(n)| < ∞. We then use the good old absolute sumable trick to define the Lebesgue integral ∑ ∫ |f(n)| + ∑ ∫ f(n) <= 2*∑ ∫ |f(n)|. That means ∑ ∫ |f(n)| + ∑ ∫ f(n) (sumed to k) is positive and increasing with k, plus is bounded above by 2*∑ ∫ |f(n)| so if k = ∞ ∑ ∫ |f(n)| + ∑ ∫ f(n) exists (least upper bound axiom) then ∑ ∫ f(n) is called the Lebesgue integral. It turns out its well defined, has nice properties including if a function is Riemann integrable it's Lebesgue integrate, dominant convergence applies and Fubini's theorem (look them up if you don't know them).

If you start doing some advanced things in math like Hilbert spaces, divergent series (doing that right now - its stranger than I at first thought - I thought it was just a different definition of convergence - its actually not - but the real answer lies not in Lebesgue integration, but in analytic continuation) and many other cool things you need it - the books all say - when we speak of Integral we mean Lebesgue integration

If you are really keen the best book I have seen on advanced calculus is Hubbard's:
http://matrixeditions.com/5thUnifiedApproach.html

Thanks
Bill
 
Last edited:
  • #8
The original problem was not a homework problem! I deliberately made a point that it is Riemann integrable. I am well aware that if it was only Lebesgue integrable, then it would be obviously undecided to say g=f anywhere except at the rationals. My own thought about proving it true is to use the equivalence of Darboux and Riemann integrability and use upper Darboux and lower Darboux sums to squeeze g to the point where it equals f almost everywhere. I just am not sure how to flesh it out.
 
  • #9
can you show g=f wherever g is continuous? (assuming that for every point c of the domain, there is a sequence of rationals converging to c.)
 
  • #10
mathman said:
The original problem was not a homework problem! I deliberately made a point that it is Riemann integrable. I am well aware that if it was only Lebesgue integrable, then it would be obviously undecided to say g=f anywhere except at the rationals. My own thought about proving it true is to use the equivalence of Darboux and Riemann integrability and use upper Darboux and lower Darboux sums to squeeze g to the point where it equals f almost everywhere. I just am not sure how to flesh it out.

Ah - I see your issue now - you did not actually say g(x) was continuous - I assumed it due to its the usual case in Riemann integration. I will need to think a bit.

Added later: After bit of thought into the deep recesses of my memory I recalled Lebesgue had a theorem about Riemann integration and did a internet search to find it:
http://www.math.ru.nl/~mueger/Lebesgue.pdf

It says:
A function f : [a, b] → R is Riemann integrable iff it is bounded and the set S(f) = {x ∈ [a, b] | f is not continuous at x} has measure zero.

But wait - the Dirichlet function has that property - it is continuous at irrational points but discontinuous at the rationals - it would seem a counter example disproving the theorem. It has defeated me. Someone else with more knowledge needs to look at it I think.

I eagerly await the resolution.

Thanks
Bill
 
Last edited:
  • #11
mathwonk said:
can you show g=f wherever g is continuous? (assuming that for every point c of the domain, there is a sequence of rationals converging to c.)

Yes that is what I showed but forgot that the OP did not say g was continuous - just integrable. This one, as the above shows, is proving harder than I thought.

Thanks
Bill
 
Last edited:
  • #12
bhobba said:
But wait - the Dirichlet function has that property - it is continuous at irrational points but discontinuous at the rationals - it would seem a counter example disproving the theorem. It has defeated me. Someone else with more knowledge needs to look at it I think.

No, the Dirichlet function is discontinuous everywhere, since the rationals are dense.
 
  • Like
Likes bhobba
  • #13
It appears that the theorem about Lebesgue and Riemann integral should apply here. g is Riemann integrable therefore continuous almost everywhere. Since f=g on a dense set, while f is continuous, this should imply f=g almost everywhere. Is that a complete argument?
 
  • #14
remark: the dirichlet function cited here seems to be the one that equals 1/q at a rational with lowest vterm form p/q and = 0 at every irrational. it is continuous at all irrationals and hence is riemann integrable with integral zero over any finite interval.

the theorem that a bounded function is riemann integrable iff it has a set of discontinuities of measure zero was indeed stated by lebesgue, but the proof already appears in riemann's original paper (on the next page after) where he defined the riemann integral. i know this because it was my job to review the first english translation of riemann's works, so unlike most people i have actually read riemann's paper.
 
  • Like
Likes lurflurf, bhobba and fresh_42
  • #15
mathman said:
It appears that the theorem about Lebesgue and Riemann integral should apply here. g is Riemann integrable therefore continuous almost everywhere. Since f=g on a dense set, while f is continuous, this should imply f=g almost everywhere. Is that a complete argument?

I think taking @mathwonk's hint would make the argument crystal clear. That is: at points where g is continuous it must equal f.
 
  • #16
A cool example: Let f be zero on the unit interval Let g be the function which is one on the Cantor set and zero on the rest of the unit interval. Since the Cantor set has measure zero, g is Riemann integrable and equals f almost everywhere,

Now let g be one on a Cantor set of positive measure - e.g by removing middle 1/4's rather than middle thirds. This is a again a closed set with empty interior but it has positive measure. g does not equal f a.e. and it is not Riemann integrable.
 
Last edited:
  • Like
Likes bhobba
  • #17
Very nice!
[notice in lavinia's very nice example, that since the Cantor set is closed, the function that equals zero on its complement is continuous on that open complement. Since even the fat cantor set is nowhere dense, the function that equals 1 on it is discontinuous on it.

Actually, it seems one needs to be a little more careful in describing the fat cantor set example.
https://blogs.scientificamerican.com/roots-of-unity/a-few-of-my-favorite-spaces-fat-cantor-sets/]
 
Last edited:
  • Like
Likes bhobba
  • #18
lavinia said:
A cool example: Let f be zero on the unit interval Let g be the function which is one on the Cantor set and zero on the rest of the unit interval. Since the Cantor set has measure zero, g is Riemann integrable and equals f almost everywhere,

Now let g be one on a Cantor set of positive measure - e.g by removing middle 1/4's the rather than middle thirds. This is a again a closed set with empty interior but it has positive measure. g does not equal f a.e. and it is not Riemann integrable.
I am somewhat lost here. The Riemann integral was defined before measure theory was invented, so talking about "measure zero" and "almost everywhere", while perfectly sensible when talking about Lebesgue integrals, makes no sense when talking about Riemann integrals. Just check out https://en.wikipedia.org/wiki/Riemann_integral.
 
  • #19
Theorem. (Lebesgue’s Criterion for integrablility) Let f : [a, b] → R. Then,f is Riemann integrable if and only if f is bounded and the set of discontinuities of f has measure 0.

You can calculate the Riemann integral of the characteritic function of the Cantor set directly.
 
  • Like
Likes bhobba
  • #20
Svein said:
The Riemann integral was defined before measure theory was invented,

Yes but its interpretation using measure theory had to await until it was mathematicaly defined and investigated.

Why I am sitting back and not commenting is I am hoping someone can explain how a function can be continuous at all on dense set of measure zero. There is obviously something in the wording of the theorem I quoted. The following theorem suggests the answer is no to the original question because of it only being defined on a set of measure zero - and the set is dense in the reals - A function f : [a, b] → R is Riemann integrate iff it is bounded and the set S(f) = {x ∈ [a, b] | f is not continuous at x} has measure zero. Yet the Dirichlet function is a counter example to that statement - as it must be if you think about it. Consider any partition - if the set is dense its maximum and minimum can always be different hence can not be Riemann Integrable. There is obviously something I am missing, something in the detail of the theorem. I am waiting for someone to spot it. If you studied the theorems proof and thought hard you could probably figure it out - but I do not feel like spending the time doing that. My feeling for what it is worth is its really saying one can ignore those values and make them anything you like to avoid the partition issue. But I do not know - its just a guess.

Thanks
Bill
 
Last edited:
  • #21
Think I may have got it - have a look at definition three where the Riemann Integral is defined:
A function f : [a, b] → R is Riemann integrable (on [a, b]) if there exists A ∈ R (easily seen to be unique) such that for every ε > 0 there is λ > 0 such that the Riemann sum σ(f; P, ξ) = Xf(ξi)∆xi satisfies |σ(f; P, ξ) − A| < ε whenever P is a partition with λ(P) < δ and ξi ∈ ∆i for all i = 1, . . . , n. In this case we write R b a f(x)dx = A.

That may not be the same as the usual one where one takes the minimum and maximum of an increasing partition and they converge to the same value:
https://www.math.ucdavis.edu/~hunter/m125b/ch1.pdf

Just a thought.

Thanks
Bill
 
Last edited:
  • #22
bhobba said:
Yes but its interpretation using measure theory had to await until it was mathematicaly defined and investigated.

Why I am sitting back and not commenting is I am hoping someone can explain how a function can be continuous at all on dense set of measure zero. There is obviously something in the wording of the theorem I quoted. The following theorem suggests the answer is no to the original question because of it only being defined on a set of measure zero - and the set is dense in the reals - A function f : [a, b] → R is Riemann integrate iff it is bounded and the set S(f) = {x ∈ [a, b] | f is not continuous at x} has measure zero. Yet the Dirichlet function is a counter example to that statement - as it must be if you think about it. Consider any partition - if the set is dense its maximum and minimum can always be different hence can not be Riemann Integrable. There is obviously something I am missing, something in the detail of the theorem. I am waiting for someone to spot it. If you studied the theorems proof and thought hard you could probably figure it out - but I do not feel like spending the time doing that. My feeling for what it is worth is its really saying one can ignore those values and make them anything you like to avoid the partition issue. But I do not know - its just a guess.

Thanks
Bill

If by the Dirichlet function you mean the function on the unit interval which is zero on the rationals and 1 on the irrationals then it is discontinuous at every point. So it is discontinuous on a set of measure 1 not zero.

The upper sums will always be 1 and the lower sums will always be 0.

The Lebesque integral of a positive function f is the supremum of the integrals of all "simple" functions that are bounded above by f. The Dirichlet function is the simple function which is zero on the rationals and 1 on the irrationals. Its Lebesque integral by definition is

0⋅measure(rationals) + 1⋅measure(irrationals) = 0⋅0 +1⋅1 = 1

The Riemann integral is defined by dividing the domain into finitely many disjoint intervals. The Lebesque integral is defined by dividing the domain into finitely many disjoint measurable subsets. A lower sum is a function that is bounded above by f and which is constant on each of the disjoint intervals. A simple function is a function that is bounded above by f and which is constant on each of the disjoint measurable subsets.

Every lower sum is also a simple function but not visa versa.

One can think of the Lebesque integral as dividing the y-axis up into disjoint intervals instead of the x-axis as in the Riemann integral.
 
Last edited:
  • Like
Likes Svein
  • #23
lavinia said:
So it is discontinuous on a set of measure 1 not zero

Can you expand on this please? I have proven myself in the deep past the rationals have measure 0 - and there are many proofs of that around eg (see example 2.3):
https://www.math.ucdavis.edu/~hunter/measure_theory/measure_notes_ch2.pdf

Others have wondered about this strange property as well - dense and of measure zero eg:
https://www.quora.com/Why-are-the-rational-numbers-dense-and-of-measure-zero-at-the-same-time

It seems counter intuitive,

Thanks
Bill
 
  • #24
lavinia said:
So it is discontinuous on a set of measure 1 not zero

Can you expand on this please? I have proven myself in the deep past the rationals have measure 0 - and there are many proofs of that around but as mentioned in the link below: The measure of a point is zero and the rational number set is a countable union of point sets of measure zero so the whole thing has measure zero.

Others have wondered about this strange property as well - dense and of measure zero eg:
https://www.quora.com/Why-are-the-rational-numbers-dense-and-of-measure-zero-at-the-same-time

It seems counter intuitive.

Thanks
Bill
 
  • #25
bhobba said:
Can you expand on this please? I have proven myself in the deep past the rationals have measure 0 - and there are many proofs of that around but as mentioned in the link below: The measure of a point is zero and the rational number set is a countable union of point sets of measure zero so the whole thing has measure zero.

Others have wondered about this strange property as well - dense and of measure zero eg:
https://www.quora.com/Why-are-the-rational-numbers-dense-and-of-measure-zero-at-the-same-time

It seems counter intuitive.

Thanks
Bill

It is discontinuous on both the rationals and the irrationals. Every irrational is the limit of a Cauchy sequence of rationals. Every rational is the limit of a Cauchy sequence of irrationals. You do not need to know the measure of the rationals.

Every countable set has measure zero.
 
  • #26
lavinia said:
It is discontinuous on both the rationals and the irrationals. Every irrational is the limit of a Cauchy sequence of rationals. Every rational is the limit of a Cauchy sequence of irrationals. You do not need to know the measure of the rationals.

Are you getting at the measure of the irrationals is 1 over the interval [0,1]. Sure. Are you saying if we do not define, or define it, at the rationals, it doesn't matter which, the measure of the real line between 0 and 1 is the measure of the irrationals ie one. Again sure - just different language to what I said before. But how does that resolve the original query. Under the usual definition of the Riemann Integral it means if it is discontinuous at the rationals it is not Riemann integrable. Thus one could say it can't be discontinuous at the rationals because its Riemann Integrable. - so my argument since the rationals are dense it must be continuous at those points - hence f=g? Have I got your argument correct?

My suspicion, and I have never seen a development along those lines, Riemann Integration can be defined in a more general way as detailed previously.

Thanks
Bill
 
  • #27
bhobba said:
Are you getting at the measure of the irrationals is 1 over the interval [0,1]. Sure. Are you saying if we do not define, or define it, at the rationals, it doesn't matter which, the measure of the real line between 0 and 1 is the measure of the irrationals ie one. Again sure - just different language to what I said before. But how does that resolve the original query. Under the usual definition of the Riemann Integral it means if it is discontinuous at the rationals it is not Riemann integrable. Thus one could say it can't be discontinuous at the rationals because its Riemann Integrable. - so my argument since the rationals are dense it must be continuous at those points - hence f=g? Have I got your argument correct?

My suspicion, and I have never seen a development along those lines, Riemann Integration can be defined in a more general way as detailed previously.

Thanks
Bill

Not sure how to answer your post.

The Dirichlet function is discontinuous on the entire interval not only the rationals. So it is not Riemann integrable. Every irrational is the limit of a Cauchy sequence of rationals and the limit of the Dirchlet function along this sequence is zero. But its value is 1 on every irrational so it is discontinuous at every irrational. This already means that it is not Riemann integrable. But it is also discontinuous on the rationals. Along any Cauchy sequence of irrationals that converges to a rational, the limit is 1, But the value of the Dirichlet function on each rational is zero. So the measure of the rationals doesn't come into the argument since the Dirichlet function is discontinuous everywhere.

The original post is answered with Mathwonk's hint which is that at points where g is continuous it must equal the function f. If g is Riemann integrable it is continuous except possibly on a set of measure zero. So it equals f almost everywhere. However g does not have to equal f exactly since for instance one can take g to be f everywhere except at a single irrational number.

Not sure if this is what you were asking.
 
Last edited:
  • Like
Likes bhobba
  • #28
lavinia said:
So the measure of the rationals doesn't come into the argument since the Dirichlet function is discontinuous everywhere.The original post is answered with Mathwonk's hint which is that at points where g is continuous it must equal the function f. If g is Riemann integrable it is continuous except possibly on a set of measure zero. So it equals f almost everywhere. However g does not have to equal f exactly since for instance one can take g to be f everywhere except at a single irrational number.

Got it.

lavinia said:
Not sure if this is what you were asking.

Its cleared up now.

Thanks
Bill
 
  • #29
@Svein: Yes the history of lebesgue versus riemann integration is a little confusing. Let me try to clarify my claim that riemann actually proved "lebesgue's criterion" even before lebesgue stated it. Lebesgue indeed defined the concept of "measure zero" to mean a set that can be covered by a countable sequence of intervals whose total length is as small as desired, i.e. a set has measure zero if: given any epsilon e > 0, there is a countable union of intervals that cover the set, the sum of whose lengths is less than e.

there is however a related concept now called "content zero" which says that for every epsilon, there is a finite sequence of intervals that cover the set, and whose lengths total less than epsilon. Riemann proved that a function f is Riemann integrable if and only if for every epsilon, and every delta, there is a finite sequence of intervals, of total length less than epsilon, that cover the set where f has oscillation greater than delta. I.e. he proved, in modern language, that f is integrable iff for every delta, the set where f has oscillation greater than delta, has content zero. Since it is elementary that the set where f is discontinuous is the union over n of the sets where f has oscillation > 1/n, and since a countable union of sets of content zero trivially has measure zero, Riemann's criterion, although not stated using the word "measure", nonetheless trivially implies Lebesgue's criterion. Thus Lebesgue merely restated Riemann's criterion in a different wording, but offered no new insight whatsoever as to when a function is Riemann integrable.

This is apparently not widely understood, especially in the US, since Riemann's works were only recently translated into English, but I was fortunate enough to be the official reviewer of that translation for Math Reviews, hence was one of the first to read it. I have also seen Riemann's result misstated in some textbooks by apparent "experts". If you have any further interest, I invite you to read the English translation, or the original if you read German, for yourself. It is slow going, but very rewarding reading.

Indeed I have just read the wikipedia article you linked, and while in general wikipedia articles are not always reliable, this one does cite the original article of Riemann as follows:

...(On the concept of a definite integral and the extent of its validity), pages 101–103.

Notice the phrase "and the extent of its validity", (und den Umfang seiner Gultigkeit, for fresh, with apologies). That part is indeed the criterion I have stated as to exactly when the Riemann integral works. I have just now consulted the article itself again and noted for the first time, that Riemann also gives a criterion for an unbounded function to be integrated by taking limits.

Wow! I have very few calculus books left on my shelf but one that I have saved is the excellent one by the magnificent author Joseph Kitchen, Calculus of One Variable. I have consulted it just now on this topic and found for the first time ever, an author who is thoroughly familiar with exactly what I have just explained. On pages 357-362 Kitchen explains in detail Riemann's criterion for integrability, in exactly the language (of content) that I have used, and then proves (in about 8 lines, i.e. trivially) that it is equivalent to Lebesgue's criterion, (by exactly the same argument I myself gave when reading Riemann). Kitchen's book was published over 50 years ago(!), but apparently did not become a standard, as much as the other famous honors books from the 1960's by Spivak and Apostol.

As a personal note, Kitchen was an extremely popular instructor at Harvard when I was a freshman there in 1960-61, and I recall the reviews of his course were summarized roughly as follows: "A large minority of Professor Kitchen's students are convinced that he is God".

Remark: Although his discussion persuades me of his thorough familiarity with the work of Riemann, he gives no specific historical reference to either Riemann's or to Lebesgue's works for this criterion, except for using their names on the concepts.
 
Last edited:
  • Like
Likes bhobba and fresh_42

1. What is the definition of a Riemann Integral?

The Riemann Integral is a mathematical concept used to calculate the area under a curve represented by a function. It is a way to find the total amount of a quantity over a given interval by dividing it into smaller and smaller parts and then adding them together.

2. What is the difference between the Riemann Integral and other types of integrals?

The Riemann Integral is a specific type of integral that is defined by a limit of sums. Other types of integrals, such as the Lebesgue Integral, are defined using different methods and may give different results for certain functions.

3. What does it mean for two functions to be equal Almost Everywhere?

When two functions are equal Almost Everywhere, it means that they are equal at every point except for a set of points with measure zero. In other words, the two functions may have slightly different values at a few points, but they are essentially the same function.

4. How does the concept of Almost Everywhere equality relate to the Riemann Integral?

In the context of the Riemann Integral, Almost Everywhere equality means that if two functions are equal Almost Everywhere, then they will have the same Riemann Integral. This is because the Riemann Integral only considers the values of the functions at a finite number of points, so any differences at points with measure zero will not affect the overall result.

5. What are some examples of functions that are equal Almost Everywhere?

Some common examples of functions that are equal Almost Everywhere include the function f(x) = x, which is equal to the function g(x) = x^2 at all points except x = 0, and the function h(x) = sin(x), which is equal to the function k(x) = cos(x) at all points except x = π/2 + nπ for any integer n. These functions are essentially the same, but they may have different values at a few isolated points.

Similar threads

Replies
1
Views
1K
  • Calculus
Replies
6
Views
1K
Replies
16
Views
2K
Replies
3
Views
2K
Replies
1
Views
829
Replies
20
Views
2K
Replies
11
Views
1K
Replies
3
Views
1K
  • Calculus
Replies
9
Views
2K
Back
Top