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) x & \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 the subinterval $\left({x_{i−1} \,.\,.\, x_i}\right)$ 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)$, and this is true for every $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, the numbers $\left\vert{f (x_0)}\right\vert, \ldots, \left\vert{f (x_n)}\right\vert$ have a maximum, and this maximum 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]$.