Why does this integral and its approximation have the same sign?

41 Views Asked by At

Suppose I have the following setting (the numerical values on the $y$ axis are irrelevant):

enter image description here

where the red plot belongs to a function $g\,$.

The total area, $A$, covered by the histogram is: $$\sum_{i={1}}^{f}g(x_{i})\Delta x_{i}$$

where $\,\Delta x_{i}=x_{i}-x_{i+1}\,$ .

As $i$ goes from $1$ to $f\,$, $\,x$ decreases from $x_{1}$ to $x_{f}\,$.

$A$ , also, approximately equals:

$$\int_{x_{f}}^{x_{1}}g(x)dx$$

That is: $$ \sum_{i={1}}^{f}g(x_{i})\Delta x_{i} \approx \int_{x_{f}}^{x_{1}}g(x)dx$$

Question: Why is it that the sum and the integral are both positive despite the fact that $x$ is decreasing in the summation and increasing in the integration?

P.S. The plot of $g$ should be slightly below the "stairs" made by the histogram.

1

There are 1 best solutions below

3
On BEST ANSWER

It is because you can change the order of the summation, summing from $f$ to $1$, thus obtaining a sum with increasing $x$. A nice demonstration of why people normally index increasing sequences in increasing order.