Definite integral

This simulation demonstrates definite integration of the sine function by the simple algorithm of summing approximative rectangles. The red curve shows the sine function itself.

The definite integral is to be calculated between initial point x1 (blue) an end point x2 (magenta). A first slider defines x1 ; x2 can be drawn with the mouse.

The red curve is the analytic antiderivative for an initial value x1: y = cos(x) - cos (x1).

A second slider n defines the number n-1 of subinterval into which x2 - x1 is divided for the approximation. In each subinterval the approximative amplitude is assumed to be equal to its initial value. The sum of the area of all rectangles is shown by a green point at x2 .

Reset defines 1 < x < 4 and n-1 = 9.