Skip to main content
Mathematics LibreTexts

3.2: Estimating Integrals

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

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    The US population curve (Section 3.1) was difficult to integrate partly because it was unknown. But even well-known functions can be difficult to integrate. In such cases, two lumping methods are particularly useful: the \(1/e\) heuristic (Section 3.2.1) and the full width at half maximum (FWHM) heuristic (Section 3.2.2).

    heuristic

    Screen Shot 2021-03-01 at 3.13.45 PM.png

    Electronic circuits, atmospheric pressure, and radioactive decay contain the ubiquitous exponential and its integral (given here in dimensionless form)

    \[\int_{0}^{\infty} e^{-t} dt. \label{3.4} \]

    To approximate its value, let’s lump the \(e^{−t}\) curve into one rectangle.

    Question

    What values should be chosen for the width and height of the rectangle?

    A reasonable height for the rectangle is the maximum of \(e^{−t}\), namely 1. To choose its width, use significant change as the criterion (a method used again in Section 3.3.3): Choose a significant change in \(e^{−t}\); then find the width \(Δt\) that produces this change. In an exponential decay, a simple and natural significant change is when \(e^{−t}\) becomes a factor of \(e\) closer to its final value (which is 0 here because \(t\) goes to \(\infty\)). With this criterion, \(Δt = 1\). The lumping rectangle then has unit area—which is the exact value of the integral!

    Screen Shot 2021-03-01 at 3.20.47 PM.png

    Encouraged by this result, let’s try the heuristic on the difficult integral

    \[\int_{-\infty}^{\infty} e^{-x^{2}}dx. \label{3.5} \]

    Again lump the area into a single rectangle. Its height is the maximum of \(e^{−x^{2}}\), which is 1. Its width is enough that \(e^{−x^{2}}\) falls by a factor of \(e\). This drop happens at \(x = ±1\), so the width is \(Δx = 2\) and its area is \(1 \times 2\). The exact area is \(\sqrt{\pi} ≈ 1.77\) (Section 2.1), so lumping makes an error of only 13%: For such a short derivation, the accuracy is extremely high.

    Problem 3.4 General exponential decay

    Use lumping to estimate the integral

    \[\int_{0}^{\infty} e^{-at}dt. \label{3.6} \]

    Use dimensional analysis and easy cases to check that your answer makes sense.

    Problem 3.5 Atmospheric pressure

    Atmospheric density \(ρ\) decays roughly exponentially with height \(z\):

    \[ρ ∼ ρ_oe^{-z/H}, \label{3.7} \]

    where \(ρ_0\) is the density at sea level, and \(H\) is the so-called scale height (the height at which the density falls by a factor of e). Use your everyday experience to estimate \(H\).

    Then estimate the atmospheric pressure at sea level by estimating the weight of an infinitely high cylinder of air.

    Problem 3.6 Cone free-fall distance

    Roughly how far does a cone of Section 2.4 fall before reaching a significant fraction of its terminal velocity? How large is that distance compared to the drop height of 2m? Hint: Sketch (very roughly) the cone’s acceleration versus time and make a lumping approximation.

    Full width at half maximum

    Another reasonable lumping heuristic arose in the early days of spectroscopy. As a spectroscope swept through a range of wavelengths, a chart recorder would plot how strongly a molecule absorbed radiation of that wavelength. This curve contains many peaks whose location and area reveal the structure of the molecule (and were essential in developing quantum theory [14]). But decades before digital chart recorders existed, how could the areas of the peaks be computed?

    They were computed by lumping the peak into a rectangle whose height is the height of the peak and whose width is the full width at half maximum (FWHM). Where the \(1/e\) heuristic uses a factor of e as the significant change, the FWHM heuristic uses a factor of 2.

    Screen Shot 2021-03-01 at 3.43.10 PM.png

    Try this recipe on the Gaussian integral \(\int_{-\infty}^{infty} e^{-x^{2}}dx.\) The maximum height of \(e^{−x^{2}}\) is 1, so the half maxima are at \(x=± ln2\) and the full width is 2 \(\sqrt{ln2}\). The lumped rectangle therefore has area 2\(\sqrt{ln2} ≈ 1.665\). The exact area is \(\sqrt{\pi} ≈ 1.77\) (Section 2.1): The FWHM heuristic makes an error of only 6%, which is roughly one-half the error of the \(1/e\) heuristic.

    Problem 3.7 Trying the FWHM heuristic

    Make single-rectangle lumping estimates of the following integrals. Choose the height and width of the rectangle using the FWHM heuristic. How accurate is each estimate?

    1. \(\int_{-\infty}^{infty} \frac{1}{1 + x^{2}}dx\) [exact value: \(\pi\)]
    2. \(\int_{-\infty}^{infty} e^{-x^{4}} dx \) [exact value: Γ(1/4)/2 ≈ 1.813].

    Stirling’s approximation

    The \(1/e\) and FWHM lumping heuristics next help us approximate the ubiquitous factorial function n!; this function’s uses range from probability theory to statistical mechanics and the analysis of algorithms. For positive integers, n! is defined as \(n \times (n − 1) \times (n − 2) \times ··· \times 2 \times 1\). In this discrete form, it is difficult to approximate. However, the integral representation for n!,

    \[n! ≡ \int_{0}^{\infty} t^{n}e^{-t}dt, \label{3.8} \]

    provides a definition even when n is not a positive integer and this intgeral can be approximated using lumping. The lumping analysis will generate almost all of Stirling’s famous approximation formula

    \[n! ≈ n^{n}e^{-n}\sqrt{2 \pi n}. \label{3.9} \]

    Question

    Lumping requires a peak, but does the integrand \(t^{n}\)e\(^{−t}\) have a peak?

    To understand the integrand \(t^{n}e^{−t}\) or \(t^{n}/e^{t}\), examine the extreme cases of t. When \(t = 0\), the integrand is 0. In the opposite extreme, \(t \rightarrow \infty\), the polynomial factor tn makes the product infinity while the exponential factor \(e^{−t}\) makes it zero. Who wins that struggle? The Taylor series for et contains every power of t (and with positive coefficients), so it is an increasing, infinite-degree polynomial. Therefore, as t goes to infinity, et outruns any polynomial tn and makes the integrand tn/et equal 0 in the \(t \rightarrow \infty\) extreme. Being zero at both extremes, the integrand must have a peak in between. In fact, it has exactly one peak. (Can you show that?)

    Screen Shot 2021-03-01 at 4.02.48 PM.png

    Increasing n strengthens the polynomial factor \(t^{n}\), so \(t^{n}\) survives until higher t before et outruns it. Therefore, the peak of \(t^{n}/e^{t}\) shifts right as n increases. The graph confirms this prediction and suggests that the peak occurs at \(t = n\). Let’s check by using calculus to maximize \(t^{n}e^{-t}\) or, more simply, to maximize its logarithm \(f(t) = n ln t − t\). At a peak, a function has zero slope. Because \(df/dt = n/t−1\), the peak occurs at \(t_{\text{peak}} = n\), when the integrand \(t^{n}e^{-t}\) is \(n^{n}e^{-n}\) thus reproducing the largest and most important factor in Stirling’s formula.

    Question

    What is a reasonable lumping rectangle?

    The rectangle’s height is the peak height \(n^{n}e^{-n}\). For the rectangle's width, use either the \(1/e\) or the FWHM heuristics. Because both heuristic require approximating \(t^{n}e^{-t}\), expand its logarithm \(f(t)\) in a Taylor series around its peak at \(t = n\):

    \[f(n+\Delta t)=f(n)+\left.\Delta t \frac{d f}{d t}\right|_{t=n}+\left.\frac{(\Delta t)^{2}}{2} \frac{d^{2} f}{d t^{2}}\right|_{t=n}+\cdots\label{3.10} \]

    The second term of the Taylor expansion vanishes because \(f(t)\) has zero slope at the peak. In the third term, the second derivative \(d^{2}f/dt^{2}\) at \(t = n\) is \(−n/t^{2}\) or \(−1/n\). Thus,

    To decrease \(t^{n}e^{−t}\) by a factor of \(F\) requires decreasing \(f(t)\) by \(lnF\). This choice means \(Δt = \sqrt{2nlnF}\). Because the rectangle’s width is \(2Δt\), the lumped-area estimate of \(n!\) is

    \[n ! \sim n^{n} e^{-n} \sqrt{n} \times\left\{\begin{array}{ll}
    \sqrt{8} & (1 / e \text { criterion: } F=e) \\
    \sqrt{8 \ln 2} & \text { (FWHM criterion: } F=2 \text { ). }
    \end{array}\right. \label{3.12} \]

    For comparison, Stirling’s formula is \(n! ≈ n^{n}e^{−n}\)\(\sqrt{2\pi n}\). Lumping has explained almost every factor. The \(n^{n}e^{−n}\) factor is the height of the rectangle, and the \(\sqrt{n}\) factor is from the width of the rectangle. Although the exact \(\sqrt{2\pi}\) factor remains mysterious (Problem 3.9), it is approximated to within 13% (the \(1/e\) heuristic) or 6% (the FWHM heuristic).

    Multiple problems

    Problem 3.8 Coincidence?

    The FWHM approximation for the area under a Gaussian (Section 3.2.2) was also accurate to 6%. Coincidence?

    Problem 3.9 Exact constant in Stirling’s formula

    Where does the more accurate constant factor of \(\sqrt{2\pi}\) come from?


    This page titled 3.2: Estimating Integrals is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Sanjoy Mahajan (MIT OpenCourseWare) via source content that was edited to the style and standards of the LibreTexts platform.