Skip to main content
Mathematics LibreTexts

7.1: Approximating Definite Integrals as Sums

  • Page ID
    83952
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    The standard approach to accumulation is to reduce the problem to an area problem. If we let f(t) be a velocity function, then the area under the y=f(t) curve between a starting value of t=a and a stopping value of t=b is the distance traveled in that time period. In the easiest case, the velocity is constant and we use the simple formula

    \[ distance = velocity * time \nonumber \]

    Example 7.1.1: Distance with Constant Speed.

    Find the distance traveled if I go 60 mph from 12:30 until 3:00.

    Solution

    This problem is easy to do without any calculus. If we graph the velocity function

    clipboard_ef8400ed0ff057279ae8b40658a1e97e3.png

    we find the area of the rectangle by taking base times height and noting \(60*(3-0.5)=150\text{.}\) Note that we do the same computation if I ask how much I earn over a period of 2.5 years if I make $60K a year, or how much oil is produced in 2 and a half hours form an oil well that produces 60 barrels of oil an hour.

    In a similar manner, if the function I am accumulating is linear, I can find area by using the area formula of a triangle, one half base time height.

    Example 7.1.2: Approximating Area under a Quadratic Functions.

    The question becomes more difficult when I want to find the area under a curve that is not linear. Suppose for example that we want to find the area under the curve

    \[ y = x * (4-x) \nonumber \]

    between x=0 and x=4.

    Solution

    clipboard_ee3a533c53ab2b7dc3901759e5f663ecb.png

    We no longer have a nice formula from geometry for the area. Thus we start making approximations. The easiest approximation is to note that the area has to be less than the area of the 4 by 4 rectangle we can draw around the region.

    clipboard_e30dffbb6b3117c0205767c7f97545adf.png

    We can improve our estimate by dividing the interval [0, 4] into 4 equal subintervals and then taking the combined area of the 4 rectangles we need to contain the region. This reduces our upper estimate from 16 to 14.

    clipboard_e7c0218e610105fe845dc161cd1276285.png

    Similarly we could get a better estimate by looking at 8 subintervals and seeing that the area under the parabola is no more than 12.5

    clipboard_eb859d497bf92bb58ae6027353e63e7e0.png

    If we continue the process with 100 subintervals, our estimate is down to 10.83. From the picture, it looks like a fairly good estimate.

    clipboard_ee0feb074bdb1b3fefd967446f465fda3.png

    We can change the number of subdivisions with the interactive below.

    clipboard_e63c143f560c7e6760710da75f57c6623.png

    Figure \(7.1.3.\) GeoGebra: Upper sum approximation

    While this process would be very long and tedious by hand, the process of finding the area of each of 100 rectangles and adding the areas is rather easy in Excel. Before going to Excel, we want to make a small adjustment in our method. The method we used always gives an overestimate. It also requires that we know where the function reaches a maximum on each subinterval. It will be easier if we estimate area by always taking the height of the rectangle at the right end of the subinterval. With 4 subintervals this gives an estimate of 10 for our area.

    clipboard_e6631d17add612ac30426a3973403144d.png

    When we increase the number of subintervals to 100, we once again get a fairly good estimate of the area. From the picture, it is hard to see difference between the area defined by the curve and the area defined by the rectangles.

    clipboard_e7eb7a40fb840f335b885805efa022b81.png
    Example 7.1.4:

    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.

    clipboard_ea97fde5111ef5898208966a6ea7675d0.png

    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. The value of \(x_n\) is the starting point plus n times the width of a subinterval. We then evaluate the function at \(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.

    To find the area we quick fill our worksheet.

    clipboard_e48f60bd0afe42dce211f22cc6409d61c.png

    For a more accurate estimate we divide into smaller rectangles.

    clipboard_e36529e9da2ec3950601c60e50c8f7c74.png

    While 100 subintervals will be close enough for most of the problems we are interested is, the "area", or definite integral will be defined as the limit of this sum as the number of subintervals goes to infinity. Thus

    \[ \int_a^bf(x) dx=\lim_{n\to \infty} \sum_{i=1}^nf (x_i)\Delta x \nonumber \]

    with \(\Delta x=\frac{b-a}{n}\) and \(x_i=a+i*\Delta x\text{.}\)

    The sums of the form, \(\sum_{i=1}^n f(x_i)\Delta x\) with \(\Delta x=\frac{b-a}{n}\) and \(x_i=a+i*\Delta x\text{,}\) are called Riemann sums. The limit, written \(\int_a^bf(x) dx\text{,}\) is called a definite integral.

    As a memory aid, it is worth noting that the symbol used for the sum is an upper case sigma, or S for sum in the Greek alphabet. When we take the limit we use an integral sign, which is a stylized S in the Latin alphabet.

    It is worth noting that in this definition we are finding “signed area under a curve.” If the function \(f(x)\) is negative over the interval, the integral will also be negative, in the same we would have a negative change in our bank statement if we were steadily removing money. Similarly we can get a negative integral when the ends of the interval are reversed. If I am steadily adding money to an account, the net change is negative if I measure from 5 years in the future back to today.

    We should note that, for functions nice enough to be considered in this class, we get to the same limit by using rectangles with the function evaluated on the right side of the rectangle or the left side of the rectangle, or any point in the rectangle we choose. Choosing the right hand side for evaluation makes our formulas a little simpler.

    Example 7.1.5: Present Value of a Revenue Stream.

    The estimated current value of the revenue stream, in billions of dollars, of a company being bought out is \(f(x)=\exp(-0.06*x)*0.235\text{.}\) The present value of that revenue stream is the area of the region under the curve \(y=f(x)\) from \(x=0\) to \(x=15\text{.}\) Use 500 intervals to estimate the present value.

    Solution

    Although the data in the question for this example is quite different from the previous example, the setup for the worksheet to evaluate the Riemann sum is the same.

    clipboard_e69aab58f23683634e5644e947c881a1f.png

    With 500 intervals we estimate the present value of the revenue stream to be worth $2.3222 Billion. If we had only used 100 intervals, the estimate would have been for $2.318 Billion, while 1000 intervals gives an estimate of $2.3232 Billion.

    Exercises: Approximating Definite Integrals as Sums Problems

    Exercise 1:

    Let \(f(x) = 4 x + 5\text{.}\) Estimate the area under \(f(x)\) on the interval \(0 \le x \lt 7\) using 100 rectangles and a right hand rule.

    Answer

    The Excel commands are:

    clipboard_e207adfbe5ec595c9f9e8ae2e3b58dc64.png

    The answer is given as follows. Note that in this screen grab the center part of the sidebyside was hidden so that the image is a reasonable size

    The area is approximately 133.98

    clipboard_e69aef8ca4312d6104695bcd7512d018c.png

    This page titled 7.1: Approximating Definite Integrals as Sums is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.