In an attempt to prove something about uniform convergence, I need to understand how
$$(1) \hspace{0.5cm} \Big| \int_a^bf(x)-g(x) \,dx \Big| \leq \int_a^b |f(x)-g(x)| \, dx$$
I know it has something to do with the fact that
$$(2) \hspace{0.5cm} -|f(x)-g(x)| \leq f(x)-g(x) \leq |f(x) - g(x)|$$
Another user who posted Integral Inequality Absolute Value: $\left| \int_{a}^{b} f(x) g(x) \ dx \right| \leq \int_{a}^{b} |f(x)|\cdot |g(x)| \ dx$ had a similar question, but theirs dealt with the product. I have already read their post and cannot understand how to carry it over to the difference of two functions.
If we look at the left hand side of my $(1)$, I understand it like this: on the LHS, a potentially negative area becomes positive. On the RHS, a potentially "negative" function (speaking loosely) becomes positive and then the area is taken. Aren't these the same? If not, what's a counterexample? Or a quick small proof.
P.S. I have also read Integral absolute value proof, so you know in advance. But the proof given there doesn't provide an adequate explanation
I think I figured it out
Attempt
$$-|f(x)| \leq f(x) \leq |f(x)|$$
$$-\int_a^b |f(x)| \leq \int_a^b f(x) \leq \int_a^b |f(x)|$$
$$\int_a^b f(x) \leq \int_a^b |f(x)|$$
$$\Big| \int_a^b f(x) \Big| \leq \Big| \int_a^b |f(x)|\Big|$$
But since $|f(x)|$ is already a "positive function" and its area is therefore nonnegative, further instances of taking the absolute value are redundant and thus we can take them away, yielding:
$$\Big| \int_a^b f(x) \Big| \leq \int_a^b |f(x)|$$