If $f(x)I couldn't find anything on the internet to clear this up to me. If $f(x)<g(x)$ on an interval $[a, b]$, does that imply $\int_a^b f(x)\,dx \leq \int_a^b g(x)\,dx$ or strictly $\int_a^b f(x)\,dx < \int_a^b g(x)\,dx$.
I encountered this problem while trying to prove the latter using the Riemann definition of integration,
$$\int_a^b f(x)\,dx = \lim_{n\to\infty} \left(\sum_{i=1}^n f(x_i)\,\Delta x\right)$$
So if $f(x) < g(x)$ for all $x$ in $[a, b]$ and that $x_i \in [a,b]$,
$$f(x_i) < g(x_i)$$
$$f(x_i)\,\Delta x < g(x_i)\,\Delta x$$
$$\sum_{i=1}^n f(x_i)\,\Delta x< \sum_{i=1}^n g(x_i)\,\Delta x$$
This is where my confusion is. I know that if $f(x)<g(x)$ on $[a, \infty]$, then $\lim_{x\to a} f(x) \leq \lim_{x\to a} g(x)$, as in the limits could still be equal. That, I can understand.
By applying $\lim_{x\to\infty}$ to both Riemann sums, this implies that $\int_a^b f(x)\,dx \leq \int_a^b g(x)\,dx$. This seems to suggest that the integrals could be equal. But I can't seem to wrap my head, intuitively, why this is the case. Is there an example of two functions with strict inequalities but equal integrals. Or, if it's the case that the integrals CAN'T equal each other, is there a more clear proof of it? Thanks.
 A: If one function is strictly less than another at every point in a set whose measure is positive, then their integrals over that set are not equal.
Consider the set of points $x$ at which $\dfrac 1 {n+1} < g(x)-f(x) \le \dfrac 1 n$ for $n=1,2,3,\ldots$ and the set of points $x$ at which $g(x)-f(x)>1.$ The union of those sets is the whole domain, so the measure of at least one of them is more than $0.$ And the integral of $g-f$ over that set is more than $1/(n+1)$ times the measure of that subset of the domain, so it's positive.
Using Riemann's approach, this seems more complicated, although it would be easier if one had an assumption of continuity.
A: Let $g(b') > f(b')$.
$$\int_a^b (g(x)-f(x)) \, dx \geq \inf_{x \in A} (g(x)-f(x)) \mu(A).$$ Hence $\int_a^b (g(x)-f(x)) \, dx > 0 $ unless $\inf_{x \in A} (g(x)-f(x)) = 0$ for every measurable set $A$ with non-zero measure. In particular take $A$ to be intervals $[a',b'] \subset [a,b]$ and let $a' \rightarrow b'$ and since $ \lim_{a' \rightarrow b'} \inf_{x \in [a',b']} (g(x)-f(x)) = 0$ implies $g(b')=f(b')$ for continuous functions which is a contradiction.
Hence $\int_a^b (g(x)-f(x)) \, dx>0 $ for continuous functions.
A: Let $\mathscr{P}_n=\{a=x^n_0<x^n_1<\ldots <x^n_k<\ldots<x^n_n\}$ be a sequence of partitions  of interval $[a,b]$ such that $x_{k}^n-x_{k-1}^n=\frac{1}{n}$ for all $k\in\{1,\ldots,n\}$ and all integer $n>1$. We have for all $n$
\begin{align}
\int_a^b g(x) \mathrm{d} x -\int_a^b f(x)\mathrm{d}x
=&\int_a^b g(x)-f(x) \mathrm{d} x
\\
\geq & \sum_{k=1}^{n}\inf_{x\in [x_{k-1}^n,x_{k}^n]}(g(x)-f(x))\cdot \frac{1}{n}
\\
\geq & \sum_{k=1}^{n}\min_{1\leq k\leq n}\left(\inf_{x\in [x_{k-1}^n,x_{k}^n]}(g(x)-f(x))\right)\cdot \frac{1}{n}
\\
=&\min_{1\leq k\leq n}\left(\inf_{x\in [x_{k-1}^n,x_{k}^n]}(g(x)-f(x))\right)\sum_{k=1}^{n} \frac{1}{n}
\\
=&\min_{1\leq k\leq n}\left(\inf_{x\in [x_{k-1}^n,x_{k}^n]}(g(x)-f(x))\right)>0
\\
=&\inf_{x\in [a,b]}(g(x)-f(x))>0
\end{align}
