Suppose f(x)= cos (x). How do you compute the Riemann sum for f(x) on the interval [0, (3pi/2)] obtained by partitioning into 6 equal subintervals and using the right hand end points as sample points?

1 Answer
Jul 15, 2017

# R RS = -1.3408 #

Explanation:

We have:

# f(x) = cosx #

We want to calculate over the interval #[0,(3pi)/2]# with #6# strips; thus:

# Deltax = ((3pi)/2-0)/6 = (3pi)/12 = pi/4#

Note that we have a fixed interval (strictly speaking a Riemann sum can have a varying sized partition width). The values of the function are tabulated as follows;

enter image source here

Right Riemann Sum

enter image source here

# R RS = sum_(r=1)^6 f(x_i) \ Deltax_i #
# " " = 0.7854 * (0.7071 - 0 - 0.7071 - 1 - 0.7071 - 0) #
# " " = 0.7854 * (-1.7071) #
# " " = -1.3408 #

Actual Value

For comparison of accuracy:

# Area = int_0^((3pi)/2) \ cosx \ dx #
# " " = [sinx]_0^((3pi)/2) #
# " " = sin((3pi)/2)-sin(0) #
# " " = -1-0 #
# " " = -1 #