How do I estimate the area under the graph of f(x) = #3 cos(x)# from #x=0# to #x=pi/2# using left and right endpoint methods?
2 Answers
You'll need a value for
For your question
Find
Find all endpoints: start at
Each rectangle has ares base times height, which will be
To use left endpoints , delete the last endpoint, above, because it is not a left endpoint
Rectangle 1 has area
Rectangle 2 has area
Rectangle 3 has area
Rectangle 4 has area
And so on up to
Rectangle n has area
Do the arithmetic and add the areas.
For right endpoints delete the case
You can divide the range
Even for only a few rectangular strips the calculations can become tedious and I would recommend using a computer in some way.
Here is a display from an Excel spreadsheet with 4 rectangular strips:
Notice with this few rectangles the difference between minimum and maximum values is probably unacceptable.
If you can program in some simple language, it is fairly easy to write code that will repeatedly divide the rectangular strips into finer widths until the minimum and maximum areas are very close together.
For example, with a maximum allowable difference set at 0.0001, a small Basic program gave the result:
Integral value of 3 Cos(x) for x from 0 to pi/2 falls between 2.99996405 and 3.00003595