[Math] Calculating the number of subintervals required for the difference between the Upper and Lower Riemann sum to a particular value

calculus

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?

Best Answer

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.