Answer

It needs to maintain a running sum. For each integer between 1 and N-1, inclusive, it should add

integrand(a+ih)

to that running sum. Of course, we will first have to initialize the running sum and compute the value of h from a, b, and N.

Return to lesson.



Christopher R. Johnson
Hamlet Project
Department of Computer Science
University of Utah