3

I am curious, does there exist a Riemann integrable function $f: [a,b] \to \mathbb{R}$ that satisfies the following three criteria?

$\hspace{20pt}$ $1$. $f$ is a positive function, that is, $f(x) \geqslant 0$ for all $x \in [a,b]$

$\hspace{20pt}$ $2$. There exists an infinite subset $I$ of $[a, b]$ such that $f(x) > 0$ for each $x \in E$

$\hspace{20pt}$ $3$. $\int_a^b f(x)dx=0$

I was initially thinking about a constant function, but then the integral is greater than $0$ if criteria $2$ is met. If such a function exists, what is an elementary example?

  • 2
    Yes, it exists. – Rafa Budría Apr 15 '22 at 20:49
  • 2
    Take a look at the Thomae function for a simple example without measure theory. – Momo Apr 15 '22 at 21:01
  • A small little comment which I think is interesting, is that such a function would not exist if $2.$ forced the set $E$ to be uncountable as well, i.e. we need countable $E$ for the construction – Lorago Apr 15 '22 at 21:22
  • @Lorago Nope! The set $E$ can be uncountable. – B. S. Thomson Apr 15 '22 at 21:37
  • 2
    @B.S.Thomson oh yea of course, you are right, I don't know why I though that was the case! I'm probably a bit too tired to do math right now haha – Lorago Apr 15 '22 at 21:39
  • 1
    @Lorago Your first thought might have been that this would be a tougher problem for a student who has studied only the Riemann integral. We can send Clyde here though: https://math.stackexchange.com/questions/18474/riemann-integral-of-characteristic-function-of-cantor-set/18477#18477 – B. S. Thomson Apr 15 '22 at 21:43
  • 4
    I am somewhat baffled! The question is quite clearly posed at an elementary level and yet every answer refers to "measure zero." If you were sent back in a time machine before 1895 would you have no way of communicating an answer to this question? (By the way, all those mathematicians knew that the set of points of discontinuity had to be the union of a sequence of closed sets of content zero.) – B. S. Thomson Apr 15 '22 at 22:04

4 Answers4

4

Define $f:[0,1]\to\mathbb{R}$ by $f(\frac{1}{n})=1$ for all $n\in\mathbb{N}$, and $f(x)=0$ otherwise. This function is Riemann integrable, because it is continuous everywhere outside of a set of measure zero. The integral is zero because $f=0$ outside of a set of measure zero.

Mark
  • 43,582
  • I'm sorry, I am not familiar with the term "measure." What do you mean? – Clyde Kertzer Apr 15 '22 at 20:53
  • Yeah, I understand. Riemann integration is usually taught before Lebesgue integration, and so there are many exercises (which are very simple with measure theory) which look much more complicated than they should be. I had the same problem when I learned calculus. But it's not too difficult to check my example works using, say, Darboux sums. – Mark Apr 15 '22 at 21:02
  • @ClydeKertzer: Roughly speaking, the "measure" of a subset of $\mathbb R$ is its length. For example, an interval $[a,b]$ has measure $b-a$. However, we assign a measure not just to "simple" sets like intervals, but also sets such as $[0,1]\cap\mathbb Q$, which has a measure of $0$. To understand why, you would have to look at the definition of Lebesgue Measure, which you can think of as giving a precise mathematical definition of "length" to subsets of $\mathbb R$. – Joe Apr 15 '22 at 21:09
4

Just to address @B.S.Thomson complaint, take @Lorago's function and an arbitrary $\epsilon>0$, and take the interval $[a,a+\epsilon/2]$.

As $a+\frac{b-a}{n}\to a$, it follows that all the points of $E$ with the exception of a finite number belong to $[a,a+\epsilon/2]$.

Cover the remaining finite number of points with intervals of length at most $\epsilon/2, \epsilon/4,\ldots$ centered in those points, taking care not to overlap other intervals or points.

Now use the endpoints of those finite intervals to generate a partition of $[a,b]$. Now it's easy to see that the upper Darboux sum of this partition is at most $\epsilon/2+\epsilon/4+\ldots<\epsilon$. In other words, $\int_a^bf(x)\,dx=0$

