## Theorem 7.1.16: Riemann Integral of almost Continuous Function

If

*f*is a bounded function defined on a closed, bounded interval*[a, b]*and*f*is continuous except at countably many points, then*f*is Riemann integrable.
The converse is also true: If *f* is a bounded function
defined on a closed, bounded interval *[a, b]* and
*f* is Riemann integrable, then *f* is
continuous on *[a, b]* except possibly at countably
many points.

### Proof:

To prove this is not easy; we will start with a simpler version of this theorem: if*f*is continuous and bounded over the interval

*[a, b]*except at one point

*x*, then

_{k}*f*is Riemann integrable over

*[a, b]*.

We know that *f* is bounded by some number *M*
over the interval *[a, b]*.

Take any
* > 0* and choose a
partition *P* that includes the point *x _{k}*
such that

Then in particular| P | < / 12M

We also know that|x_{k+1}- x_{k-1}| < / 6M

*f*is uniformly continuous over

*[a, x*as well as uniformly continuous over

_{k-1}]*[x*. Therefore, for our chosen there exists

_{k+1}, b]- a
*'*such that*|f(x) - f(y)| < 1/3 / (b - a)*for all*x*,*y*inside*[a, x*with_{k-1}]*|x - y| < '* - a
*''*such that*|f(x) - f(y)| < 1/3 / (b - a)*for all*x*,*y*inside*[x*with_{k+1}, b]*|x - y| < ''*

*P*by adding points on the left side of

*x*so that the mesh on that side is less than

_{k-1}*'*, and by adding points on the right side of

*x*so that the mesh there is less than

_{k+1}*''*. For simplicity, call that new partition again

*P*. Then we have:

For the first term we have:| U(f,P) - L(f,P) | |c_{j}- d_{j}| (x_{j}- x_{j-1}) =

because of uniform continuity to the left of|c_{1}- d_{1}| (x_{1}- x_{0}) + ... + |c_{k-1}- d_{k-1}| (x_{k-1}- x_{k-2})

< 1/3 /(b-a) (x_{k-1}- x_{0}) < 1/3 /(b-a) (b - a) = 1/3

*x*and our choice of the partition. The third term can be estimated similarly:

_{k}Since|c_{k+2}- d_{k+2}| (x_{k+2}- x_{k+1}) + ... + |c_{n}- d_{n}| (x_{n}- x_{n-1})

< 1/3 /(b-a) (x_{n}- x_{k+1}) < 1/3 /(b-a) (b - a) = 1/3

*f*is bounded by

*M*we know that

*|c*for all

_{j}- d_{j}| < 2M*j*so that the middle term can be estimated by:

Taking everything together we have:|c_{k}- d_{k}| (x_{k}- x_{k-1}) + |c_{k+1}- d_{k+1}| (x_{k+1}- x_{k})

< 2M (x_{k+1}- x_{k-1}) < 2M / 6M = 1/3

Therefore, by Riemann's Lemma, the function|U(f,P) - L(f,P)| < 1/3 + 1/3 + 1/3 =

*f*is Riemann integrable.