The diagram below illustrates how we can approximate the area under the curve y=ln(x).
By dividing the curve up into segments we can have created a set of trapezia.
The area of each trapezium is the average of the heights of its two parallel sides multiplied by its width:
area=2y(x1)+y(x2)⋅Δx
The total area under the curve is going to be the sum of the areas of these trapezia:
area=2y(1)+y(2)⋅Δx+2y(2)+y(3)⋅Δx+2y(3)+y(4)⋅Δx+2y(4)+y(5)⋅Δx
We can factor out 2Δx to get:
area=2Δx(y(1)+y(2)+y(2)+y(3)+y(3)+y(4)+y(4)+y(5))=2Δx(y(1)+2y(2)+2y(3)+2(y(4)+y(5)))
To generalise, we always have 2 of each of the middle terms and 1 of the inner and outer terms.
We could now evaluate this to get our approximation of the area under the curve between x=1 and x=5.