I know that there exists a theorem telling us that if a real valued function $f$ defined over an interval $(a,b)$ is Riemann integrable, then |$f$| is too (moreover I believe the converse to be false). I’ve tried to look at the proofs, but they seem a bit beyond my ability at the moment. My first thought was to suppose there existed a Riemann integrable function, let us say $g$, such that |$g$| was not Riemann integrable, and show that this leads to some sort of contradiction.

I thought about this for a while and have not been able to think of such a function/proof. Would anybody know of such an example?