## Examples 7.1.4:

Suppose

The right and left Riemann sums are illustrated in the Java applet
below. To verify the result of that applet, let's perform the
computation manually as well.
*f(x) = x*on^{2}*[0, 2]*. Find- the fifth Riemann sum for an equally spaced partition, taking always the left endpoint of each subinterval
- the fifth Riemann sum for an equally spaced partition, taking always the right endpoint of each subinterval
- the
*n*-th Riemann sum for an equally spaced partition, taking always the right endpoint of each subinterval.

The interval is *[0, 2]*, and we want to find the fifth
Riemann sum. Therefore the partition we need is:

with a norm ofx_{0}= 0, x_{1}= 2/5 = 0.4, x_{2}= 4/5 = 0.8,

x_{3}= 6/5 = 1.2, x_{4}= 8/5 = 1.6, x_{5}= 10/5 = 2

*| P | = 0.4*. Taking the right points of each of the resulting intervals we can compute the right Riemann sum as:

The left Riemann sum, correspondingly, computes to:f(0.4)×0.4 + f(0.8)×0.4 + f(1.2)×0.4 + f(1.6)×0.4 + f(2)×0.4 =

= 0.4×(f(0.4) + f(0.8) + f(1.2) + f(1.6) + f(2)) =

= 0.4×(0.4^{2}+ 0.8^{2}+ 1.2^{2}+ 1.6^{2}+ 2^{2}) =

= 0.4×(0.16 + 0.64 + 1.44 + 2.56 + 4) =

= 0.4×8.8 = 3.52

For the last part we can not use our Java applet since we do not have a numerical value forf(0.0)×0.4 + f(0.4)×0.4 + f(0.8)×0.4 + f(1.2)×0.4 + f(1.8)×0.4 =

= 0.4×(f(0.0) + f(0.4) + f(0.8) + f(1.2) + f(1.6)) =

= 0.4×(0^{2}+ 0.4^{2}+ 0.8^{2}+ 1.2^{2}+ 1.6^{2}) =

= 0.4×(0 + 0.16 + 0.64 + 1.44 + 2.56) =

= 0.4×4.8 = 1.92

*n*. But we can manually compute the answer as follows: subdividing

*[0, 2]*into

*n*equal subintervals gives the partition:

Taking the right endpoint of all resulting subintervals and substituting them into the Riemann sum formula gives:x, where_{j}= j×2/nj=0, 1, ... n

which works out toR(f, P) = f(2/n) × 2/n + f(4/n) × 2/n + ... + f( (n-1) 2/n ) + f(n 2/n)

We can factor outR(f, P) = 2/n × ( (1 × 2/n)^{2}+ (2 × 2/n)^{2}+ ... + ( (n-1) × 2/n )^{2}+ (n × 2/n)^{2})

*4/n*to get:

^{2}In the chapter on induction we have shown that the sum of the firstR(f, P) = 8/n^{3}× (1^{2}+ 2^{2}+ ... + (n-1)^{2}+ n^{2})

*n*square numbers equals so that we now have:

We can substituteR(f, P) = 8/n^{3}× = 4/3 × (n+1) × (2n+1) / n^{2}

*n = 5*to verify our formula:

just as computed above.R(f, P_{n=5 }) = 4/3 ×6 ×11 / 25 = 88/25 = 3.52