TITLE: If $f$ is a Riemann integrable prove $|f|$ is also Riemann integrable
QUESTION [6 upvotes]: Show that if $f$  is Riemann integrable on $[a,b]$ then $|f|$ is also Riemann integrable on $[a,b]$.

My idea is:
let $f$ be in $[a,b]$ less than $|f|$, since $f$ is integrable then $|f|$ is also integrable on $[a,b]$.

REPLY [2 votes]: More generally, one can prove that if $f: [a,b] \rightarrow [c,d]$ is Darboux integrable and $\varphi: [c,d] \rightarrow \mathbb{R}$ is continuous, then the composite function $\varphi \circ f: [a,b] \rightarrow \mathbb{R}$ is Darboux integrable.  (Then take $\varphi(x) = |x|$ to answer the OP's question.)  A proof appears on page 7 of these notes.  (It comes directly from Russell Gordon's text Real Analysis: A First Course, which was the text for the class from which these notes were made.)  
Comments:
1) Note that I said "Darboux integrable": this is the version of the integral which uses upper and lower sums instead of Riemann sums.  As I say in my notes, it is (so far as I know...) not so easy to adapt this argument to show Riemann integrability. 
2) But perhaps the OP actually means Darboux integrability!  It is common to use the term "Riemann integral" to refer to either the Darboux or the Riemann integral.  This is not a horrible mistake, because there is a theorem that says that these two integrals are equivalent (i.e., a function is Riemann integrable iff it is Darboux integrable, and if so these two integrals have the same value), but I think it is sloppy in a way which can  cause confusion for students.
3) One advantage of this general approach is that it leads to an easy proof that the product of Darboux integrable functions is Darboux integrable.  
4) The result does not work the other way around: if $f$ is Riemann/Darboux integrable and $\varphi$ is continuous, then the composition $f \circ \varphi$ (when defined) need not be Riemann/Darboux integrable.  In my notes I state this but mention that the examples I know are too hard to include.  (And now of course I would have to think about constructing such examples from scratch, because I didn't write them down!)  Does perchance anyone know of a nice, simple example of this?