Geometric argument for integral test. Confused about integral endpoints. I am reading this in my text:



What's confusing to me is that the the blue rectangles are being drawn to be both greater and less than the actual curve. Isn't that a contradiction? How can both convergence and divergence be shown then? How can the areas of the rectangles can be both greater and less than the curve... 
It looks like we're using Riehman sum techniques to prove the integral test but I don't really buy it. Sure if the actual integral converges, then I can see how the sequence IF actually less than the integral would converge too... but the sequence is drawn also to be bigger than the integral too.
 A: The first argument shows that the given series overestimates the area under $y=\frac{1}{\sqrt{x}}$ for $1\leq x \leq \infty$. The exact area is given by the integral, which diverges. So, there is infinite area under the curve and since the series overestimates that area it must be infinite (i.e., diverge) as well.
The second argument is essentially the same but with a convergent integral (i.e., finite area under the curve) and a series underestimating the area.
A: The basic idea is that,
if $f(x)$ is decreasing,
$f(n)
\gt \int_n^{n+1} f(x) dx
\gt f(n+1)
$
and,
if $f(x)$ is increasing,
$f(n)
\lt \int_n^{n+1} f(x) dx
\lt f(n+1)
$.
By summing these,
we can get upper and lower bounds
for 
$\sum_{k=1}^n f(k)$
in terms of
$\int_1^n f(x) dx$.
Sometimes the sum is
$\sum_{k=1}^{n-1} f(k)$
and sometimes the integral is
$\int_1^{n+1} f(x) dx$.
In the diagram,
the rectangles that are
above the curve
give an upper bound 
for the integral,
so the integral
(which is usually easier
to get)
gives a lower bound
for the sum.
The reverse holds
for the rectangles
below the curve.
