Let $f:[a,b]\to \mathbb R $ be an integrable function. Define $$f_+(x)=\begin{cases}f(x)&\text{if } f(x)\geq0,\\0&\text{if }f(x)<0, \end{cases} \text{ and } f_-(x)=\begin{cases}0 & \text{if }f(x)\geq0,\\-f(x) &\text{if }f(x)<0. \end{cases}$$ Prove that $f_+,f_-:[a,b]\to\mathbb{R}$ are integrable and $$\int_a^bf(x)dx=\int_a^bf_+(x)dx -\int_a^bf_-(x)dx.$$
I see that $f(x)=f_+(x)-f_-(x)$, so the last part seems fairly obvious. I'm not how to show the functions are integrable, though. I feel like I must be missing something obvious, but their upper and lower sums don't seem to relate nicely to $f(x)$.