Riemann-integration problem Here is the exercise

Let $f:[a,b]\rightarrow \mathbb{R}$ be Riemann-integrable. Prove that $f^+$, $f^-$ and $|f|$ are also Riemann-integrable, when
$$f^+=\begin{cases} 
      f(x) & f(x)\geq 0 \\
      0 & otherwise 
   \end{cases}$$
$$f^-=\begin{cases} 
      -f(x) & f(x)\leq 0 \\
      0 & otherwise 
   \end{cases}$$

This problem seems so obvious. Why wouldn't $f^+$ be integrable? Anyway, I need to prove this using this hint:
"$f$ is Riemann-integrable if with every $\epsilon>0$ there exists step functions $h\leq f\leq g $ such that $\int h -\int g <\epsilon$."
I have no idea where to start...

We prove the Riemann integrability of $f^+$. A similar proof can be done for $f^-$.
As $f$ is Riemann-integrable, for all $\epsilon>0$ there exists step functions $h \leq f\leq g $ such that $\int h -\int g <\epsilon$.
Now define $h^+ = \max(h,0)$ and $g^+ = \max(g,0)$. You can verify that:


*

*$h^+, g^+$ are step functions.

*You have $h^+ \le f^+ \le g^+$ for all $x \in [a,b]$.

*And also $g^+ - h^+ \le g-h$ for all $x \in [a,b]$. This implies $0 \le \int (g^+-h^+) \le \int (g-h) \le \epsilon$
And concludes the proof.
