I am studying analysis by using Elon Lages Lima's book "Curso de Análise (vol. 1)" (the book is written in Portuguese). I want to solve the following problem about upper and lower integrals:
Let $f: [a, b] \rightarrow \mathbb{R}$ be bounded. Prove that $|\overline{\int_{a}^{b}}{f(x)dx}| \leq \overline{\int_{a}^{b}}{|f(x)| dx}$. Give an example showing that a similar inequality does not hold for lower integrals.
I wrote my attempt at this question as an answer, but of course, I am open to suggestions or other answers.
Part 1:
Let $M_i$ and $M'_i$ be, respectively, the supremum of the values of $f$ and $|f|$ in $[t_{i-1}, t_i]$. By definition: $$|\overline{\int_{a}^{b}}{f(x)dx}| = |\text{inf } S(f, P)|, \text{where } S(f, P) = \sum_{1 \leq i \leq n} M_i (t_i - t_{i-1}).$$ Since $-M'_i \leq M_i \leq M'_i$, we get $|S(f, P)| \leq S(|f|, P)$ and hence $|\overline{\int_{a}^{b}}{f(x)dx}| = |\text{inf } S(f, P)| \leq \text{inf } S(|f|, P) = \overline{\int_{a}^{b}}{|f(x)| dx}$.
Part 2:
The corresponding inequality for lower integrals would be $|\underline{\int_{a}^{b}}{f(x)dx}| \leq \underline{\int_{a}^{b}}{|f(x)| dx}$. To see this inequality does not hold, take as counterexample $f:[0, 1] \rightarrow \mathbb{R}$ defined by: $$f(x) = \begin{cases} 0, &\text{if }x \in \mathbb{Q} \\ -1, &\text{otherwise} \end{cases} $$ In this case, $|\underline{\int_{a}^{b}}{f(x)dx}| = 1$ and $\underline{\int_{a}^{b}}{|f(x)| dx} = 0$.