Piecewise Continuous Function with One-Sided Limits is Bounded

Theorem
A piecewise continuous function is bounded.

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

By definition of piecewise continuity, there exists a partition $\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\}$.

For every $i \in \{1, \ldots, n\}$, we define a function $f_i$ with domain $\left[{x_{i−1} \,.\,.\, x_i}\right]$, as follows:


 * $f_i \left({x}\right) := \begin{cases}

\displaystyle \lim_{x \to x_{i−1}^+} f \left({x}\right) & \text{if $x = x_{i-1}$}\\ f \left({x}\right) & \text{if $x \in \left({x_{i-1} \,.\,.\, x_i}\right)$}\\ \displaystyle \lim_{x \to x_i^-} f \left({x}\right) & \text{if $x = x_i$} \end{cases}$

The one-sided limits in this definition exist because $f$ is piecewise continuous.

Since $f$ is continuous on $\left({x_{i−1} \,.\,.\, x_i}\right)$, so is $f_i$, for $f_i = f$ on $\left({x_{i−1} \,.\,.\, x_i}\right)$.

Per definition $f_i$ is right-continuous at $x_{i−1}$ and left-continuous at $x_i$.

Therefore, $f_i$ is continuous throughout its domain $\left[{x_{i−1} \,.\,.\, x_i}\right]$.

By Continuous Function on Compact Space is Bounded and Closed Real Interval is Compact, $f_i$ is bounded.

Since $f_i$ is bounded on $\left[{x_{i−1} \,.\,.\, x_i}\right]$, it is also bounded on $\left({x_{i−1} \,.\,.\, x_i}\right)$ because $\left({x_{i−1} \,.\,.\, x_i}\right)$ constitutes a subset of $\left[{x_{i−1} \,.\,.\, x_i}\right]$.

Now, as $f_i = f$ on $\left({x_{i−1} \,.\,.\, x_i}\right)$, $f$ too is bounded on $\left({x_{i−1} \,.\,.\, x_i}\right)$.

Since $f$ is bounded on the intervals $\left({x_{i−1} \,.\,.\, x_i}\right)$, and the number (n) of these intervals is finite, the set of bounds of $f$ on these intervals is itself bounded.

Therefore, $f$ is bounded on the union of $\left({x_{i−1} \,.\,.\, x_i}\right)$, $i \in \left\{{1, \ldots, n}\right\}$.

The only points left to consider are the points in the set $\left\{{x_0, \ldots, x_n}\right\}$.

Since this set is finite, $\max \left({\left\vert{f \left({x_0}\right)}\right\vert, \ldots, \left\vert{f \left({x_n}\right)}\right\vert}\right)$ is finite and serves as a bound for $f$ on $\left\{{x_0, \ldots, x_n}\right\}$.

The conclusion is that $f$ is bounded on the whole of its domain $\left[{a \,.\,.\, b}\right]$.