Example 7.1.4. Approximating an Area with a Riemann Sum with Excel.
Find the area under the curve \(y=x*(4-x)\) with \(x\) between 0 and 4 with Excel
Solution.
We will approximate the area with 100 rectangles. We set up a worksheet to find the area of the first rectangle.

Following our standard practice, we set up the question and answer in labeled areas at the top of the worksheet. The width of a subinterval is the width of the whole interval divided by the number of subintervals. The column \(x_n\) is for the x value at the right side of the n-th subinterval. We calculate the value of \(x_n\) by taking the starting point, \(x_o\text{,}\) and adding \(n\) times the width of a subinterval. We then evaluate the function at \(x_n\text{,}\) which we label \(f(x_n)\text{.}\) The area of the n-th rectangle is the height, or \(f(x_n)\text{,}\) times the width of the subinterval. The last column is the total area for the first n rectangles. The area for 100 rectangles is our area estimate. Since we don’t want to have to look all over for our answer, we bring the area up to cell D2 with the OFFSET command. The command OFFSET(E6,B3,0) starts in cell E6, goes down B3 (the number of subintervals) rows, and goes over 0 columns. In our case, it finds the value in cell E106 and puts it in cell E6.
To find the area we quick fill our worksheet.

For a more accurate estimate we divide into smaller rectangles.
