Prove if $f:[a,b] \rightarrow \mathbb{R}$ is integrable, then so is $|f|$ and $\left|\int_{a}^{b}f(x)dx\right| \leq \int_{a}^{b}|f(x)|dx$
Prove that if $f:[a,b] \rightarrow \mathbb{R}$ is integrable, then so is $|f|$ and $\left|\int_{a}^{b}f(x)dx\right| \leq \int_{a}^{b}|f(x)|dx$
I already proved that |f| is integrable, but how do I show that $|\int_{a}^{b}f(x)dx| \leq \int_{a}^{b}|f(x)|dx$ ?
Hint: Notice that $$-|f(x)| \leq f(x) \leq |f(x)|$$
for all $x \in [ a,b]$. and $$-\int_a^b|f(x)| dx \leq \int_a^bf(x)dx \leq \int_a^b|f(x)|dx$$