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.
Any help will be amazing!!
Thanks!
The triangle inequality gives $$|f(x)|\le|f(x)-f(x')|+|f(x')|$$ with $x,x' \in [a,b]$.
Case 1: $\;f(x) \ge f(x')$
Then $\;|f(x)|\le f(x)-f(x')+|f(x')|\le M_f-f(x')+|f(x')|\;$ for every $x\;\; $ ($x'$ fixed)
So $\;M_{|f|}\le M_f-f(x')+|f(x')|$
and then $\;|f(x')|\ge M_{|f|}-M_f+f(x')\ge M_{|f|}-M_f+m_f\;$ for every $x'$
It follows that $\;m_{|f|}\ge M_{|f|}-M_f+m_f$
Case 2: $\;f(x) < f(x')$
Then $\;|f(x)|\le f(x')-f(x)+|f(x')|\le f(x')-m_f+|f(x')|\;$ for every $x\;\;$ ($x'$ fixed)
So $\;M_{|f|}\le f(x')-m_f+|f(x')|$
and then $\;|f(x')|\ge M_{|f|}-f(x')+m_f\ge M_{|f|}-M_f+m_f\;$ for every $x'$
It follows that $\;m_{|f|}\ge M_{|f|}-M_f+m_f$