Piecewise Continuous Function with One-Sided Limits is Uniformly Continuous on Each Piece

Theorem
Let a real function $f$ defined on an interval $\left[{a \,.\,.\, b}\right]$ be piecewise continuous.

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

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

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

Since $f$ is piecewise continuous, 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\}$.

These facts ensure by Extendability Lemma for Continuous Functions that, for an arbitrary $i$ in $\left\{{1, \ldots, n}\right\}$, a function $f_i$ exists that satisfies:


 * $f_i$ is defined on $\left[{x_{i−1} \,.\,.\, x_i}\right]$.


 * $f_i$ is continuous on $\left[{x_{i−1} \,.\,.\, x_i}\right]$.


 * $f_i$ equals $f$ on $\left({x_{i−1} \,.\,.\, x_i}\right)$.

Continuous Function on Closed Interval is Uniformly Continuous ensures that $f_i$ is uniformly continuous on $\left[{x_{i−1} \,.\,.\, x_i}\right]$.

Since $\left({x_{i−1} \,.\,.\, x_i}\right)$ is a subset of $\left[{x_{i−1} \,.\,.\, x_i}\right]$, $f_i$ is uniformly continuous on $\left({x_{i−1} \,.\,.\, x_i}\right)$.

Since $f_i$ equals $f$ on $\left({x_{i−1} \,.\,.\, x_i}\right)$, $f$ too is uniformly continuous on $\left({x_{i−1} \,.\,.\, x_i}\right)$.

Since $i$ is arbitrary, this results holds for all $i \in \left\{{1, \ldots, n}\right\}$.

Extendability Lemma for Continuous Functions
Let $f$ be a continuous, real function that is defined on an open interval $\left({a \,.\,.\, b}\right)$.

Suppose $g$ is a real function that satisfies:


 * $g$ is defined on $\left[{a \,.\,.\, b}\right]$.


 * $g$ is continuous on $\left[{a \,.\,.\, b}\right]$.


 * $g$ equals $f$ on $\left({a \,.\,.\, b}\right)$.

Then $g$ exists if and only if $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $\displaystyle \lim_{x \to b-} f\left({x}\right)$ exist.

Proof
Assume that $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $\displaystyle \lim_{x \to b-} f\left({x}\right)$ exist.

We need to prove that a function $g$ with the properties listed in the theorem exists.

Define $g$ to be equal to $f$ on $\left({a \,.\,.\, b}\right)$.

Define $g(a)$ = $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $g(b)$ = $\displaystyle \lim_{x \to b-} f\left({x}\right)$.

The existence of the limits on the right hand sides of these two equations ensures that $g$ is defined at $a$ and $b$.

Since $f$ is continuous on $\left({a \,.\,.\, b}\right)$ and $g$ equals $f$ there, $g$ too is continuous on $\left({a \,.\,.\, b}\right)$.

It remains to show that $g$ is continuous at $a$ and $b$.

We have per definition $g(a)$ = $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $g(b)$ = $\displaystyle \lim_{x \to b-} f\left({x}\right)$.

Since the limiting process at $a$ requires $x$ to approach $a$ from above, $x$ can be considered as being an element of $\left({a \,.\,.\, b}\right)$.

Since the limiting process at $b$ requires $x$ to approach $b$ from below, $x$ can be considered as being an element of $\left({a \,.\,.\, b}\right)$.

In $\left({a \,.\,.\, b}\right)$, $f$ equals g.

Therefore, the two equations above can be written: $g(a)$ = $\displaystyle \lim_{x \to a+} g\left({x}\right)$ and $g(b)$ = $\displaystyle \lim_{x \to b-} g\left({x}\right)$.

These two equations are exactly the definitions of continuity for $g$ at respectively $a$ and $b$, so $g$ is continuous at $a$ and $b$.

This finishes the first part of the proof.

Assume that $g$ exists.

We need to prove that the limits $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $\displaystyle \lim_{x \to b-} f\left({x}\right)$ exist.

Since $g$ is continuous, $g$ is continuous at the end points of its domain, $a$ and $b$.

g is right-continuous at $a$ and left-continuous at $b$.

This means that $g(a)$ = $\displaystyle \lim_{x \to a+} g\left({x}\right)$ and $g(b)$ = $\displaystyle \lim_{x \to b-} g\left({x}\right)$.

In turn, this means that the expressions $\displaystyle \lim_{x \to a+} g\left({x}\right)$ and $\displaystyle \lim_{x \to b-} g\left({x}\right)$ exist.

Since $g$ = $f$ on $\left({a \,.\,.\, b}\right)$, and $x$ as being part of the two limiting processes in these expressions are confined to $\left({a \,.\,.\, b}\right)$, $g$ in the expressions can be replaced by $f$.

We conclude that $\displaystyle \lim_{x \to a+} f\left({x}\right)$ and $\displaystyle \lim_{x \to b-} f\left({x}\right)$ exist.

This finishes the proof.