Momo
  • 16,300
  • Great. Maybe you are inclined to do the same thing for $E$ as the Cantor set in $[0,1]$ as that will handle one of the other answers. I wonder if there is an elementary way, too, to show that if $E$ is a fat Cantor set then this argument does not work. For closed sets "measure" is pretty simple and historically important too. – B. S. Thomson Apr 16 '22 at 00:02
  • 1
    @B.S.Thomson For Cantor set the natural partition choice is the one generated at the $n^\text{th}$ iteration step, with $n$ chosen such that $(2/3)^n<\epsilon$. But there is a little difficulty with the $\sup$ at endpoints. It can be overcome by generating the partition by the middle fourth (or $3+\delta$) instead of the middle third. Regarding the fat Cantor set... take a look here – Momo Apr 16 '22 at 01:55
3

Take the following function $f\colon [0,1]\to \mathbb{R}$, $f(x)=0 \text{ if } x\notin C$ and $f(x)=1 \text{ if } x\in C$ where $C$ is the Cantor so that the set of discontinuities is a Lebesgue null set and hence Riemann-integrable. Hence $f\geq 0$ on $[0,1]$, $f(x)>0$ on the infinite set $C$ and $$\left|\int_a^b f(x) dx\right|\int_a^b |f(x)| dx \leq \int_{C^C} |f(x)|dx + \int_C |f(x)|dx =0+ \lambda(C)=0.$$

user99432
  • 934
2

Recall that a bounded function $f:[a,b]\to\mathbb{R}$ is Riemann integrable if and only if it is continuous almost everywhere (in the Lebesgue sense). We thus consider a "nice" infinite set with measure zero, say let

$$E=\left\{a+\frac{b-a}{n} : n\in\mathbb{Z}^+\right\}.$$

Now clearly $E$ is a countably infinite set, and so it has Lebesgue measure zero. Now set

$$f=\chi_{E},$$

i.e. the characteristic function of $E$. Check for yourself that this function is continuous a.e., and thus Riemann integrable. Now in this case the Riemann and Lebesgue integrals also coincide, and so

$$\int_a^b f(x)\,\mathrm{d}x=\int_E\mathrm{d}\lambda=\lambda(E)=0,$$

where $\lambda$ is the Lebesgue measure on $\mathbb{R}$. Thus such a function does indeed exist. Now if you don't know any Lebesgue integration, see if you can prove that this function indeed has Riemann integral zero using the definition or some other nice theorem, but I'll leave that up to you.

Lorago
  • 12,173
  • I am sorry, I am not familiar with "Lebesgue measure," what do you mean? – Clyde Kertzer Apr 15 '22 at 21:06
  • 1
    @ClydeKertzer intuitively speaking, a measure is a type of function which assign "sizes" to sets. The Lebesgue measure is a special such measure, which on $\mathbb{R}$ is meant to give you what you would consider the length of a set. For example, take the interval $[a,b]$. You would expect this to have length $b-a$, and that is what the Lebesgue measure of the set is. The point is that it allows us to define a more general integral, called the Lebesgue integral, and it turns out that all Riemann integrable functions on compact intervals are Lebesgue integrable, and the integrals coincide. – Lorago Apr 15 '22 at 21:16
  • @ClydeKertzer now of course there is much more to it, and it is more advanced than Riemann integrations, however it is also more powerful once you master it, hence why you will see essentially all answers using it. I do think it is very much doable to prove that this function is Riemann integrable and has Riemann integral zero using just the definition though. So pick your favorite characterization of Riemann integrability, and try to prove it yourself! I've given you the function, now you try to prove it :) – Lorago Apr 15 '22 at 21:17
  • What is $\chi$? – Clyde Kertzer Apr 15 '22 at 21:18
  • @ClydeKertzer as I wrote in the post, $\chi_E$ is the characteristic function of $E$. It is defined so that $\chi_E(x)=1$ if $x\in E$, and $\chi_E(x)=0$ if $x\notin E$. – Lorago Apr 15 '22 at 21:20
  • Ah okay, I read it as $\chi \cdot E$. – Clyde Kertzer Apr 15 '22 at 22:40