I want to prove this statment:
Let $f:[a,b] \to \mathbb{R}$ be a bounded function.
Prove that if $f$ is integrable in $[a,b]$ then $|f|$ is also integrable in $[a,b]$ - HINT: first prove that if $M_f=\sup(f(x):x \in [a,b])$ and $m_f=\inf(f(x):x \in [a,b])$, then $M_{|f|}-m_{|f|} \le M_f-m_f$
Unfortunately I have been trying to prove the hint for over than 3 hours now with no luck.
I tried proving that $M_f-m_f=\sup(|f(x)-f(y)|:x,y \in [a,b])$ but I don't know how...
Any help will be amazing!!
Thanks!
Consider only partitions of the original interval into $n$ equal lengths. Fix $\epsilon \gt 0$ and let $M$ such that the lower and upper sums for $f$ differ by less than $\epsilon$ whenever $n\gt M.$ If zero is not between the lower and upper bounds for $f$ on a subinterval, then the absolute values of these bounds will differ by the same amount. Otherwise, zero can be the lower bound for $|f|$ and the "gap" for $|f|$ will be smaller than (or equal to) that for $f.$ So lower and upper sums for $|f|$ will also differ by less than $\epsilon,$ completing the proof.