Piecewise Continuous Function with One-Sided Limits is Darboux Integrable

Theorem
A piecewise continuous function $f$ defined on an interval $\left[{a \,.\,.\, b}\right]$ is Riemann integrable.

Proof
Since $f$ is piecewise continuous, there exists a finite subdivision $\left\{{x_0, \ldots, x_n}\right\}$ of $\left[{a \,.\,.\, b}\right]$, $x_0 = a$ and $x_n=b$, such that $f$ is continuous on $\left({x_{i−1} \,.\,.\, x_i}\right)$ for every $i \in \left\{{1, \ldots, n}\right\}$.

Note that $n$ is the number of intervals $\left({x_{i−1} \,.\,.\, x_i}\right)$ defined from the subdivision $\left\{{x_0, \ldots, x_n}\right\}$.

We shall use proof by induction on the number of intervals.

We start with the case $n=1$, the base case.

We need to prove that the theorem is true for this case.

By the piecewise continuity of $f$ for the case $n=1$, $f$ is continuous on $\left({a \,.\,.\, b}\right)$, and $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $\displaystyle \lim_{x \to b-} f\left({x}\right)$ exist.

By Integrability Theorem for Functions Continuous on Open Intervals, $f$ is Riemann integrable on $\left[{a \,.\,.\, b}\right]$.

This finishes the proof for the case $n=1$.

Assume that the theorem is true for some $n$, $n \geq 1$.

We need to prove that the theorem is true for the case $n+1$.

Since $f$ is piecewise continuous, a subdivision $P$ exists, $P = \left\{{x_0, \ldots, x_{n+1}}\right\}$ of $\left[{a \,.\,.\, b}\right]$, $x_0 = a$ and $x_{n+1} = b$, so that $f$ is continuous on $\left({x_{i−1} \,.\,.\, x_i}\right)$ for every $i \in \left\{{1, \ldots, n+1}\right\}$.

We intend to prove that $f$ is piecewise continuous on $\left[{a \,.\,.\, x_n}\right]$ and $\left[{x_n \,.\,.\, b}\right]$.

We know that $f$ is continuous on $\left({x_{i−1} \,.\,.\, x_i}\right)$ for every $i \in \left\{{1, \ldots, n}\right\}$.

Also, the one-sided limits $\displaystyle \lim_{x \to x_{i−1}+} f\left({x}\right)$ and $\displaystyle \lim_{x \to x_i-} f\left({x}\right)$ exist for every $i \in \left\{{1, \ldots, n}\right\}$.

Therefore, all the requirements for $f$ to be piecewise continuous on $\left[{x_0 \,.\,.\, x_n}\right]$ for the subdivision $\left\{{x_0, \ldots, x_n}\right\}$ of $\left[{x_0 \,.\,.\, x_n}\right]$ are satisfied.

As $x_0 = a$, we have shown that $f$ is piecewise continuous on $\left[{a \,.\,.\, x_n}\right]$.

Since $f$ is piecewise continuous on $\left[{a \,.\,.\, b}\right]$ with respect to the subdivision $P$, $f$ is continuous on $\left({x_n \,.\,.\, x_{n+1}}\right)$.

Also, the one-sided limits $\displaystyle \lim_{x \to x_n+} f\left({x}\right)$ and $\displaystyle \lim_{x \to x_{n+1}−} f\left({x}\right)$ exist.

Therefore, all the requirements for $f$ to be piecewise continuous on $\left[{x_n \,.\,.\, x_{n+1}}\right]$ for the subdivision $\left\{{x_n, x_{n+1}}\right\}$ of $\left[{x_n \,.\,.\, x_{n+1}}\right]$ are satisfied.

As $x_{n+1} = b$, we have shown that $f$ is piecewise continuous on $\left[{x_n \,.\,.\, b}\right]$.

Next we show that $f$ is integrable on $\left[{a \,.\,.\, x_n}\right]$ and $\left[{x_n \,.\,.\, b}\right]$:

Since $f$ is piecewise continuous on $\left[{a \,.\,.\, x_n}\right]$, and the number of intervals $\left({x_{i−1} \,.\,.\, x_i}\right)$ defined from the subdivision $\left\{{x_0, \ldots, x_n}\right\}$ equals $n$, $f$ is integrable on $\left[{a \,.\,.\, x_n}\right]$ by the induction hypothesis.

Since $f$ is piecewise continuous on $\left[{x_n \,.\,.\, b}\right]$, and the number of intervals $\left({x_{i−1} \,.\,.\, x_i}\right)$ defined from the subdivision $\left\{{x_n, x_{n+1}}\right\}$ equals 1, $f$ is integrable on $\left[{x_n \,.\,.\, b}\right]$ by the fact that the theorem is true for the base case.

