Prove piecewise monotone function is Riemann integrable I want to show the following proposition

Let $[a,b]$ be a compact interval and $f: [a,b] \to \mathbb R$ be a bounded, piecewise monotone function. Then $f$ is Riemann integrable.

Our definition of piecewise monotonicity is

Let $[a,b]$ be a compact interval and $f: [a,b] \to \mathbb R$ a function. $f$ is piecewise monotone iff there exists a partition $\xi = \{a=x_0 \lt \ldots \lt x_n = b\}$ of $[a,b]$, such that $f_k := f|_{(x_{k-1},x_k)}$ is monotone for all $k \in \{1,\ldots,n\}$.

I am allowed to use the fact that a monotone function on a compact interval is Riemann integrable, as well as the additivity property, and, that changing one point of a Riemann integrable function doesn't change it's integrability.
My attempt:
Since $f_k$ is monotone, it's Riemann integrable. We use the additivity of the Riemann integral to combine $f_1$ and $f_{2}$, then we can combine those with $f_3$ and so on. Therefore
$$f(x) = \begin{cases} f_1(x) & \text{if } x \in [x_0,x_1) \\ f_2(x) & \text{if } x \in [x_1,x_2) \\ \ldots \\ f_n(x) & \text{if } x \in [x_{n-1},x_n] \end{cases}$$
is Riemann integrable.

I don't feel comfortable with this argument, it seems too simple. And also I think the additivity property requires that the edges of the adjacent intervals match up (i.e. $f_k(x_k) = f_{k+1}(x_k)$) which might not necessarily be true. Can somebody help me out?
 A: There is nothing wrong with your argument. It is simple because this is a simple problem. 
Integration does not depend on the value of the function at isolated points, so you can define $f_k$ however you please at the partition points and still have that $f_k$ is integrable on $[x_{k-1},x_k]$ even though monotonicity fails at the endpoints.
A: Just extend the definition of $f_k$ at end points of the subinterval $[x_{k-1},x_{k}]$ so that $f_k$ is monotone on the compact subinterval $[x_{k-1},x_{k}]$. Then $f_k$ is integrable on this subinterval. And since $f$ differs from $f_{k} $ possibly at the end points of this subinterval, it follows that $f$ is also integrable on this subinterval. By additivity it is integrable on whole of $[a, b] $. 
A: You can also use that a monotone function is continuous a.e. 
Continuity of Monotone Functions
and since a continuous function is bounded on any compact interval $[x_{k-1}, x_k]$ by the Extreme Value Theorem, it is also Riemann integerable there. Just apply this to every sub-interval in the partition. 
