Calculating the number of subintervals required for the difference between the Upper and Lower Riemann sum to a particular value I'm having trouble with calculating the minimum number of subintervals required for the difference between the upper and lower Riemann sums to be a particular value. 
So say I have the following definite integral: $\int_{1}^{17} \frac{1}{x^3} dx$ and I need to determine the minimum number of (N) equally spaced subintervals needed so the difference between the Upper and Lower Sums estimates it to say less than $\frac{1}{100}$?
So I determined the Upper and Lower Riemann sums to N terms to be:
$L_{n} =\frac{16}{N}  \sum_{i=1}^{N}\frac{1}{(2i+1)^3}$
$U_{n} =\frac{16}{N}  \sum_{i=1}^{N}\frac{1}{(2i-1)^3}$
And the difference between them would be:
$U_{n} - L_{n} = \frac{16}{N} [1-\frac{1}{(2N)^3} - \frac{1}{(2N +1)^3}]$
then: 
$\frac{1}{100} = \frac{16}{N} [1-\frac{1}{(2N)^3} - \frac{1}{(2N +1)^3}]$
So I think you would then solve for N? But I'm a little stuck on how to best approach this, assuming that I got it right so far?
 A: More generally,
suppose
$f(x) > 0$ and
$f'(x) < 0$
(like for
$1/x^3$)
and you want to get
lower and upper estimates for
$\int_a^b f(x) dx$
divided into $n$ intervals.
The points are
$a+hi$ for
$i = 0$ to $n$,
where $h$ is the
width of the interval.
Since we want
$a+hn = b$,
$h = \frac{b-a}{n}
$.
The two sums we are interested in are
$S 
=h\sum_{i=0}^{n-1} f(a+ih)
$
and
$T 
=h\sum_{i=1}^{n} f(a+ih)
$.
$S$ is the sum from 
the points at the
left side of each interval,
and
$T$ is the sum from 
the points at the
right side of each interval,
For the case when
$f'(x) < 0$,
$hf(a+(i-1)h)
> \int_{a+(i-1)h}^{a+ih} f(x) dx
> hf(a+ih)
$,
with the inequalities reversed
if $f'(x) > 0$.
To see this,
note that the integral
is the area under the function,
and this is between
the areas of the rectangles
with base $h$
and hight of the function at the endpoints of the interval.
The total area
from $a$ to $b$
is
$I
=\int_a^b f(x) dx
=\sum_{i=1}^n \int_{a+(i-1)h}^{a+ih} f(x) dx
$.
Using the first inequality,
$I
<\sum_{i=1}^n hf(a+(i-1)h)
=h\sum_{i=1}^n f(a+(i-1)h)
=h\sum_{i=0}^{n-1} f(a+ih)
=S
$.
Using the second inequality,
$I
>\sum_{i=1}^n hf(a+ih)
=h\sum_{i=1}^{n} f(a+ih)
=T
$.
The difference between
these bounds is
$S-T
=h\sum_{i=0}^{n-1} f(a+ih)-h\sum_{i=1}^{n} f(a+ih)
=h(f(a)-f(b))
=\frac{b-a}{n}(f(a)-f(b))
$.
If you want this
to be less that $c$,
then
$\frac{b-a}{n}(f(a)-f(b))
< c
$
or
$n
> \frac{(b-a)(f(a)-f(b))}{c}
$.
If $f'(x) > 0$,
the same argument
with the signs reversed gives
$n
> \frac{(b-a)(f(b)-f(a))}{c}
$.
Therefore,
if $f'(x)$
is of constant sign,
$n
> \frac{(b-a)|f(b)-f(a)|}{c}
$
will work.
If $c = 1/m$
(a usual condition),
then
$n 
> m(b-a)|f(b)-f(a)|
$.
Note that this is a
sufficient value of $n$ -
it will probably not be the
lowest possible.
A simpler estimate,
which is also sufficient,
is
$n 
> m(b-a)|\max(f(b), f(a))|
$.
For your function,
$f(x) = 1/x^3$,
$a=1$, and $b=17$,
this gives
$n
>m(17-1)(1)
=16m
$.
If $m=100$,
$n > 1600$
will do.
A: If you expand, simplify, and clear fractions, you will get
$$8 n^7-12788 n^6-19194 n^5-9599 n^4+1600 n^3+2400 n^2+1200 n+200=0,$$
which is pretty complicated. But a simpler way to approach the problem is to note that as $N$ increases, the second factor approaches $1$ pretty quickly, so that the expression will be less than $\frac{1}{100}$ only when $\frac{16}{N}$ is close to $\frac{1}{100}$. So if you evaluate the RHS for values of $N$ near 1600, you will find the answer.
A: I don't know how you arrived at your $L_N$ and $U_N$.
To $N$ subintervals of equal length ${16\over N}$ correspond the  division points
$$x_k:=1+{16 k\over N}\qquad(0\leq k\leq N)\ .$$
Since the integrand $f(x):= x^{-3}$ is monotonically decreasing one can immediately  say that
$$L_N={16\over N}\sum_{k=1}^N f(x_k),\qquad U_N={16\over N}\sum_{k=0}^{N-1} f(x_k)\ .$$
Due to a lot of cancellation we therefore get
$$U_N-L_N={16\over N}\bigl(f(x_0)-f(x_N)\bigr)={16\over N}\bigl(f(1)-f(17)\bigr)={16\over N}\bigl(1-{1\over4913}\bigr)<{16\over N}\ .$$
When a tolerance $\epsilon>0$, say $\epsilon:=0.01$, is given  then one has $U_N-L_N<\epsilon$, as soon as $$N>{16\over\epsilon}\ ;$$
which amounts to $N>1600$ when, e.g.,  $\epsilon=0.01$.
