Let we have a function, f(x), and want to approximate its integral from x = a til x = b.
Divide the interval [a,b] into n equal (not necessary equal) parts.
Let one of the part, i, is from x(i) til x(i+1).
Let us draw a tangent to the curve in this part, i, by the command:
we may find the area under this tangent and in this interval through the command:
Thus in ths limit:
the original area is equal to the sum of these areas.