To proceed we need the following lemma:

Integral over interval equals sum of integrals over two subintervals
Let $f$ be a real function defined on a closed interval $\left[{a \,.\,.\, b}\right]$, $a < b$.

Let $c$ be a point in $\left({a \,.\,.\, b}\right)$.

Let $f$ be integrable on $\left[{a \,.\,.\, c}\right]$ and $\left[{c \,.\,.\, b}\right]$.

Then $f$ is integrable on $\left[{a \,.\,.\, b}\right]$ and $\displaystyle \int_a^b f \left({x}\right) \ \mathrm d x = \int_a^c f \left({x}\right) \ \mathrm d x + \int_c^b f \left({x}\right) \ \mathrm d x$.

Proof of lemma
Let a strictly positive $\epsilon$ be given.

The existence of $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x$ implies that a subdivision $S_1$ of $\left[{a \,.\,.\, c}\right]$ exists such that $U(S_1) – L(S_1) < \epsilon$, that both $U(S_1)$, the upper sum of $f$ on $\left[{a \,.\,.\, c}\right]$, and $L(S_1)$, the lower sum of $f$ on $\left[{a \,.\,.\, c}\right]$, converge as $\epsilon$ approaches 0, and that they converge to the same limit, which equals $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x$.

The existence of $\displaystyle \int_c^b f \left({x}\right) \ \mathrm d x$ implies that a subdivision $S_2$ of $\left[{c \,.\,.\, b}\right]$ exists such that $U(S_2) – L(S_2) < \epsilon$, that both $U(S_2)$ and $L(S_2)$ converge as $\epsilon$ approaches 0, and that they converge to the same limit, which equals $\displaystyle \int_c^b f \left({x}\right) \ \mathrm d x$.

By Combination Theorem for Sequences/Sum Rule, we know that $U(S_1) + U(S_2)$ converges as $\epsilon$ approaches 0 to the sum of the limits of $U(S_1)$ and $U(S_2)$, $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x + \int_c^b f \left({x}\right) \ \mathrm d x$.

Correspondingly for $L(S_1)$ and $L(S_2)$, we find that $L(S_1) + L(S_2)$ converges to $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x + \int_c^b f \left({x}\right) \ \mathrm d x$ too as $\epsilon$ approaches 0.

Now consider $S = S_1 \cup S_2$.

By definition of subdivision, $S$ is a subdivision since $S_1$ and $S_2$ are subdivisions of adjacent, closed intervals.

More specific, $S$ is a subdivision of $\left[{a \,.\,.\, b}\right]$, the union of $\left[{a \,.\,.\, c}\right]$ and $\left[{c \,.\,.\, b}\right]$, the intervals of which $S_1$ and $S_2$, respectively, are subdivisions.

We find
 * $U(S) = U(S_1) + U(S_2)$ by the definition of upper sum

and
 * $L(S) = L(S_1) + L(S_2)$ by the definition of lower sum

By letting $\epsilon$ approach 0, $U(S)$ approaches the limit of $U(S_1) + U(S_2)$, a limit that we found above to be $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x + \int_c^b f \left({x}\right) \ \mathrm d x$.

Correspondingly for $L(S)$, we find that $L(S)$ approaches the same limit, $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x + \int_c^b f \left({x}\right) \ \mathrm d x$, as $\epsilon$ approaches 0.

By the definition of the Riemann integral and the fact that we have proved that both $U(S)$, the upper sum of $f$ on $\left[{a \,.\,.\, b}\right]$, and $L(S)$, the lower sum of $f$ on $\left[{a \,.\,.\, b}\right]$, approach the same limit as $\epsilon$ approaches 0, $\displaystyle \int_a^b f \left({x}\right) \ \mathrm d x$ exists.

Moreover, $\displaystyle \int_a^b f \left({x}\right) \ \mathrm d x$ equals the value of this limit, which equals $\displaystyle \int_a^c f \left({x}\right) \ \mathrm d x + \int_c^b f \left({x}\right) \ \mathrm d x$.

Hence, by the lemma above and the existence of the integrals $\displaystyle \int_a^{x_n} f \left(x\right) \ \mathrm d x$ and $\displaystyle \int_{x_n}^b f \left(x\right) \ \mathrm d x$, the left hand side of $\displaystyle \int_a^b f \left(x\right) \ \mathrm d x = \displaystyle \int_a^{x_n} f \left(x\right) \ \mathrm d x + \displaystyle \int_{x_n}^b f \left(x\right) \ \mathrm d x$ exists, which finishes the proof.