# Example of a function with only finitely many discontinuities which is not Riemann integrable? [duplicate]

I know that bounded functions on compact intervals $[a,b]$ with only finitely (or countably) many discontinuities are Riemann integrable. What is an example of an unbounded function with only finitely many discontinuties defined on a compact interval $[a,b]$ which is not Riemann integrable?

I assume there must be some for the bounded hypothesis to be needed.

• The Riemann integral is defined for bounded functions. Are you looking into improper integrals? – Pedro Tamaroff Oct 6 '12 at 3:21
• @Peter only for... – David Mitra Oct 6 '12 at 3:22
• @DavidMitra You mean it should read "The Riemann integral is defined only for bounded functions"? What is the problem? – Pedro Tamaroff Oct 6 '12 at 3:25
• @David I had completely misread the question, by the way. – Pedro Tamaroff Oct 6 '12 at 3:54

$$[a,b] = [-1,1], \quad f(x) = \begin{cases} 1/x, & x \ne 0 \\ 0, & x = 0 \end{cases}$$

This function $f$ has exactly one discontinuity, at $x=0$. Intuitively, $f$ should fail to be Riemann integrable because it has infinite area both above and below the $x$ axis.

To show this formally, suppose we are given a mesh size $\delta$; choose $n$ so large that $1/n < \delta$. Since the harmonic series diverges, choose an $m > n$ so large that $\sum_{j=n+1}^m \frac{1}{j} \ge 1$. Now consider the partition $\mathcal{P}$ of $[-1,1]$ consisting of $\{-\frac{i}{n}, 0, \frac{j}{m} : 1 \le i \le n, \, 1 \le j \le m\}$. Note that the mesh of $\mathcal{P}$ is $1/n < \delta$. Tag the partition $\mathcal{P}$ by choosing the points $-\frac{i}{n}$ and $\frac{j}{m}$, $1 \le i \le n$, $1 \le j \le m$ (you can check this indeed results in one point in each interval). The Riemann sum of $f$ corresponding to this tagged partition is $$\sum_{i=1}^n \frac{1}{n} f(-\frac{i}{n}) + \sum_{j=1}^m \frac{1}{m} f(\frac{j}{m}) = \sum_{i=1}^n \frac{-1}{i} + \sum_{j=1}^m \frac{1}{j} = \sum_{j=n+1}^m \frac{1}{j} \ge 1.$$ On the other hand, if we choose the partition $\mathcal{P}' = \{ -\frac{j}{m}, 0, \frac{i}{n} : 1 \le i \le n, 1 \le j \le m\}$, then $\mathcal{P}'$ also has mesh $1/n < \delta$, and by a similar computation, the Riemann sum corresponding to $\mathcal{P}'$ is at most $-1$.

$\delta$ was arbitrary, so this shows that the Riemann sums do not converge as the mesh size tends to 0. Thus $f$ is not Riemann integrable.

• Could you elaborate? – Pedro Tamaroff Oct 6 '12 at 3:32
• Nevermind, I misread the question. +1 – Pedro Tamaroff Oct 6 '12 at 3:56
• @PeterTamaroff: I added a proof anyway :) – Nate Eldredge Oct 6 '12 at 3:58
• I don't see the need to be so elaborate. You can select a tag $t_0$ from the subinterval $[0,1/m]$ so that $f(t_0)\cdot{1\over m}$ is as large as you desire. So, keeping the tags for the other subintervals fixed, you can construct Riemann sums as large as you desire. (Of course, a similar argument shows that a Riemann integrable function must be bounded.) – David Mitra Oct 6 '12 at 4:18
• @DavidMitra, I thought the same. This proof is overcomplicated and confusing. I would be interested in why Nate did it in this way? Maybe there is a good reason which is beyond my understanding... – Philipp Sep 18 '20 at 20:57