Tag Archives: area under a curve

Area under a curve

The following code illustrates the concept of integration. The concept is to divide the x-axis in segments of equal width. We then take the value of y of the function on the right side of the segment and draw a rectangle of height y. The sum of the areas of the rectangles is greater than the area under the curve and approaches the area under the curve when the width tends to 0.