When is $\int_a^b f(x)g(x)dx \leq \int_a^b f(x)dx$? Suppose that $$g(x)\leq1,\forall x\in[a,b]$$
then is it always true that $\int_a^b f(x)g(x)dx \leq \int_a^b f(x)dx$ for any $f$ and $g$?
In general, if $$g(x)\leq h(x),\forall x\in[a,b]$$
then is it always true that $\int_a^b f(x)g(x)dx \leq \int_a^b h(x)f(x)dx$ for any $f,g$ and $h$?
 A: Another answer points out some exceptions to your hypothesis. However, it is true for nonnegative functions. The key property of the integral at play here is called monotonicity, which means that if $f_1(x) \leq f_2(x)$ for all $x \in [a, b]$, then
$$ \int_a^b f_1(x) \text{ d}x \leq \int_a^b f_2(x) \text{ d}x.$$
In this case, we have $f(x)g(x)$ and $f(x)h(x)$ in the roles of $f_1(x)$ and $f_2(x)$, respectively. But you need the nonnegativity assumption to ensure that they satisfy the inequality you want!
The proof of monotonicity of the integral is fairly simple: show that the Riemann sums which approximate the integral are monotone, then invoke the Order Limit Theorem.
A: Not necessarily (suppose $a<b$). For example take $f = -1$ on $[a,b]$ and $g=0$ on $[a,b]$. Then
$
\int_{a}^{b} f(x)g(x) = 0
$
But $\int_{a}^{b} f(x) = -(b-a) < 0$.
You need more restrictions on $f$, por example if you restrict $f$ to be non neggative then the result is true, and it follows from the inequality $f(x)g(x) \leq f(x)$ .
