Department of Mathematics

Math 300: Mathematical Computing

Assignment 7

In this assignment you will write a function called riemannLeftSum that takes four arguments: f, a, b, and n. f will be a function input; a is the left limit of integration; b is the right limit of integration; and n is the number of subintervals for a left Riemann sum approximation to the integral. The function will do two things: it will create a plot as in Figure 1; and it will return the value of the Riemann sum.



Figure 1: The Jinjer function

The bars are made using the fill() function with a 'FaceAlpha' value of 0.5.

The assignment is worth 40 points and is due at 9 AM on Friday, 20 October. The assignment is turned in when the .m file appears as an attachment to a message in the instructors email inbox.
















Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 1996-2020 Kevin Cooper