Tricky analysis proof involving the sum of integrals The question is as follows: 

Let $P:a=t_{0}<t_{1}<...<t_{m}=b $ be a partition of $[a,b]$, $f_{j}$ be a Riemann integrable function on $[t_{j-1},t_{j}]  \ \forall \ j=1,...,m$, and let $f:[a,b]\rightarrow \mathbb{R}$ be a function with the property 
  $$f\restriction_{(t_{j-1},t_{j})}=f_j\restriction_{(t_{j-1},t_{j})} \ \forall \  j=1,...m.$$
  Prove that 
  $$\int_{a}^{b}f(x) dx=\sum_{j=1}^{m}\int_{t_{j-1}}^{t_{j}}f_{j}(x)dx.$$

I already know that $f$ is Riemann integrable iff $f\restriction_{(t_{j-1},t_{j})}$ is Riemann integrable for each $j=1,...m.$ I have also proved this, so I believe the proof just needs to be shown for the case $m=1.$ 
Does anyone know how to tackle this?   
Thanks in advance! 
 A: This is just a generalization of integrability  of $f$ on $[a,c]$ and $[c,b]$ implies integrability on $[a,b]$ and 
$$\int_a^b f(x) \, dx = \int_a^c f(x) \, dx + \int_c^b f(x) \, dx $$
There exist partitions $P_j$ of $[t_{j-1},t_j]$ such that for $j=1,\ldots,m$, upper and lower Darboux sums satisfy
$$U(P_j,f_j) - L(P_j,f_j) < \frac{\epsilon}{m}$$
With the partition $P = \bigcup_{j=1}^n P_j$ we have
$$U(P,f) - L(P,f) = \sum_{j=1}^n [ U(P_j,f_j) - L(P_j,f_j)] < \epsilon$$
and $f$ is integrable by the Riemann criterion.  
We must also have 
$$L(P,f) \leqslant \int_a^b f(x) \, dx \leqslant U(P,f), \\ L(P,f) = \sum_{j=1}^n L(P_j,f_j) = \sum_{j=1}^n \int_{t_{j-1}}^{t_j} f_j(x) \, dx \leqslant \sum_{j=1}^n U(P_j,f_j) = U(P,f)$$
Thus,
$$-\epsilon < -[U(P,f) - L(P,f)] <  \int_a^b f(x) \, dx - \sum_{j=1}^n \int_{t_{j-1}}^{t_j} f_j(x) \, dx < U(P,f) - L(P,f) < \epsilon,$$
which implies (since $\epsilon$ can be chosen arbitrarily close to $0$)
$$\int_a^b f(x) \, dx = \sum_{j=1}^n \int_{t_{j-1}}^{t_j} f_j(x) \, dx $$
