Integral Inequality Absolute Value: $\left| \int_{a}^{b} f(x) g(x) \ dx \right| \leq \int_{a}^{b} |f(x)|\cdot |g(x)| \ dx$

Suppose we are given the following: $$\left| \int_{a}^{b} f(x) g(x) \ dx \right| \leq \int_{a}^{b} |f(x)|\cdot |g(x)| \ dx$$

How would we prove this? Does this follow from Cauchy Schwarz? Intuitively this is how I see it: In the LHS we could have a negative area that reduces the positive area. In the RHS the area can only increase because we take the absolute values of the functions first.

Solutions Collecting From Web of "Integral Inequality Absolute Value: $\left| \int_{a}^{b} f(x) g(x) \ dx \right| \leq \int_{a}^{b} |f(x)|\cdot |g(x)| \ dx$"

The big idea here is this:

First: it is enough to show that
$$
\left\lvert\int_a^b f(x)\,dx\right\rvert\leq\int_a^b\lvert f(x)\rvert dx,
$$
since you can replace $f(x)$ by $f(x)\cdot g(x)$ to get the desired result.

Now, notice that
$$
-\lvert f(x)\rvert\leq f(x)\leq \lvert f(x)\rvert
$$
for all $x$; hence
$$
-\int_a^b\lvert f(x)\rvert\,dx\leq \int_a^b f(x)\,dx\leq\int_a^b\lvert f(x)\rvert\,dx.
$$
Can you finish it from here?