# Riemann sums for discontinuous functions

#### schniefen

Problem Statement
Can Riemann sums be non-existant for a discontinuous function on a given interval?
Relevant Equations
The definition of Riemann sums (see link below)
The definition of the Riemann sums: https://en.wikipedia.org/wiki/Riemann_sum

I'm stuck with a problem in my textbook involving upper and lower Riemann sums. The first question in the problem asks whether, given a function $f$ defined on $[a,b]$, the upper and lower Riemann sums for $f$ "always are Riemann sums"? The follow up question asks; if $f$ not only is defined but also continuous on $[a,b]$, are then the upper and lower Riemann Sums "always Riemann sums"?

The answer to the first question is no and the second yes. Can it be impossible to construct upper and lower Riemann sums for a discontinuous function on a given interval? What is an example of such a function?

Related Calculus and Beyond Homework News on Phys.org

#### WWGD

Gold Member
The general result is that the Riemann sum exists/converges iff the set of discontinuities has measure zero. You can , e.g., have discontinuities on a standard ( measure zero) Cantor subset of [0,1] and still have the Riemann sum converge.

#### schniefen

The general result is that the Riemann sum exists/converges iff the set of discontinuities has measure zero. You can , e.g., have discontinuities on a standard ( measure zero) Cantor subset of [0,1] and still have the Riemann sum converge.
Okay. What would be an example of a function where the upper/lower Riemann sums do not exist?

#### WWGD

Gold Member
The characteristic function on the Rationals, aka Dirichlet function. Try with Upper value 1, Lower value 0, gap cannot be closed.

#### schniefen

Sorry to bother, but wouldn't it still be perfectly possible to construct upper and lower Riemann sums, on say $[0,1]$ for that function with a given partition of the interval. Or is there something in the definition of Riemann sums that makes this impossible?

#### Mark44

Mentor
Sorry to bother, but wouldn't it still be perfectly possible to construct upper and lower Riemann sums, on say $[0,1]$ for that function with a given partition of the interval. Or is there something in the definition of Riemann sums that makes this impossible?
The problem for the function that @WWGD gave is that the upper and lower Riemann sums don't converge to the same value, no matter how fine the partition is.

#### WWGD

Gold Member
Sorry to bother, but wouldn't it still be perfectly possible to construct upper and lower Riemann sums, on say $[0,1]$ for that function with a given partition of the interval. Or is there something in the definition of Riemann sums that makes this impossible?
Ask away, Schniefen, no prob. But in any interval, however small, you will have both Rational and Irrational points, so you will never be able to make the difference between Upper and Lower sums less than 1.

#### schniefen

The problem for the function that @WWGD gave is that the upper and lower Riemann sums don't converge to the same value, no matter how fine the partition is.
Alright. I guess that was what "always Riemann sums" in the problem was initially asking about too. I understand that they wouldn't converge to the same value and so the function wouldn't be Riemann integrable, but is there something about a sum that characterises it as a strict Riemann sum per se?

#### WWGD

Gold Member
Alright. I guess that was what "always Riemann sums" in the problem was initially asking about too. I understand that they wouldn't converge to the same value and so the function wouldn't be Riemann integrable, but is there something about a sum that characterises it as a strict Riemann sum per se?
The sum containing the Max value of the function over the interval. EDIT: Every subinterval will contain both Rationals and Irrationals, so what are the Max, Min?

Last edited:

#### Mark44

Mentor
Alright. I guess that was what "always Riemann sums" in the problem was initially asking about too. I understand that they wouldn't converge to the same value and so the function wouldn't be Riemann integrable, but is there something about a sum that characterises it as a strict Riemann sum per se?
I don't see that there is anything of interest in whether a sum is a "strict Riemann sum" or not. A Riemann sum has the form $S = \sum_{i = 1}^n f(x_i^*)\Delta x_i$, where $x_i^*$ is just some value in the i-th subinterval, and $\Delta x_i$ is the width of that subinterval. For any details I've omitted, see the wiki article that you cited, or just about any Calculus textbook.

The important point is whether the Riemann sums converge to the same value, independent of the choice of the partition used to define the subintervals or of the choice of the x value within a subinterval. If the limit of the Riemann sums exists, then the function is integrable.

#### Stephen Tashi

The first question in the problem asks whether, given a function $f$ defined on $[a,b]$, the upper and lower Riemann sums for $f$ "always are Riemann sums"? The follow up question asks; if $f$ not only is defined but also continuous on $[a,b]$, are then the upper and lower Riemann Sums "always Riemann sums"?
I don't think the textbook is asking about the convergence of Riemann sums.

A reasonable interpretation of the problem is:

1) Let $f$ be a function defined everywhere on the interval $[a,b]$. Is it true that for each partition of $[a,b]$ the upper and lower Riemann sums for $f$ on that partition exist?

2) Let $f$ be a function that is defined and continuous on the interval $[a,b]$. Is it true that for each partition of $[a,b]$ the upper and lower Riemann sums for $f$ on that partition exist?

The crucial question is whether the function $f$ has max and min values on each cell $[a_k, b_k]$ in the partition. The example of "the indicator function of the rationals" doesn't settle question 1).

#### schniefen

I don't think the textbook is asking about the convergence of Riemann sums.

A reasonable interpretation of the problem is:

1) Let $f$ be a function defined everywhere on the interval $[a,b]$. Is it true that for each partition of $[a,b]$ the upper and lower Riemann sums for $f$ on that partition exist?

2) Let $f$ be a function that is defined and continuous on the interval $[a,b]$. Is it true that for each partition of $[a,b]$ the upper and lower Riemann sums for $f$ on that partition exist?

The crucial question is whether the function $f$ has max and min values on each cell $[a_k, b_k]$ in the partition. The example of "the indicator function of the rationals" doesn't settle question 1).
Yeah, this interpretation makes more sense. As @Mark44 said , there is nothing really of interest in looking for the definition of Riemann sums per se. So @Stephen Tashi what would be such a function where min and max values don’t exist for each subinterval?

#### Stephen Tashi

what would be such a function where min and max values don’t exist for each subinterval?
Technically, you only need an example where the min or max values don't exist for some interval.

Try the function $f$ defined on $[0,2]$ by
$f(x) = \frac{1}{x - 1}$ if $x \ne 1$
$f(1) = 0$.

#### schniefen

Technically, you only need an example where the min or max values don't exist for some interval.

Try the function $f$ defined on $[0,2]$ by
$f(x) = \frac{1}{x - 1}$ if $x \ne 1$
$f(1) = 0$.
Nice! Thanks!

"Riemann sums for discontinuous functions"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving