Skip to main content
Mathematics LibreTexts

5.2: The Definite Integral

  • Page ID
    139454
  • \( \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}}} \)

    Recall from the last section that the integral sign in the indefinite integral

    \[\int\,f(x)~\dx \nonumber \]

    represents a summation of the infinitesimals \(f(x)\,\dx = d\!F\) for an antiderivative \(F(x)\) of \(f(x)\). Why is the term “indefinite” used? Because the summation is indefinite: the \(x\) in \(f(x)\;\dx\) is defined generically, meaning “\(x\) in general,” that is, not for \(x\) in a specific range of values. The same summation over a specific, definite range of values of \(x\), say, over an interval \(\ival{a}{b}\), is a different type of integral:

    An indefinite integral yields a generic function, whereas a definite integral yields either a number or a specific function. There are many ways to calculate the specific summation in a definite integral, one of which is motivated by a geometric interpretation of the infinitesimal \(f(x)\;\dx\) as the area of a rectangle, as in Figure [fig:defint] below:

    The shaded rectangle in the above picture has height \(f(x)\) and width \(\dx\), and so its area is \(f(x)\;\dx\). In fact, it appears that that area is just a little bit smaller than the area under the curve \(y=f(x)\) and above the \(x\)-axis between \(x\) and \(x+\dx\); there is a small gap between the curve and the top of the rectangle, accounting for the difference in the area. However, the area of that gap turns out to be zero, as shown below:

    By the Microstraightness Property, the curve \(y=f(x)\) shown in Figure [fig:defint] is a straight line over the infinitesimal interval \(\ival{x}{x+\dx}\), as shown in Figure [fig:defintinf].1 Thus, the part of the area between the curve and the \(x\)-axis over the interval \(\ival{x}{x+\dx}\) consists of two parts: the area \(f(x)\,\dx\) of the shaded rectangle and the area of the right triangle \(\triangle ABC\), both of which are shown in Figure [fig:defintinf]. However, the area of \(\triangle ABC\) is zero:

    \[\text{Area of }\triangle ABC ~=~ \frac{1}{2}\text{(base)}\times\text{(height)} ~=~ \frac{1}{2}(\dx)(\df) ~=~ \frac{1}{2}(\dx)(f'(x)\,\dx) ~=~ \frac{1}{2}f'(x)(\dx)^2 ~=~ 0 \nonumber \]

    The function \(f\) shown in Figure [fig:defintinf] is increasing at \(x\), but a similar argument could be made if \(f\) were decreasing at \(x\). Hence, the area between the curve \(y=f(x)\) and the \(x\)-axis comes solely from the rectangles with area \(f(x)\,\dx\), as \(x\) varies from \(a\) to \(b\). The sum of all those rectangular areas, though, equals the definite integral of \(f(x)\) over \(\ival{a}{b}\). The definite integral can thus be interpreted as an area:

    In Figure [fig:defintarea] the area under the curve \(y=f(x)\) between \(x=a\) and \(x=b\) is the area \(A\) of the shaded region \(R\), namely \(A = \int_a^bf(x)\,\dx\). To calculate that area for a specific function, rectangles can again be used, but this time with widths that are small positive numbers instead of infinitesimals. The procedure is as follows:

    1. Create a partition \(P = \lbrace x_0 < x_1 < \cdots < x_{n-1} < x_n \rbrace\) of the interval \(\ival{a}{b}\) into \(n \ge 1\) subintervals \(\ival{x_0}{x_1}\), \(\ival{x_1}{x_2}\), \(\ldots\), \(\ival{x_{n-1}}{x_n}\), with \(x_0 = a\) and \(x_n = b\).
    2. In each subinterval \(\ival{x_{i-1}}{x_i}\) of \(P\) pick a number \(x_i^*\), so that \(x_{i-1} \le x_i^* \le x_i\) for \(i=1\) to \(n\).
    3. For \(i=1\) to \(n\), form a rectangle whose base is the subinterval \(\ival{x_{i-1}}{x_i}\) of length \(\Delta x_i = x_i - x_{i-1} > 0\) and whose height is \(f(x_i^*)\).
    4. Take the sum \(f(x_1^*) \Delta x_1 + f(x_2^*) \Delta x_2 + \cdots + f(x_n^*) \Delta x_n\) of the areas of these rectangles, called a Riemann sum.
    5. Take the limit of the Riemann sums as \(n \to \infty\), so that the subinterval lengths approach 0. If the limit exists then that limit is the area \(A\) of the region \(R\):

      \[\label{eqn:riemannsum} \text{Area } A ~=~ \int_a^b\,f(x)~\dx ~=~ \lim_{n \to \infty}~\sum_{i=1}^{n} f(x_i^*)\,\Delta x_i \]

    The limit in Formula ([eqn:riemannsum]) should be taken over all partitions whose norm—the length of the largest subinterval—approaches 0. In practice, however, the partitions are usually chosen so that the subintervals are of equal length, and then simply make those equal lengths smaller and smaller by dividing the interval \(\ival{a}{b}\) into more and more such subintervals. Note that the points \(x_i^*\) in each subinterval can be anywhere in the subinterval—often the midpoint of the subinterval is chosen, but the left and right endpoints are also typical choices.

    In the above procedure the gaps between the rectangles and the curve will have areas approaching 0 as the number \(n\) of subintervals grows and the subinterval lengths approach 0. This is true if the function \(f\) is differentiable, and in fact even if \(f\) is merely continuous.2 Thus, the area under the curve can be defined by the above procedure.

    To calculate the area under a curve in this manner, the reader should have some familiarity with the summation notation in Formula ([eqn:riemannsum]).

    The following rules for this “Sigma notation” are intuitively obvious:

    The following summation formulas can be helpful when calculating Riemann sums:

    Formula (1) is obvious: add the number \(1\) a total of \(n\) times and the sum is \(n\).
    Formula (2) can be proved by induction:

    1. Show that \(\displaystyle\sum_{k=1}^{n} k ~=~ \dfrac{n\,(n + 1)}{2}\) for \(n=1\):

      \[\sum_{k=1}^{1} k ~=~ 1 ~=~ \frac{1\,(1 + 1)}{2} \quad\checkmark \nonumber \]

    2. Assume that \(\displaystyle\sum_{k=1}^{n} k ~=~ \dfrac{n\,(n + 1)}{2}\) for some integer \(n \ge 1\). Show that the formula holds for \(n\) replaced by \(n+1\), that is:

      \[\sum_{k=1}^{n+1} k ~=~ \frac{(n + 1)\,((n + 1) + 1)}{2} ~=~ \frac{(n + 1)\,(n + 2)}{2} \nonumber \]

      To show this, note that

      \[\begin{aligned} \sum_{k=1}^{n+1} k ~&=~ 1 ~+~ 2 ~+~ \cdots ~+~ n ~+~ (n+1) ~=~ \sum_{k=1}^{n} k ~+~ (n+1)\

      \[6pt] &=~ \frac{n\,(n + 1)}{2} ~+~ (n+1) ~=~ \frac{n\,(n + 1) ~+~ 2(n+1)}{2} ~=~ \frac{(n + 1)\,(n + 2)}{2} \quad\checkmark\end{aligned} \nonumber \]

    3. By induction, this proves the formula for all integers \(n \ge 1\).

    Formulas (3)-(5) can be proved similarly by induction (see the exercises). The example below shows how Formulas (2) and (3) are used in finding the limit of a Riemann sum.

    Example \(\PageIndex{1}\): riemann1

    Use Riemann sums to calculate \(\displaystyle\int_1^2 x^2~\dx\).

    Solution

    The definite integral is the area under the curve \(y=f(x)=x^2\) between \(x=1\) and \(x=2\), as shown in Figure [fig:riemann1](a):

    Divide the interval \(\ival{1}{2}\) into \(n\) subintervals of equal length \(\Delta x_i = (2-1)/n = 1/n\) for \(i =1\) to \(n\), so that the partition \(P\) is \(\lbrace x_0 < x_1 < \ldots x_n \rbrace\) where \(x_i = 1 + \frac{i}{n}\) for \(i=0\), \(1\), \(\ldots\), \(n\) (and hence \(x_0=1\) and \(x_n=2\)). In each subinterval \(\ival{x_{i-1}}{x_i}\) pick the point \(x_i^*\) to be the left endpoint \(x_{i-1}\), so that the rectangles appear as in Figure [fig:riemann1](b). Then

    \[\begin{aligned} \int_1^2 x^2~\dx ~&=~ \lim_{n \to \infty}~\sum_{i=1}^{n} f(x_i^*)\,\Delta x_i ~=~ \lim_{n \to \infty}~\sum_{i=1}^{n} f(x_{i-1})\,\frac{1}{n} ~=~ \lim_{n \to \infty}~\sum_{i=1}^{n} x_{i-1}^2\,\frac{1}{n}\

    \[6pt] &=~ \lim_{n \to \infty}~\sum_{i=1}^{n} \left(1 + \frac{i-1}{n}\right)^2\frac{1}{n} ~=~ \lim_{n \to \infty}~\sum_{i=1}^{n} \left(\frac{1}{n} ~+~ \frac{2}{n^2}(i-1) ~+~ \frac{1}{n^3}(i-1)^2\right)\

    \[6pt] &=~ \lim_{n \to \infty}~\left(\sum_{i=1}^{n}\frac{1}{n} ~+~ \frac{2}{n^2}\sum_{i=1}^{n}(i-1) ~+~ \frac{1}{n^3}\sum_{i=1}^{n}(i-1)^2\right) ~=~ \lim_{n \to \infty}~\left(1 ~+~ \frac{2}{n^2}\sum_{i=1}^{n-1}i ~+~ \frac{1}{n^3}\sum_{i=1}^{n-1}i^2\right)\

    \[6pt] &= \lim_{n \to \infty}~\left(1 \;+\; \frac{2}{n^2}\cdot\frac{(n-1)n}{2} \;+\; \frac{1}{n^3}\cdot\frac{(n-1)n(2n-1)}{6}\right)\quad\text{(replace $n$ by $n-1$ in Formulas (2) and (3))}\

    \[6pt] &=~ \left(\lim_{n \to \infty}\,1\right) ~+~ \left(\lim_{n \to \infty}\,\frac{n-1}{n}\right) ~+~ \left(\lim_{n \to \infty}\,\frac{2n^2-3n+1}{6n^2}\right)\

    \[6pt] &=~ 1 ~+~ \frac{1}{1} ~+~ \frac{2}{6} ~=~ \frac{7}{3}\end{aligned} \nonumber \]

    It it often simpler to use a computer to calculate approximations of a definite integral, by taking the Riemann sum of a sufficiently large number of rectangles in order to achieve the desired accuracy. Choosing subintervals of equal length, as in Example

    Example \(\PageIndex{1}\): riemann1

    , makes it easier to use an algorithm to calculate the integral.

    For example, the table below summarizes the calculations of Riemann sums for the function in Example

    Example \(\PageIndex{1}\): riemann1

    —namely \(f(x)= x^2\) over \(\ival{1}{2}\)—using different values for the points \(x_i^*\) in the subintervals (left endpoints, midpoints, and right endpoints):

    Due to the concavity of the curve \(y=x^2\), using the left endpoints underestimates the actual area, whereas using the right endpoints yields an overestimate. Using the midpoints usually gives better results (i.e. more accuracy in fewer iterations).

    So far only definite integrals of nonnegative functions have been considered—that is, functions \(f(x) \ge 0\) over an interval \(\ival{a}{b}\). If \(f(x)\) is either negative or changes sign over \(\ival{a}{b}\), then the definite integral can be defined as follows:

    Note: In the definite integral \(\displaystyle\int_a^b\,f(x)\;\dx\) the numbers \(a\) and \(b\) are called the limits of integration, with \(a\) being the lower limit of integration and \(b\) the upper limit of integration. The function \(f(x)\) being integrated is called the integrand, in both definite and indefinite integrals.

    [sec5dot2]

    Explain why \(\displaystyle\int_a^b c~\dx ~=~ c(b-a)\) for any constant \(c\).

    Would using left endpoints in the Riemann sums underestimate or overestimate \(\int_1^2 \ln x\,\dx\)? Explain. [[1.]]

    2

    Use Riemann sums to calculate \(\displaystyle\int_0^1 x~\dx\).

    Use Riemann sums to calculate \(\displaystyle\int_0^1 x^2~\dx\).

    2

    Use Riemann sums to calculate \(\displaystyle\int_0^1 3x^2~\dx\).

    Use Riemann sums to calculate \(\displaystyle\int_0^1 x^3~\dx\).

    Prove the formula \(~\displaystyle\sum_{k=1}^{n}~k^2 ~=~ \dfrac{n\,(n+1)\,(2n+1)}{6}~\) by induction on \(n\ge 1\).

    Prove the formula \(~\displaystyle\sum_{k=1}^{n}~k^2 ~=~ \dfrac{n\,(n+1)\,(2n+1)}{6}~\) as follows:

    1. Show that \(~\displaystyle\sum_{k=1}^{n}~\left( (k+1)^3 ~-~ k^3 \right) ~=~ (n+1)^3 ~-~ 1~\).
    2. Show that \((k+1)^3 ~-~ k^3 ~=~ 3k^2 ~+~ 3k ~+~ 1~\).
    3. Use the formula \(~\displaystyle\sum_{k=1}^{n}~k ~=~ \dfrac{n\,(n+1)}{2}~\) and parts (a) and (b) to show that \(~\displaystyle\sum_{k=1}^{n}~k^2 ~=~ \dfrac{n\,(n+1)\,(2n+1)}{6}~\).

    Prove the formula \(~\displaystyle\sum_{k=1}^{n}~k^3 ~=~ \dfrac{n^2\,(n+1)^2}{4}~\) by induction on \(n \ge 1\).

    The famous quicksort algorithm in computer science is a popular method for placing objects in some order (e.g. numerical, alphabetical). On average the algorithm needs \(O(n\;\log\,n)\) comparisons to sort \(n\) objects (here \(\log\,n\) means the natural logarithm of \(n\)). The proof of that average complexity depends on the inequality

    \[\sum_{k=2}^{m-1}\;k\,\ln\,k ~\le~ \int_2^m x\,\ln\,x\;\dx \nonumber \]

    for all integers \(m > 2\). Explain why that inequality is true. [[1.]]

    Prove the formula \(\displaystyle\sum_{k=1}^{n} k^4 ~=~ 1^4 ~+~ 2^4 ~+~ \cdots ~+~ n^4 ~=~ \dfrac{n\,(n + 1)\,(6n^3 + 9n^2 + n - 1)}{30}\) by induction on \(n \ge 1\).

    Calculate the following sum:

    \[1 ~+~ (1 + 2) ~+~ (1 + 2 + 3) ~+~ (1 + 2 + 3 + 4) ~+~ \cdots ~+~ (1 + 2 + 3 + 4 + \cdots + 50) \nonumber \]


    This page titled 5.2: The Definite Integral is shared under a GNU General Public License 3.0 license and was authored, remixed, and/or curated by Michael Corral.

    • Was this article helpful?