Why are picewise continuous functions on $[a,b]$ bounded? Consider a picewise continuous function $f:[a,b] \to \mathbb{R}$, i.e there are $a=t_0<\dots <t_n=b$ such that $f$ is continuous on each open interval $(t_i,t_{i+1})$ and the limits $\lim\limits_{x \uparrow t_i}f(x)$ and  $\lim\limits_{x \downarrow t_i}f(x)$ exists for all $i=1,\dots,n$.
Why does there exist a constant $M>0$ such that $|f(x)| \leq M$ for all $x \in [a,b]$?
 A: The extreme value theorem tells us that if $f$ is continuous on a closed and bounded interval, then it is bounded (and that it achieves these bounds as well).  

Let us see how we can apply that your case. Let $i \in \{0, \ldots, n-1\}$ and consider the function $g_i$ defined on $[t_{i}, t_{i+1}]$ as follows:
$$g_i(t) := \begin{cases}f(t) & t \in (t_i, t_{i+1})\\\displaystyle\lim_{x\to t_i^+}f(x) & t = t_i\\\displaystyle\lim_{x\to t_{i+1}^-}f(x) & t = t_{i+1}\\\end{cases}$$
It is an easy check that $g_i$ is continuous on $[t_i, t_{i+1}]$. Thus, there exists $M_i$ such that $|g_i(x)| \le M_i$ for all $x \in [t_i, t_{i+1}]$.
In turn, this gives us that $|f(x)| \le M_i$ for all $x \in (t_i, t_{i+1})$. 

Now, to conclude, we simply choose
$$M = \max\{M_0, \ldots, M_{n-1}, |f(t_0)|, \ldots, |f(t_n)|\}.$$
It is easy to see that
$$|f(x)| \le M \qquad \forall \; x \in [a, b].$$
A: On each interval $(t_j,t_{j+1})$, $f$ is bounded because it is continuous and has limits on the edges. Say $|f(x)| \leqslant M_j$ on this interval. As $f$ is well defined, it has a value at each point, so it has too at each $t_j$. Thus, if $M = \max \left\{M_0,M_1,\ldots,M_{n-1}, |f(t_0)|,|f(t_1)|,\ldots,|f(t_n)| \right\}$, then for all $x$, you have $|f(x)| \leqslant M$.
A: From the fact that the limites $\lim_{x\to t_i^+} f(x)$ and $\lim_{x\to t_i^-}$ exist, it follows that for all $i$ $f$ is bounded on $[t_i-\varepsilon,t_i+\varepsilon]$ for $\epsilon>0$ sufficiently small. Also $f$ is bounded on each closed interval $[t_i+\varepsilon/2,t_{i+1}-\varepsilon/2]$ by continuity. So $[a,b]$ is the union of finitely many intervals on which $f$ is bounded, so $f$ is bounded on the whole $[a,b]$.
A: Of course, the boundedness theorem implies that $|f(x)|\leq M$, i.e., $f(x)$ is bounded, for all $x\in[a,b]$ if the function would have been continuous on the closed intervals $[t_i,t_{i+1}]$. You can receive great insight from the proof to the same. 
In this case, instead of looking at the entirety of $[a,b]$ at once, let us look at an arbitrary open interval $(t_i, t_{i+1})$. If I was simply to explain it, essentially what is happening here is that the existence of each of the limits $\lim_{x\to t_i^+}$ and $\lim_{x\to t_{i+1}^-}$ implies that they are finite. Moreover, because the function is continuous over the interval and these two limits are finite, the function is necessarily bounded in each of these intervals. If it was otherwise, there would be a discontinuity within such an interval because the value of the function at some point within the interval would approach infinity, in contradiction to the given conditions. Thus, $|f(x)|\leq M_i,\ \forall x\in[t_i,t_{i+1}]$. For all such intervals, we will get such values $M_i$. The required value of $M$ is the maximum of all such values.
