% ----------------------------------------------------------------------

\chapter{The integral}
\label{integ}
\index{calculus}
\index{calculus!the two complementary questions of}
\index{integral}

Chapter~\ref{drvtv} has observed that the mathematics of calculus
concerns a complementary pair of questions:
\bi
  \item Given some function $f(t)$, what is the function's instantaneous
    rate of change, or \emph{derivative,} $f'(t)$?
  \item Interpreting some function $f'(t)$ as an instantaneous rate of
    change, what is the corresponding accretion, or \emph{integral,}
    $f(t)$?
\ei
Chapter~\ref{drvtv} has built toward a basic understanding of the first
question.  This chapter builds toward a basic understanding of the
second.  The understanding of the second question constitutes the
concept of the integral, one of the profoundest ideas in all of
mathematics.

This chapter, which introduces the integral, is undeniably a hard chapter.

\index{Hamming, Richard~W.\ (1915--1998)}
Experience knows no reliable way to teach the integral adequately to the
uninitiated except through dozens or hundreds of pages of suitable
examples and exercises, yet the book you are reading cannot be that
kind of book.  The sections of the present chapter concisely treat
matters which elsewhere rightly command chapters or whole books of their
own.  Concision can be a virtue---and by design, nothing essential is
omitted here---but the bold novice who wishes to learn the integral from
these pages alone faces a daunting challenge.  It can perhaps be done.
Meanwhile, the less intrepid who prefer a gentler initiation might first
try a good tutorial like~\cite{Hamming}.

% ----------------------------------------------------------------------

\section{The concept of the integral}
\label{integ:220}
\index{integral}
\index{integral!concept of}

An \emph{integral} is a finite accretion or sum of an infinite number of
infinitesimal elements.  This section introduces the concept.

\subsection{An introductory example}
\label{integ:220.10}

\index{integral!as accretion or area}
Consider the sums
\settowidth\tla{$\ds\frac 12$}
\bqb
  S_1 &=& \rule{1\tla}{0ex}\sum_{k=0}^{\mr{0x10}-1} k, \\
  S_2 &=& \frac 12\sum_{k=0}^{\mr{0x20}-1} \frac{k}{2}, \\
  S_4 &=& \frac 14\sum_{k=0}^{\mr{0x40}-1} \frac{k}{4}, \\
  S_8 &=& \frac 18\sum_{k=0}^{\mr{0x80}-1} \frac{k}{8}, \\
      &\vdots& \\
  S_n &=& \frac 1n\sum_{k=0}^{(\mr{0x10})n-1} \frac{k}{n}.
\eqb
What do these sums represent?  One way to think of them is in terms of
the shaded areas of Fig.~\ref{integ:220:fig1}.
\begin{figure}
  \caption{Areas representing discrete sums.}
  \label{integ:220:fig1}
  \bc
    \begin{pspicture}(-4,-2)(6,4)
      {
        \small
        \psset{dimen=middle}
        \nc\xx{3.2}
        \nc\axes[1]{
          {
            \psset{linewidth=0.5pt}
            \psline(-1.0,0)(3.5,0)
            \psline(0,-1.0)(0,3.5)
            \rput(3.8,0){$\tau$}
            \rput(0,3.8){$f_{#1}(\tau)$}
          }
        }
        \rput(-\xx,0){
          \axes{1}
          \psset{linewidth=1.0pt}
          \psset{unit=0.2cm}
          \pspolygon[fillstyle=solid,fillcolor=lightgray,hatchwidth=0.5pt,hatchangle=30]
          ( 0, 0)( 1, 0)
          ( 1, 1)( 2, 1)
          ( 2, 2)( 3, 2)
          ( 3, 3)( 4, 3)
          ( 4, 4)( 5, 4)
          ( 5, 5)( 6, 5)
          ( 6, 6)( 7, 6)
          ( 7, 7)( 8, 7)
          ( 8, 8)( 9, 8)
          ( 9, 9)(10, 9)
          (10,10)(11,10)
          (11,11)(12,11)
          (12,12)(13,12)
          (13,13)(14,13)
          (14,14)(15,14)
          (15,15)(16,15)
          (16,16)(16, 0)
          \rput(11.5,4.5){$S_1$}
          {
            \psset{yunit=1cm,linewidth=0.5pt}
            \psline(16,0)(16,-0.2)\rput(16,-0.5){$\mr{0x10}$}
          }
          {
            \psset{linestyle=dashed,linewidth=0.5pt}
            \psline(0,16)(16,16)
            \psset{xunit=1cm}
            \rput[r](-0.15,16){$\mr{0x10}$}
          }
          {
            \psset{linewidth=0.5pt}
            \psline(4,5.5)(4,14)
            \psline(5,6.5)(5,14)
            \psline{->}(2.5,13.5)(4,13.5)
            \psline{<-}(5,13.5)(6.5,13.5)
            \uput{0.2}[r](6.5,13.5){$\Delta \tau\!=\!1$}
          }
        }
        \rput( \xx,0){
          \axes{2}
          \psset{linewidth=1.0pt}
          \psset{unit=0.1cm}
          \pspolygon[fillstyle=solid,fillcolor=lightgray,hatchwidth=0.5pt,hatchangle=30]
          ( 0, 0)( 1, 0)
          ( 1, 1)( 2, 1)
          ( 2, 2)( 3, 2)
          ( 3, 3)( 4, 3)
          ( 4, 4)( 5, 4)
          ( 5, 5)( 6, 5)
          ( 6, 6)( 7, 6)
          ( 7, 7)( 8, 7)
          ( 8, 8)( 9, 8)
          ( 9, 9)(10, 9)
          (10,10)(11,10)
          (11,11)(12,11)
          (12,12)(13,12)
          (13,13)(14,13)
          (14,14)(15,14)
          (15,15)(16,15)
          (16,16)(17,16)
          (17,17)(18,17)
          (18,18)(19,18)
          (19,19)(20,19)
          (20,20)(21,20)
          (21,21)(22,21)
          (22,22)(23,22)
          (23,23)(24,23)
          (24,24)(25,24)
          (25,25)(26,25)
          (26,26)(27,26)
          (27,27)(28,27)
          (28,28)(29,28)
          (29,29)(30,29)
          (30,30)(31,30)
          (31,31)(32,31)
          (32,32)(32, 0)
          \rput(23, 9){$S_2$}
          {
            \psset{yunit=1cm,linewidth=0.5pt}
            \psline(32,0)(32,-0.2)\rput(32,-0.5){$\mr{0x10}$}
          }
          {
            \psset{linestyle=dashed,linewidth=0.5pt}
            \psline(0,32)(32,32)
            \psset{xunit=1cm}
            \rput[r](-0.15,32){$\mr{0x10}$}
          }
          {
            \psset{unit=0.2cm}
            \psset{linewidth=0.5pt}
            \psline(4.0,5.5)(4.0,14)
            \psline(4.5,6.0)(4.5,14)
            \psline{->}(2.5,13.5)(4.0,13.5)
            \psline{<-}(4.5,13.5)(6.0,13.5)
            \uput{0.2}[r](6.0,13.5){$\Delta \tau\!=\!\frac 1 2$}
          }
        }
      }
    \end{pspicture}
  \ec
\end{figure}
In the figure,~$S_1$ is composed\footnote{%
  If the reader does not fully understand this paragraph's illustration,
  if the relation of the sum to the area seems unclear, then the reader is
  urged to pause and consider the illustration carefully until he does
  understand it.  If it still seems  unclear, then the reader should
  probably suspend reading here and go study a good basic calculus text
  like~\cite{Hamming}\@.  The concept is important.%
}
of several tall, thin rectangles of
width 1 and height~$k$; $S_2$, of rectangles of width~$1/2$ and height
$k/2$.
As~$n$ grows, the shaded region in the figure looks more and more like a
triangle of base length $b=\mr{0x10}$ and height $h=\mr{0x10}$.
In fact it appears that
\[
  \lim_{n\ra\infty} S_n = \frac{bh}{2} = \mr{0x80},
\]
or more tersely
\[
  S_\infty = \mr{0x80},
\]
is the area the increasingly fine stairsteps approach.

\index{integral!as shortcut to a sum}
Notice how we have evaluated~$S_\infty$, the sum of an infinite number
of infinitely narrow rectangles, without actually adding anything up.
We have taken a shortcut directly to the total.

\index{limit of integration}
\index{integration!limit of}
\index{factor of integration}
\index{infinitesimal factor of integration}
\index{integration!infinitesimal factor of}
In the equation
\[
  S_n = \frac 1n\sum_{k=0}^{(\mr{0x10})n-1} \frac{k}{n},
\]
let us now change the variables
\[
  \begin{split}
    \tau &\la \frac{k}{n}, \\
    \Delta \tau &\la \frac{1}{n},
  \end{split}
\]
to obtain the representation
\[
  S_n = \Delta \tau\sum_{k=0}^{(\mr{0x10})n-1}\tau;
\]
or more properly,
\[
  S_n = \sum_{k=0}^{(k|_{\tau=\mr{0x10}})-1} \tau \,\Delta \tau,
\]
where the notation $k|_{\tau=\mr{0x10}}$ indicates the value of~$k$ when
$\tau=\mr{0x10}$.  Then
\[
  S_\infty = \lim_{\Delta \tau\ra 0^+}
    \sum_{k=0}^{(k|_{\tau=\mr{0x10}})-1} \tau \,\Delta \tau,
\]
in which it is conventional as~$\Delta \tau$ vanishes to change the
symbol $d\tau \la \Delta \tau$, where~$d\tau$ is the infinitesimal of
chapter~\ref{drvtv}:
\[
  S_\infty = \lim_{d\tau\ra 0^{+}} \sum_{k=0}^{(k|_{\tau=\mr{0x10}})-1} \tau\,d\tau.
\]
The symbol $\lim_{d\tau\ra 0^+} \sum_{k=0}^{(k|_{\tau=\mr{0x10}})-1}$ is
cumbersome, so we replace it with the new symbol%
\footnote{
  Like the Greek~S,~$\sum$, denoting discrete summation, the
  seventeenth century-styled Roman~S,~$\int$, stands for Latin
  ``summa,'' English ``sum.''
  See \cite[``Long s,'' 14:54, 7 April 2006]{wikip}.
}
$\int_0^{\mr{0x10}}$ to obtain the form
\[
  S_\infty = \int_0^{\mr{0x10}} \tau \,d\tau.
\]
This means, ``stepping in infinitesimal intervals of~$d\tau$, the sum of
all~$\tau\,d\tau$ from $\tau=0$ to $\tau=\mr{0x10}$.''  Graphically, it
is the shaded area of Fig.~\ref{integ:220:fig2}.
\begin{figure}
  \caption[An area representing an infinite sum of infinitesimals.]
  {An area representing an infinite sum of infinitesimals.  (Observe
  that the infinitesimal~$d\tau$ is now too narrow to show on this
  scale.  Compare against~$\Delta\tau$ in Fig.~\ref{integ:220:fig1}.)}
  \label{integ:220:fig2}
  \bc
    \begin{pspicture}(-4,-2)(6,4)
      {
        \small
        \psset{dimen=middle}
        \nc\xx{3.2}
        \nc\axes{
          {
            \psset{linewidth=0.5pt}
            \psline(-1.0,0)(3.5,0)
            \psline(0,-1.0)(0,3.5)
            \rput(3.8,0){$\tau$}
            \rput(0,3.8){$f(\tau)$}
          }
        }
        \rput(0,0){
          \axes
          \psset{linewidth=1.0pt}
          \psset{unit=0.2cm}
          \pspolygon[fillstyle=solid,fillcolor=lightgray,hatchwidth=0.5pt,hatchangle=30]
          ( 0, 0)(16,16)(16, 0)
          \rput(11.5,4.5){$S_\infty$}
          {
            \psset{yunit=1cm,linewidth=0.5pt}
            \psline(16,0)(16,-0.2)\rput(16,-0.5){$\mr{0x10}$}
          }
          {
            \psset{linestyle=dashed,linewidth=0.5pt}
            \psline(0,16)(16,16)
            \psset{xunit=1cm}
            \rput[r](-0.15,16){$\mr{0x10}$}
          }
        }
      }
    \end{pspicture}
  \ec
\end{figure}

\subsection{Generalizing the introductory example}
\label{integ:220.20}

Now consider a generalization of the example of \S~\ref{integ:220.10}:
\[
  S_n = \frac 1n\sum_{k=an}^{bn-1} f\left(\frac{k}{n}\right).
\]
(In the example of \S~\ref{integ:220.10}, $f[\tau]$ was the simple
$f[\tau]=\tau$, but in general it could be any function.)  With the
change of variables
\[
  \begin{split}
    \tau &\la \frac{k}{n}, \\
    \Delta \tau &\la \frac{1}{n},
  \end{split}
\]
whereby
\[
  \settowidth\tla{$k|_{\tau=a}$}
  \begin{split}
    \makebox[\tla][l]{$k|_{\tau=a}$} &= an, \\
    \makebox[\tla][l]{$k|_{\tau=b}$} &= bn, \\
    (k,n) &\in \mathbb Z, \ \ n \neq 0,
  \end{split}
\]
(but~$a$ and~$b$ need not be integers), this is
\[
  S_n = \sum_{k=(k|_{\tau=a})}^{(k|_{\tau=b})-1} f(\tau) \,\Delta \tau.
\]
In the limit,
\[
  S_\infty = \lim_{d\tau\ra 0^{+}}
    \sum_{k=(k|_{\tau=a})}^{(k|_{\tau=b})-1} f(\tau) \,d\tau
  = \int_a^b f(\tau) \,d\tau.
\]
This is the \emph{integral} of $f(\tau)$ in the interval $a < \tau < b$.
It represents the area under the curve of $f(\tau)$ in that interval.

\subsection{The balanced definition and the trapezoid rule}
\label{integ:220.30}

\index{integral!balanced form}
Actually, just as we have defined the derivative in the balanced
form~(\ref{drvtv:def}), we do well to define the integral in balanced
form, too:
\bq{integ:def}
  \int_a^b f(\tau) \,d\tau \equiv \lim_{d\tau\ra 0^{+}} \left\{
    \frac   {f(a) \,d\tau}{2}
    + \sum_{k=(k|_{\tau=a})+1}^{(k|_{\tau=b})-1} f(\tau) \,d\tau
    + \frac {f(b) \,d\tau}{2}
  \right\}.
\eq
Here, the first and last integration samples are each balanced ``on the
edge,'' half within the integration domain and half without.

\index{trapezoid rule}
\index{Simpson's rule}
Equation~(\ref{integ:def}) is known as the \emph{trapezoid rule.}
Figure~\ref{integ:220:fig-trap} depicts it.
\begin{figure}
  \caption
    [Integration by the trapezoid rule.]
    {Integration by the trapezoid rule~(\ref{integ:def}).  Notice that
      the shaded and dashed areas total the same.}
    % The author's five-year-old, Isaiah, seems to think that the
    % caption should be, "A house with shooters on it."
  \label{integ:220:fig-trap}
  \bc
    \begin{pspicture}(-2,-1.5)(7.5,4)
      {
        \small
        \psset{dimen=middle}
        \settoheight\tla{$ab\,d\tau$}
        {
          % The shaded area here cheats downward 0.02 cm at the top, to
          % visually emphasize the unintegrated area slightly.
          \psset{linewidth=1.0pt}
          \pspolygon[fillstyle=solid,fillcolor=lightgray]
            (1.0,0)
            (1.0,1.8050)
            (2.2,2.4530)
            (3.4,2.2370)
            (4.6,1.1570)
            (4.6,0)
          \psline(2.2,0)(2.2,2.4530)
          \psline(3.4,0)(3.4,2.2370)
          \psline(4.6,0)(4.6,1.1570)
        }
        {
          \psset{linewidth=0.5pt,linestyle=dashed}
          \psline(1.0,1.8250)(1.6,1.8250)
          \psline(1.6,2.4730)(2.8,2.4730)
          \psline(2.8,2.2570)(4.0,2.2570)
          \psline(4.0,1.1770)(4.6,1.1770)
          \psline(1.6,0)(1.6,2.4730)
          \psline(2.8,0)(2.8,2.4730)
          \psline(4.0,0)(4.0,2.2570)
        }
        \psline[linewidth=0.5pt](-1,0)(6,0)
        \psline[linewidth=0.5pt](0,-0.5)(0,3)
        \psplot[linewidth=2.0pt,plotpoints=200]{0.5}{5.0}{
          x 2.5 sub dup mul -0.30 mul 2.5 add
        }
        {
          \psset{linewidth=2.0pt}
          \psdot(1.0,1.8250)
          \psdot(2.2,2.4730)
          \psdot(3.4,2.2570)
          \psdot(4.6,1.1770)
        }
        \rput(6.3,0){$\tau$}
        \rput(0,3.3){$f(\tau)$}
        \rput(1.0,-0.3){\rule{0em}{\tla}$a$}
        \rput(2.8,-0.3){\rule{0em}{\tla}$d\tau$}
        \rput(4.6,-0.3){\rule{0em}{\tla}$b$}
        {
          \psset{linewidth=0.5pt}
          \psline(2.2,-0.2)(2.2,-0.4)
          \psline(3.4,-0.2)(3.4,-0.4)
          \psline{->}(2.5,-0.3)(2.2,-0.3)
          \psline{->}(3.1,-0.3)(3.4,-0.3)
        }
      }
    \end{pspicture}
  \ec
\end{figure}
The name ``trapezoid'' comes of the shapes of the shaded integration
elements in the figure.  Observe however that it makes no difference
whether one regards the shaded trapezoids or the dashed rectangles as
the actual integration elements; the total integration area is the same
either way.%
\footnote{
  The trapezoid rule~(\ref{integ:def}) is perhaps the most
  straightforward, general, robust way to define the integral, but other
  schemes are possible, too.  For example, taking the trapezoids in
  adjacent pairs---such that a pair enjoys not only a sample on each
  end but a third sample in the middle---one can for each pair fit a
  second-order curve $f(\tau) \approx (c_2)(\tau-\tau_{\mr{middle}})^2 +
  (c_1)(\tau-\tau_{\mr{middle}}) + c_0$ to the function, choosing the
  coefficients~$c_2$, $c_1$ and~$c_0$ to make the curve match the
  function exactly at the pair's three sample points; and then
  substitute the area under the pair's curve (an area which, by the end
  of \S~\ref{integ:241}, we shall know how to calculate exactly) for the
  areas of the two trapezoids.  Changing the symbol $\Delta\tau \la
  d\tau$ on one side of the equation to suggest coarse sampling, the
  result is the unexpectedly simple
  \bqb
    \int_a^b f(\tau) \,\Delta\tau &\approx&
      \bigg[
      \frac{1}{3}f(a)
      + \frac{4}{3}f(a+\Delta\tau)
      + \frac{2}{3}f(a+2\,\Delta\tau)
    \\&&\ \ \mbox{}
      + \frac{4}{3}f(a+3\,\Delta\tau)
      + \frac{2}{3}f(a+4\,\Delta\tau)
      + \cdots
      + \frac{4}{3}f(b-\Delta\tau)
      + \frac{1}{3}f(b)
      \bigg] \,\Delta\tau,
  \eqb
  as opposed to the trapezoidal
  \bqb
    \int_a^b f(\tau) \,\Delta\tau &\approx&
      \bigg[
      \frac{1}{2}f(a)
      + f(a+\Delta\tau)
      + f(a+2\,\Delta\tau)
    \\&&\ \ \mbox{}
      + f(a+3\,\Delta\tau)
      + f(a+4\,\Delta\tau)
      + \cdots
      + f(b-\Delta\tau)
      + \frac{1}{2}f(b)
      \bigg] \,\Delta\tau
  \eqb
  implied by~(\ref{integ:def}).
  The curved scheme is called \emph{Simpson's rule.}
  It is clever and well known.

  Simpson's rule had real uses in the slide-rule era when, for practical
  reasons, one preferred to let~$\Delta\tau$ be sloppily large, sampling
  a curve only a few times to estimate its integral; yet the rule is
  much less useful when a computer is available to do the arithmetic
  over an adequate number of samples.  At best Simpson's rule does not
  help much with a computer; at worst it can yield spurious results; and
  because it is easy to program it tends to encourage thoughtless
  application.  Other than in the footnote you are reading, Simpson's
  rule is not covered in this book.
}
The important point to understand is that the integral is conceptually
just a sum.  It is a sum of an infinite number of infinitesimal elements
as $d\tau$ tends to vanish, but a sum nevertheless; nothing more.

\index{variable~$d\tau$}
\index{variable independent infinitesimal}
\index{independent infinitesimal!variable}
\index{infinitesimal!independent, variable}
\index{Leibnitz notation}
Nothing actually requires the integration element width~$d\tau$ to
remain constant from element to element, incidentally.  Constant widths
are usually easiest to handle but variable widths find use in some
cases.  The only requirement is that~$d\tau$ remain infinitesimal.  (For
further discussion of the point, refer to the treatment of the Leibnitz
notation in \S~\ref{drvtv:240}.)

% ----------------------------------------------------------------------

\section[The antiderivative]{The antiderivative and the fundamental
theorem of calculus}
\label{integ:230}
\index{integral!as antiderivative}
\index{antiderivative}
\index{calculus!fundamental theorem of}
\index{fundamental theorem of calculus}

\index{accretion}
If
\[
  S(x) \equiv \int_a^x g(\tau) \,d\tau,
\]
then what is the derivative $dS/dx$?  After some reflection, one sees
that the derivative must be
\[
  \frac{dS}{dx} = g(x).
\]
This is so because the action of the integral is to compile or accrete the
area under a curve.  The integral accretes area at a rate proportional
to the curve's height $f(\tau)$: the higher the curve, the faster the
accretion.  In this way one sees that the integral and the derivative
are inverse operators; the one inverts the other.  The integral is the
\emph{antiderivative.}

More precisely,
\bq{integ:antider}
  \int_a^b \frac{df}{d\tau} \,d\tau = f(\tau)|_a^b,
\eq
where the notation $f(\tau)|_a^b$ or $[f(\tau)]_a^b$ means $f(b)-f(a)$.

\index{calculus!the two complementary questions of}

The importance of~(\ref{integ:antider}), fittingly named the
\emph{fundamental theorem of calculus},%
\footnote{%
  \cite[\S~11.6]{Hamming}%
  \cite[\S~5-4]{Shenk}%
  \cite[``Fundamental theorem of calculus,'' 06:29, 23 May 2006]{wikip}
}
can hardly be overstated.  As the formula which ties together the
complementary pair of questions asked at the chapter's
start,~(\ref{integ:antider}) is of utmost importance in the practice of
mathematics.  The idea behind the formula is indeed simple once grasped,
but to grasp the idea firmly in the first place is not entirely
trivial.%
\footnote{
  Having read from several calculus books and, like millions of others
  perhaps including the reader, having sat years ago in various
  renditions of the introductory calculus lectures in school, the author
  has never yet met a more convincing demonstration
  of~(\ref{integ:antider}) than the formula itself.  Somehow the
  underlying idea is too simple, too profound to explain.  It's like
  trying to explain how to drink water, or how to count or to add.
  Elaborate explanations and their attendant constructs and formalities
  are indeed possible to contrive, but the idea itself is so simple that
  somehow such contrivances seem to obscure the idea more than to reveal
  it.

  One ponders the formula~(\ref{integ:antider}) a while, then the idea
  dawns on him.

  If you want some help pondering, try this:  Sketch some arbitrary
  function $f(\tau)$ on a set of axes at the bottom of a piece of
  paper---some squiggle of a curve like
  \settoheight\tla{\scriptsize $b$}
    \bc
      \nc\fxa{-0.5} \nc\fxb{1.5}
      \nc\fya{-0.35} \nc\fyb{0.8}
      \nc\xxa {0.13} \nc\xxb{1.2}
      \nc\xxt{0.07}
      \nc\xxtt{0.25}
      \nc\xxma{0.40}\nc\xxmb{1.10}
      \begin{pspicture}(\fxa,\fya)(\fxb,\fyb)
        %\psframe[linewidth=0.5pt,dimen=outer](\fxa,\fya)(\fxb,\fyb)
        {
          \scriptsize
          \psset{dimen=middle}
          \psset{linewidth=0.5pt}
          \psline(\fxa,0)(\fxb,0)
          \psline(0,\fya)(0,\fyb)
          \psplot[linewidth=1.0pt,plotpoints=50]{\xxa}{\xxb}{
            x 0.7 sub dup dup mul mul 3.0 mul 0.4 add
          }
          \psline(\xxma,-\xxt)(\xxma,\xxt)
          \psline(\xxmb,-\xxt)(\xxmb,\xxt)
          \rput(\xxma,-\xxtt){$\rule{0em}{\tla}a$}
          \rput(\xxmb,-\xxtt){$\rule{0em}{\tla}b$}
          \uput{\xxt}[r](\fxb,0){$\tau$}
          \uput{\xxt}[r](0,\fyb){\uput{0}[dr](0,0){$f(\tau)$}}
        }
      \end{pspicture}
    \ec
  will do nicely---then on a separate set of axes directly above the first,
  sketch the corresponding slope function $df/d\tau$.
  Mark two points~$a$ and~$b$ on the common horizontal axis; then on the
  upper, $df/d\tau$ plot, shade the integration area under the curve.
  Now consider~(\ref{integ:antider}) in light of your sketch.

  There.  Does the idea not dawn?

  Another way to see the truth of the formula begins by canceling its
  $(1/d\tau)\,d\tau$ to obtain the form $\int_{\tau=a}^b df =
  f(\tau)|_a^b$.  If this way works better for you, fine; but make sure
  that you understand it the other way, too.
}
The idea is simple but big.  The reader is urged to pause now and ponder the
formula thoroughly until he feels reasonably confident that indeed he
does grasp it and the important idea it represents.  One is unlikely to
do much higher mathematics without this formula.

As an example of the formula's use, consider that because
\linebreak % bad break
$(d/d\tau)(\tau^3/6)=\tau^2/2$, it follows that
\[
  \int_2^x \frac{\tau^2\,d\tau}{2}
  = \int_2^x \frac{d}{d\tau}\left(\frac{\tau^3}{6}\right)\,d\tau
  = \left.\frac{\tau^3}{6}\right|_{2}^{x}
  = \frac{x^3-8}{6}.
\]

Gathering elements from~(\ref{drvtv:240.30:10}) and from Tables~\ref{cexp:drv}
and~\ref{cexp:drvi}, Table~\ref{integ:basic-antider} lists a handful of the
simplest, most useful derivatives for antiderivative use.%
\begin{table}
  \caption{Basic derivatives for the antiderivative.}
  \label{integ:basic-antider}
  \[
    \int_a^b \frac{df}{d\tau} \,d\tau = f(\tau)|_a^b
  \]
  \[
    \renewcommand\arraystretch{2.0}
    \setlength\arraycolsep{0.5ex}
    \br{rclcrcl}
      \ds\tau^{a-1}
        &=& \ds\frac{d}{d\tau} \ds\left(\frac{\tau^a}{a}\right),
        &\ \ & \ds a &\neq& 0 \\
      \ds\frac{1}{\tau}
        &=& \ds\frac{d}{d\tau} \ln\tau,
        && \ds \ln 1 &=& 0 \\
      \ds\exp\tau
        &=& \ds\frac{d}{d\tau} \exp\tau,
        && \ds \exp 0 &=& 1 \\
      \ds\cos\tau
        &=& \ds\frac{d}{d\tau} \sin\tau,
        && \ds \sin 0 &=& 0 \\
      \ds\sin\tau
        &=& \ds\frac{d}{d\tau} \left(-\cos\tau\right),
        && \ds \cos 0 &=& 1
    \er
  \]
\end{table}
Section~\ref{inttx:210} speaks further of the antiderivative.

% ----------------------------------------------------------------------

\section{Operators, linearity and multiple integrals}
\label{integ:240}

This section presents the operator concept, discusses linearity and its
consequences, treats the commutivity of the summational and
integrodifferential operators, and introduces the multiple integral.

\subsection{Operators}
\label{integ:240.03}
\index{operator}

An \emph{operator} is a mathematical agent that combines several
values of a function.

Such a definition, unfortunately, is extraordinarily unilluminating
to those who do not already know what it means.  A better way to
introduce the operator is by giving examples.  Operators include~$+$,~$-$,
multiplication, division, $\sum$, $\prod$, $\int$ and~$\partial$.
The essential action of an operator is to take several values of a
function and combine them in some way.  For example,~$\prod$ is an
operator in
\[
  \prod_{j=1}^{5} (2j-1) = (1)(3)(5)(7)(9) = \mr{0x3B1}.
\]

\index{dummy variable}
\index{operator!using a variable up}
Notice that the operator has acted to remove the variable~$j$ from the
expression $2j-1$.  The~$j$ appears on the equation's left side but not
on its right.  The operator has used the variable up.  Such a variable,
used up by an operator, is a \emph{dummy variable,} as encountered
earlier in \S~\ref{alggeo:227}.

\subsection{A formalism}
\label{integ:240.04}
\index{operator!$+$ and~$-$ as}

But then how are~$+$ and~$-$ operators?  They don't use any dummy
variables up, do they?

Well, that depends on how you look at it.
Consider the sum $S = 3 + 5$.  One can write this as
\[
  S = \sum_{k=0}^1 f(k),
\]
where
\[
  f(k) \equiv
  \begin{cases}
    3 &\mbox{if}\ k=0,\\
    5 &\mbox{if}\ k=1,\\
    \mbox{undefined} &\mbox{otherwise}.
  \end{cases}
\]
Then,
\[
  S = \sum_{k=0}^1 f(k) = f(0) + f(1) = 3 + 5 = 8.
\]
By such admittedly excessive formalism, the~$+$ operator can indeed be
said to use a dummy variable up.  The point is that~$+$ is in fact an
operator just like the others.

Another example of the kind:
\bqb
  D &=& g(z) - h(z) + p(z) + q(z) \\
  &=& g(z) - h(z) + p(z) - 0 + q(z) \\
  &=& \Phi(0,z) - \Phi(1,z) + \Phi(2,z) - \Phi(3,z) + \Phi(4,z) \\
  &=& \sum_{k=0}^4 (-)^k \Phi(k,z),
\eqb
where
\bqb
  \Phi(k,z) \equiv
  \begin{cases}
    g(z) &\mbox{if}\ k=0,\\
    h(z) &\mbox{if}\ k=1,\\
    p(z) &\mbox{if}\ k=2,\\
    0    &\mbox{if}\ k=3,\\
    q(z) &\mbox{if}\ k=4,\\
    \mbox{undefined} &\mbox{otherwise}.
  \end{cases}
\eqb

\index{formalism}
Such unedifying formalism is essentially useless in applications, except
as a vehicle for definition.  Once you understand why~$+$ and~$-$ are
operators just as~$\sum$ and~$\int$ are, you can forget the formalism.
It doesn't help much.

\subsection{Linearity}
\label{integ:240.05}
\index{linearity}
\index{linear combination}

\index{linearity!of a function}
\index{function!linear}
\index{function!nonlinear}
\index{linear expression}
\index{iff}
A function $f(z)$ is \emph{linear} iff (if and only if) it has the
properties
\bqb
  f(z_1 + z_2) &=& f(z_1) + f(z_2), \\
  f(\alpha z) &=& \alpha f(z), \\
  f(0) &=& 0.
\eqb
The functions $f(z) = 3z$, $f(u,v)=2u-v$ and $f(z) = 0$ are examples of
linear functions.  Nonlinear functions include%
\footnote{
  If $3z+1$ is a \emph{linear expression,} then how is not $f(z)=3z+1$ a
  \emph{linear function?}  Answer: the matter is a matter partly of purposeful
  definition, partly of semantics.  The equation $y=3x+1$ plots a line,
  so the expression $3z+1$ is literally ``linear'' in this sense;
  but the definition has more purpose to it than merely this.  When you
  see the linear expression $3z+1$, think $3z+1=0$, then $g(z)=3z=-1$.
  The $g(z)=3z$ is linear; the~$-1$ is the constant value it targets.
  That's the sense of it.
}
$f(z) = z^2$, $f(u,v) = \sqrt{uv}$, $f(t)=\cos\omega t$, $f(z) = 3z+1$
and even $f(z)=1$.

\index{linearity!of an operator}
\index{operator!linear}
\index{operator!nonlinear}
\index{linear operator}
An operator~$L$ is linear iff it has the properties
\bqb
  L(f_1 + f_2) &=& Lf_1 + Lf_2, \\
  L(\alpha f) &=& \alpha Lf, \\
  L(0) &=& 0.
\eqb
The operators~$\sum$, $\int$, $+$, $-$ and~$\partial$ are examples
of linear operators.  For instance,%
\footnote{
  You don't see~$d$ in the list of linear operators?  But~$d$ in this
  context is really just another way of writing~$\partial$, so, yes,~$d$
  is linear, too.  See \S~\ref{drvtv:240}.
}
\[
  \frac{d}{dz}[f_1(z) + f_2(z)] = \frac{df_1}{dz} + \frac{df_2}{dz}.
\]
Nonlinear operators include multiplication, division and the various
trigonometric functions, among others.

Section~\ref{vcalc:320.15} will have more to say about operators and
their notation.

\subsection{Summational and integrodifferential commutivity}
\label{integ:240.10}
\index{commutivity!summational and integrodifferential}

\index{convergence}
Consider the sum
\settoheight\tla{\scriptsize$k=a\ j=p$}
\[
  S_1 = \sum_{k=a\rule{0em}{\tla}}^b \left[
    \sum_{j=p\rule{0em}{\tla}}^q
      \frac{x^k}{j!}
  \right].
\]
This is a sum of the several values of the expression $x^k/j!$,
evaluated at every possible pair $(j,k)$ in the indicated domain.  Now
consider the sum
\settoheight\tla{\scriptsize$k=a\ j=p$}
\[
  S_2 = \sum_{j=p\rule{0em}{\tla}}^q \left[
    \sum_{k=a\rule{0em}{\tla}}^b
      \frac{x^k}{j!}
  \right].
\]
This is evidently a sum of the same values, only added in a different
order.  Apparently $S_1 = S_2$.  Reflection along these lines must soon
lead the reader to the conclusion that, in general,
%  The footnote would nevertheless close with an eminent contrary voice,
%  that of the late Richard~W. Hamming:
%  \begin{quote}
%    When you yourself are responsible for some new application of
%    mathematics in your chosen field, then your reputation, possibly
%    millions of dollars and long delays in the work, and possibly even
%    human lives, may depend on the results you predict.  It is then that
%    the \emph{need} for mathematical rigor will become painfully obvious
%    to you.  Before this time, mathematical rigor will often seem to be
%    needless pedantry\mdots~\cite[\S~1.6]{Hamming}
%  \end{quote}
%  The author has not himself experienced such scourges for the cause of
%  which Hamming warns, and observes that time spent conforming
%  mathematical results to the dictates of professional rigor may be time
%  not spent checking the results in more mundane ways; but this does not
%  in itself reduce the value of Hamming's warning.  Be that as it may,
%  Hamming's and Knopp's fine books rather than this one would be the
%  proper sources from which to learn that style of mathematical rigor.
\[
  \sum_k\sum_j f(j,k) =
  \sum_j\sum_k f(j,k).
\]

Now consider that an integral is just a sum of many elements, and that a
derivative is just a difference of two elements.  Integrals and
derivatives must then have the same commutative property discrete sums
have.  For example,
\bqb
  \int_{v=-\infty}^{\infty}\int_{u=a}^{b} f(u,v) \,du\,dv
  &=& \int_{u=a}^{b} \int_{v=-\infty}^{\infty} f(u,v) \,dv\,du; \\
  \int\sum_k f_k(v) \,dv &=& \sum_k\int f_k(v) \,dv; \\
  \ppx{v} \int f \,du &=& \int \pp{f}{v} \,du.
\eqb
In general,
\bq{integ:240:10}
  L_v L_u f(u,v) = L_u L_v f(u,v),
\eq
where~$L$ is any of the linear operators~$\sum$, $\int$ or~$\partial$.

\index{conditional convergence}
\index{convergence!conditional}
\index{Euler, Leonhard (1707--1783)}
\index{rigor}
Some convergent summations, like
\settoheight\tla{\scriptsize $k$}
\[
  \sum_{k=0}^\infty \sum_{\rule{0em}{\tla}j=0}^1 \frac{(-)^j}{2k+j+1},
\]
diverge once reordered, as
\settoheight\tla{\scriptsize $k$}
\[
  \sum_{\rule{0em}{\tla}j=0}^1 \sum_{k=0}^\infty \frac{(-)^j}{2k+j+1}.
\]
One cannot blithely swap operators here.  This is not because swapping
is wrong, but rather because the inner sum after the swap diverges,
whence the outer sum after the swap has no concrete summand on which to
work.  (\emph{Why} does the inner sum after the swap diverge?
Answer: $1 + 1/3 + 1/5 + \cdots = [1] + [1/3 + 1/5] + [1/7 + 1/9 +
1/\mbox{0xB} + 1/\mbox{0xD} ] + \cdots > 1[1/4] + 2[1/8] +
4[1/\mbox{0x10}] + \cdots = 1/4 + 1/4 + 1/4 + \cdots$.  See also
\S~\ref{taylor:316.70}.) For a more twisted example of the same
phenomenon, consider%
\footnote{\cite[\S~1.2.3]{Andrews}}
\[
  1 - \frac 1 2 + \frac 1 3 - \frac 1 4 + \cdots
  = \left( 1 - \frac 1 2 - \frac 1 4 \right)
    + \left( \frac 1 3 - \frac 1 6 - \frac 1 8 \right)
    + \cdots,
\]
which associates two negative terms with each positive, but
still seems to omit no term.  Paradoxically, then,
\bqb
  1 - \frac 1 2 + \frac 1 3 - \frac 1 4 + \cdots
  &=& \left( \frac 1 2 - \frac 1 4 \right)
    + \left( \frac 1 6 - \frac 1 8 \right)
    + \cdots
  \\&=& \frac 1 2 - \frac 1 4 + \frac 1 6 - \frac 1 8 + \cdots
  \\&=& \frac 1 2 \left(
    1 - \frac 1 2 + \frac 1 3 - \frac 1 4 + \cdots
  \right),
\eqb
or so it would seem, but cannot be, for it claims falsely that the
sum is half itself.  A better way to have handled the example
might have been to write the series as
\[
  \lim_{n \ra \infty} \left\{ 1 - \frac 1 2 + \frac 1 3 - \frac 1 4 +
  \cdots + \frac 1 {2n-1} - \frac{1}{2n} \right\}
\]
in the first place, thus explicitly specifying equal numbers of positive
and negative terms.%
\footnote{\label{integ:240:fn19}%
  Some students of pure mathematics would assert that the
  false conclusion had been reached through lack of rigor.  Well, maybe.
  This writer however does not feel sure that \emph{rigor} is quite the
  right word for what was lacking here.  Pure mathematics does
  bring an elegant notation and a set of formalisms which serve ably to
  spotlight certain limited kinds of blunders, but these are blunders no
  less by the applied approach.  The stalwart Leonhard Euler---arguably
  the greatest series-smith in mathematical history---wielded his heavy
  analytical hammer in thunderous strokes before modern professional
  mathematics had conceived the notation or the formalisms.  If the
  great Euler did without, then you and I might not always be forbidden
  to follow his robust example.  See also footnote~\ref{integ:240:fn20}.

  On the other hand, the professional approach to pure mathematics is
  worth study if you have the time.  Recommended introductions
  include~\cite{Knopp}, preceded if necessary
  by~\cite{Hamming} and/or \cite[chapter~1]{Andrews}.
}
So specifying would have prevented the error.  In the earlier example,
\[
  \lim_{n\ra\infty} {\sum_{k=0}^n} \sum_{\rule{0em}{\tla}j=0}^1 \frac{(-)^j}{2k+j+1}
\]
would likewise have prevented the error, or at least have made the error
explicit.

The \emph{conditional convergence}%
\footnote{\cite[\S~16]{Knopp}}
of the last paragraph, which can occur in integrals as well as in sums,
seldom poses much of a dilemma in practice.  One can normally swap
summational and integrodifferential operators with little worry.  The
reader however should at least be aware that conditional convergence
troubles can arise where a summand or integrand varies in sign or phase.

\subsection{Multiple integrals}
\label{integ:240.20}
\index{integral!multiple}

\index{surface}
\index{volume}
Consider the function
\[
  f(u,w) = \frac{u^2}{w}.
\]
Such a function would not be plotted as a curved line in a plane, but
rather as a curved \emph{surface} in a three-dimensional space.
Integrating the function seeks not the area under the curve but rather
the volume under the surface:
\[
  V = \int_{u_1}^{u_2} \int_{w_1}^{w_2} \frac{u^2}{w} \,dw\,du.
\]
This is a \emph{double integral.}  Inasmuch as it can be written in the
form
\bqb
  V &=& \int_{u_1}^{u_2} g(u) \,du, \\
  g(u) &\equiv& \int_{w_1}^{w_2} \frac{u^2}{w} \,dw,
\eqb
its effect is to cut the area under the surface into flat, upright
slices, then the slices crosswise into tall, thin towers.  The towers
are integrated over~$w$ to constitute the slice, then the slices over~$u$
to constitute the volume.

% The adverb "then" is here used as a conjuction.  To do so breaks an
% admittedly conventionally breakable rule of modern English, whereas
% the book usually tends to avoid such breakages.  However, the
% sentences in which the word here appears do not read so well if the
% breakable rule is not broken.  So broken it is.
\index{integral swapping}
\index{integral!ill-behaved}
\index{double integral!ill-behaved}
In light of \S~\ref{integ:240.10}, evidently nothing prevents us from
swapping the integrations:~$u$ first, then~$w$.  Hence
\[
  V = \int_{w_1}^{w_2} \int_{u_1}^{u_2} \frac{u^2}{w} \,du\,dw.
\]
And indeed this makes sense, doesn't it?  What difference should it make
whether we add the towers by rows first then by columns, or by columns
first then by rows?  The total volume is the same in any case---albeit
the integral over~$w$ is potentially ill-behaved%
\footnote{\label{integ:240:fn20}%
  % Inadvisable?  I hope not.
  A great deal of ink is spilled in the applied mathematical literature
  when summations and/or integrations are interchanged.  The author
  tends to recommend saving the ink, for pure and applied
  mathematics want different styles.  What usually matters in
  applications is not whether a particular summation or integration
  satisfies some formal test but rather whether one clearly understands
  the summand to be summed or the integrand to be integrated.  See also
  footnote~\ref{integ:240:fn19}.
}
near $w=0$; so that, if for instance~$w_1$ were negative,~$w_2$
were positive, and both were real, one might rather write the double
integral as%
\footnote{
  It is interesting to consider the effect of withdrawing the integral's
  limit at~$-\ep$ to~$-2\ep$, as $\lim_{\ep\ra 0^{+}}
  \left(\int_{w_1}^{-2\ep} + \int_{+\ep}^{w_2} \right) \int_{u_1}^{u_2}
  \frac{u^2}{w} \,du\,dw$; for, surprisingly---despite that the
  parameter~$\ep$ is vanishing anyway---the withdrawal does alter the
  integral unless the limit at~$+\ep$ also is withdrawn.  The reason is
  that $\lim_{\ep\ra 0^{+}} \int_{\ep}^{2\ep} (1/w) \,dw = \ln 2 \neq
  0$.
}
\[
  V = \lim_{\ep\ra 0^{+}} \left(\int_{w_1}^{-\ep} + \int_{+\ep}^{w_2} \right)
  \int_{u_1}^{u_2} \frac{u^2}{w} \,du\,dw.
\]

\index{integral!double}
\index{integral!triple}
\index{double integral}
\index{triple integral}
\index{integral!surface}
\index{integral!volume}
\index{surface integration}
\index{volume integration}
\index{density}
\index{mass density}
Double integrations arise very frequently in applications.  Triple
integrations arise about as often.  For instance, if $\mu(\ve r) =
\mu(x,y,z)$ represents the position-dependent mass density of some soil,%
\footnote{
  Conventionally, the Greek letter~$\rho$ rather than~$\mu$ is used for
  density.  However, it happens that we shall need the letter~$\rho$ for
  a different purpose later in the paragraph.%
}
then the total soil mass in some rectangular volume is
\[
  M = \int_{x_1}^{x_2} \int_{y_1}^{y_2} \int_{z_1}^{z_2}
  \mu(x,y,z) \,dz\,dy\,dx.
\]
As a concise notational convenience, the last is likely to be written,
\[
  M = \int_V \mu(\ve r) \,d\ve r,
\]
where the~$V$ stands for ``volume'' and is understood to imply a triple
integration.  Similarly for the double integral,
\[
  Q = \int_S f(\we\rho) \,d\we\rho,
\]
where the~$S$ stands for ``surface'' and is understood to imply a double
integration.

\index{space and time}
\index{time and space}
\index{Fourier transform!spatial}
\index{fourfold integral}
\index{sixfold integral}
\index{integral!fourfold}
\index{integral!sixfold}
Even more than three nested integrations are possible.  If we
integrated over time as well as space, the integration would be
fourfold.  A spatial Fourier transform (\S~\ref{fouri:350})
implies a triple integration; and its inverse, another triple: a sixfold
integration altogether.  Manifold nesting of integrals is thus not just
a theoretical mathematical topic; it arises in sophisticated real-world
engineering models.  The topic concerns us here for this reason.

% ----------------------------------------------------------------------

\section{Areas and volumes}
\label{integ:241}
\index{volume}
\index{solid!volume of}

By composing and solving appropriate integrals, one can calculate the
peri\-me\-ters, areas and volumes of interesting common shapes and
solids.

\subsection{The area within a parabola}
\label{integ:241.07}
\index{area}
\index{parabola!area within}
\index{area!within a parabola}

Figure~\ref{integ:241:fig0} depicts an element of the area within the
parabola
\bq{integ:241:071}
  y = ax^2.
\eq
\begin{figure}
  \caption{The area within a parabola.}
  \label{integ:241:fig0}
  \bc
    {
      \nc\xax{-5}
      \nc\xbx{-1.0}
      \nc\xcx{ 5}
      \nc\xdx{ 3.3}
      \nc\ttax{2.1}
      \nc\ttay{0.3}
      \nc\ttby{2.6}
      \nc\ttcx{1.300} % ell
      \nc\ttcy{2.028} % a*ell*ell, a = 1.20
      \nc\ttdx{0.40}
      \nc\ttex{0.60}
      \nc\ttdy{0.192}
      \nc\ttey{0.432}
      \nc\ttm{0.10}
      \nc\ttmx{0.30}
      \nc\ttmy{0.60}
      \nc\ttma{0.40}
      \nc\ttmb{0.80}
      \nc\ttmc{2.00}
      \nc\ttnx{0.30}
      \nc\ttpx{1.85}
      \nc\ttqx{0.50}
      \nc\ttqy{2.35}
      \nc\ttrx{0.10}
      \nc\ttsx{0.30}
      \begin{pspicture}(\xax,\xbx)(\xcx,\xdx)
        \psset{dimen=middle}
        \small
        %\psframe[linewidth=0.5pt](\xax,\xbx)(\xcx,\xdx)%
        \pspolygon[linewidth=0.5pt,fillstyle=solid,fillcolor=lightgray]
          (\ttdx,\ttdy)(\ttdx,\ttcy)(\ttex,\ttcy)(\ttex,\ttey)%
        \psset{linewidth=2.0pt}%
        \psplot[plotpoints=300]{-1.3}{1.3}{
          x dup mul 1.20 mul
        }%
        \psline{C-C}(-\ttcx,\ttcy)(\ttcx,\ttcy)
        \psset{linewidth=0.5pt}%
        \psplot[plotpoints=30]{-1.40}{-1.3}{
          x dup mul 1.20 mul
        }%
        \psplot[plotpoints=30]{1.3}{1.40}{
          x dup mul 1.20 mul
        }%
        \psline(-\ttax,0)(\ttax,0)\uput[r](\ttax,0){$x$}%
        \psline(0,-\ttay)(0,\ttby)\uput[u](0,\ttby){$y$}%
        \rput(0,-\ttmy){%
          \psline(-\ttcx, \ttmb)(-\ttcx,\ttmc)%
          \psline( \ttcx, \ttmb)( \ttcx,\ttmc)%
          \psline(-\ttcx,-\ttm)(-\ttcx,\ttma)%
          \psline( \ttcx,-\ttm)( \ttcx,\ttma)%
          \psline{<-}(-\ttcx,0)(-\ttnx,0)%
          \psline{<-}( \ttcx,0)( \ttnx,0)%
          \rput(0,0){$2\ell$}%
        }%
        \rput(-\ttpx,0){%
          \psline(-\ttm,\ttcy)(\ttm,\ttcy)%
          \psline{<-}(0,0)(0,0.70)%
          \psline{<-}(0,\ttcy)(0,1.20)%
          \rput(0,0.950){$a\ell^2$}%
        }%
        \rput(\ttqx,\ttqy){%
          \psline{->}(-\ttsx,0)(-\ttrx,0)%
          \psline{->}( \ttsx,0)( \ttrx,0)%
          \psline(-\ttrx,-\ttm)(-\ttrx,\ttm)%
          \psline( \ttrx,-\ttm)( \ttrx,\ttm)%
          \rput(0.54,0){$dx$}
        }%
      \end{pspicture}
    }
  \ec
\end{figure}%
The element---which is shaded in the figure---is nearly rectangular (or, if you
prefer, nearly trapezoidal), and indeed is the more nearly rectangular
(trapezoidal) the smaller~$dx$ is made to be.
Evidently, therefore, the element's area is
$A_{\mr{rectangle}} = (a\ell^2-ax^2)dx$.  Integrating the many rectangles, we
find the area within the parabola to be
\[
  \begin{split}
      A_\mr{parabola} &= \int_{x=-\ell}^{\ell} \! A_\mr{rectangle}
      = \int_{-\ell}^{\ell} (a\ell^2-ax^2)dx
    \\&= a\ell^2 \int_{-\ell}^{\ell} \,dx
        - a\int_{-\ell}^{\ell} x^2\,dx
    \\&= a\ell^2\bigg[x\bigg]_{x=-\ell}^{\ell}
        - a\bigg[\frac{x^3}{3}\bigg]_{x=-\ell}^{\ell}.
  \end{split}
\]
But $[x]_{x=-\ell}^{\ell}=(\ell)-(-\ell)=2\ell$
and $[x^3/3]_{x=-\ell}^{\ell}=(\ell)^3/3-(-\ell)^3/3=2\ell^3/3$, so
\bq{integ:241:074}
  A_\mr{parabola} = \frac{4a\ell^3}{3}.
\eq

\subsection{The length of a parabola}
\label{integ:241.08}
\index{length}
\index{parabola!length of}
\index{length!of a parabola}

Section~\ref{integ:241.07} has computed the area within the parabola of
Fig.~\ref{integ:241:fig0}, but what if one wishes instead to compute the
parabola's \emph{length?}  According to Pythagoras,~(\ref{alggeo:pythag}),
\[
  (ds)^2 = (dx)^2 + (dy)^2,
\]
the~$ds$ being an element of the curve's length.  Taking the derivative
of~(\ref{integ:241:071}),
\[
  dy = 2ax\,dx,
\]
so
\[
  (ds)^2 = (dx)^2 + (2ax\,dx)^2,
\]
or, solving for~$ds$,
\[
  ds = dx\sqrt{1+(2ax)^2}.
\]
Integrating,
\[
  s = \int_{x=-\ell}^{\ell}ds
  = \int_{-\ell}^{\ell}dx\sqrt{1+(2ax)^2}
  = 2\int_{0}^{\ell}dx\sqrt{1+(2ax)^2},
\]
the last step of which observes that, symmetrically, the parabola's left
half does not differ in length from its right.  Defining
\[
  u \equiv 2ax,
\]
whose derivative is
\[
  du = 2a\,dx,
\]
permits~$s$ to be expressed in a slightly simpler form,
\bq{integ:241:082}
  s = \frac 1 a \int_{0}^{2a\ell}du\sqrt{1+u^2},
\eq
but after this it is not obvious what should be done next.

\index{hyperbolic arcsine}
Several techniques can be tried, most of which however seem to fail
against an integrand like $\sqrt{1+u^2}$.  Paradoxically, a modified
integrand like $u\sqrt{1+u^2}$, which looks more complicated, would have been
easier to handle, for the technique of%
\footnote{%
    This is a forward reference.  It is given for information.  You
    need not follow it for now, for the present section's logic does
    not depend on it.%
}
\S~\ref{inttx:220}
would have resolved it neatly;
% Do not delete but retain the following, which resolves
% the above aside.
%\[
%  \begin{split}
%    I &= \int_{0}^{t}du\,u\sqrt{1+u^2} \\
%    w^2 &\equiv 1+u^2 \\
%    w\,dw &= u\,du \\
%    I &= \int_{1}^{\sqrt{1+t^2}}w^2\,dw
%  \end{split}
%\]
whereas neither the technique of \S~\ref{inttx:220} nor any of several
others seems to make headway against the simpler-looking~$\sqrt{1+u^2}$.
Nevertheless, after some trial and error, one may recall Table~\ref{cexp:drvi}
which affords a clue.  From the table,\footnote{%
  The table's relevant entry includes a~$\pm$ sign but only
  the~$+$ sign interests us here.  Why only?  Because we shall have to
  choose one branch or the other of the hyperbolic arcsine along which
  to work whether we will or nill.  Nothing prevents us from choosing
  the positive branch.

  You can try the negative branch if you wish.  After some signs
  have canceled, you will find that the negative branch arrives at the
  same result.%
}%
\bq{integ:241:083a}
  \frac{d}{du} \mopx{arcsinh} u = \frac{1}{\sqrt{1+u^2}},
\eq
the right side of which resembles our integrand $\sqrt{1+u^2}$.  To the above
derivative we can append two more,
\begin{eqnarray}
  \frac{d}{du} \sqrt{1+u^2} &=& \frac{u}{\sqrt{1+u^2}},\label{integ:241:083b}\\
  \frac{d}{du} u\sqrt{1+u^2} &=& \sqrt{1+u^2} + \frac{u^2}{\sqrt{1+u^2}},\label{integ:241:083cc}
\end{eqnarray}
computed by the chain and product rules of \S~\ref{drvtv:250}.  The last
includes the expression $u^2/\sqrt{1+u^2}$ which, after adding and
subtracting $1/\sqrt{1+u^2}$, one can alternately write as
$u^2/\sqrt{1+u^2} = (1+u^2)/\sqrt{1+u^2} - 1/\sqrt{1+u^2} = \sqrt{1+u^2}
- 1/\sqrt{1+u^2}$.  Thus,
\bq{integ:241:083c}
  \frac{d}{du} u\sqrt{1+u^2} = 2\sqrt{1+u^2} - \frac{1}{\sqrt{1+u^2}}.
\eq
Not all the derivatives of this paragraph turn out to be useful to the
present problem but~(\ref{integ:241:083a}) and~(\ref{integ:241:083c}) do.  The
average of those two is
\bq{integ:241:084}
  \frac{d}{du} \left(\frac{ u\sqrt{1+u^2} + \mopx{arcsinh} u }{2} \right)
  = \sqrt{1+u^2},
\eq
whose right side matches our integrand.

Why should one care that the right side of the average~(\ref{integ:241:084})
matches our integrand?  Because the match lets one use the fundamental
theorem of calculus,~(\ref{integ:antider}) of \S~\ref{integ:230}.  Applying the
average, according to the fundamental theorem, to~(\ref{integ:241:082}),
\[
  s = \frac 1 a \left[\frac{ u\sqrt{1+u^2} + \mopx{arcsinh} u }{2} \right]_{u=0}^{2a\ell}.
\]
Evaluating,
\bq{integ:241:085}
  s = \ell\sqrt{1+(2a\ell)^2} + \frac{1}{2a}\mopx{arcsinh} 2a\ell,
\eq
or, if you prefer, expanding~$\mopx{arcsinh}(\cdot)$ according to
Table~\ref{cexp:tbl-prop},
\bq{integ:241:086}
  s = \ell\sqrt{1+(2a\ell)^2} + \frac{1}{2a}\ln\left[
        2a\ell + \sqrt{1 + (2a\ell)^2 }\right]
\eq
(in which we have chosen the~$+$ sign for the table's~$\pm$ because the~$-$
sign would have returned a complex length).  This is the parabola's length,
measured along its curve.

That wasn't so easy.  If you are not sure that you have followed it, that's
all right, for you can return to study it again later.  Also, you can
learn more about the parabola in \S~\ref{vector:280.05} and, in
\S~\ref{inttx:440}, more too about the technique by which the present
subsection has evaluated~(\ref{integ:241:082}).  Meanwhile, fortunately,
the next subsection will be easier and also more interesting.  It
computes the area of a circle.

\subsection{The area of a circle}
\label{integ:241.10}
\index{area!surface}
\index{shape!area of}
\index{circle!area of}
\index{area!of a circle}

Figure~\ref{integ:241:fig1} depicts an element of a circle's area.
\begin{figure}
  \caption{The area of a circle.}
  \label{integ:241:fig1}
  \bc
    {
      \nc\xax{-5}
      \nc\xbx{-3}
      \nc\xcx{ 5}
      \nc\xdx{ 3}
      \begin{pspicture}(\xax,\xbx)(\xcx,\xdx)
        \psset{dimen=middle}
        \small
        %\psframe[linewidth=0.5pt](\xax,\xbx)(\xcx,\xdx)
        \nc\xx{2.5}
        \nc\xxc{0.25}
        \nc\xxp{1.8}
        \nc\xxr{2.2361}
        \nc\xxrr{1.10}
        \nc\xxtaa{14}
        \nc\xxta{24}
        \nc\xxtb{33}
        \nc\xxtbb{43}
        \nc\xxs{2.6}
        \nc\xxa{
          \psline[linewidth=0.5pt](-\xx,0)(\xx,0)
        }
        \xxa
        \rput{90}(0,0){\xxa}
        \pswedge[linewidth=0.5pt,fillstyle=solid,fillcolor=lightgray](0,0){\xxr}{\xxta}{\xxtb}
        \pscircle[linewidth=2.0pt](0,0){\xxr}
        \psarc[linewidth=0.5pt]{->}(0,0){\xxp}{\xxtaa}{\xxta}
        \psarc[linewidth=0.5pt]{<-}(0,0){\xxp}{\xxtb}{\xxtbb}
        \rput{\xxtbb}(0,0){
          \uput{\xxc}[u](\xxp,0){\rput{*0}(0,0){$d\phi$}}
        }
        \rput{\xxtb}(0,0){
          \uput[u](\xxrr,0){
            \rput{*0}(0,0){$\rho$}
          }
        }
        \rput[l](\xxs,0){$x$}
        \rput[b](0,\xxs){$y$}
      \end{pspicture}
    }
  \ec
\end{figure}
The element has wedge shape, but inasmuch as the wedge is
infinitesimally narrow, the wedge is indistinguishable from a triangle
of base length~$\rho\,d\phi$ and height~$\rho$.  The area of such a
triangle is $A_\mr{triangle}=\rho^2\,d\phi/2$.  Integrating the many
triangles, we find the circle's area to be
\[
  A_\mr{circle} = \int_{\phi=-\pi}^{\pi} \! A_\mr{triangle}
    = \int_{-\pi}^{\pi} \frac{\rho^2\,d\phi}{2}
    = \left.\frac{\rho^2\phi}{2}\right|_{\phi=-\pi}^{\pi}.
\]
Evaluated,
\bq{integ:241:A-circle}
  A_\mr{circle} = \frac{2\pi \rho^2}{2}.
\eq
(The numerical value of~$2\pi$---the circumference or perimeter of the
unit circle---we have not calculated yet.  We will calculate it in
\S~\ref{taylor:355}.  The reason to write~$2\pi/2$ rather
than the deceptively simpler-looking~$\pi$ is that the symbol~$\pi$
alone obscures the sense in which the circle resembles a rolled-up triangle.
See appendix~\ref{hex}\@.  Sometimes the book uses the symbol~$\pi$ alone,
anyway, just to reduce visual clutter; but that an
alternate symbol like\footnote{%
  \index{Palais, Bob}%
  The symbol~$\palais$ has no name of which the writer is aware.  One might
  provisionally call it ``palais'' after the mathematician who has suggested
  it.~\cite{Palais:2001}%
}
$\palais=2\pi$ is not current is unfortunate.  If such a symbol were current,
then we could have written that $A_\mr{circle} = \palais \rho^2/2$.)

\subsection{The volume of a cone}
\label{integ:241.20}
\index{cone!volume of}
\index{pyramid!volume of}
\index{volume!of a cone or pyramid}

\index{normal vector or line}
\index{vertex}
One can calculate the volume of any cone (or pyramid) if one knows its
base area~$B$ and its altitude~$h$ measured normally%
\footnote{
  \emph{Normally} here means ``at right angles.''
}
to the base.  Refer to Fig.~\ref{integ:241:fig2}.
\begin{figure}
  \caption{The volume of a cone.}
  \label{integ:241:fig2}
  \bc
    {
      \nc\xax{-5}
      \nc\xbx{-1.0}
      \nc\xcx{ 5}
      \nc\xdx{ 2.2}
      \nc\xxa{2.0}
      \nc\xxb{1.2}
      \nc\xxc{0.22}
      \nc\xxdx{1.3}
      \nc\xxdy{1.8}
      \nc\xxex{0.98298}
      \nc\xxey{0.12619}
      \nc\xxf{0.08}
      \begin{pspicture}(\xax,\xbx)(\xcx,\xdx)
        %\psframe[dimen=outer,linewidth=0.5pt](\xax,\xbx)(\xcx,\xdx)
        \psset{dimen=middle}
        \psset{linewidth=1.0pt}
        \small
        \psccurve[linewidth=0pt,linecolor=lightgray,fillstyle=solid,fillcolor=lightgray]
          (-0.8, 0.1)(-1.0,0.0)(-0.8,-0.1)(-0.3,-0.05)(0.5,-0.18)(0.8,-0.1)(1.0,0.0)(0.8, 0.1)(-0.45,0.13)
        \psecurve[linestyle=solid] (-0.8, 0.1)(-1.0,0.0)(-0.8,-0.1)(-0.3,-0.05)(0.5,-0.18)(0.8,-0.1)(1.0,0.0)(0.8, 0.1)
        \psecurve[linestyle=dashed](-0.8,-0.1)(-1.0,0.0)(-0.8, 0.1)(-0.45,0.13)(0.8, 0.1)(1.0,0.0)(0.8,-0.1)
        \psline(-1.0,0)(0.3,1.8)(1.0,0)
        {
          \psset{linewidth=0.5pt}
          \psline[linestyle=dashed](0.3,1.8)(0.3,0)
          \psline[linewidth=0.5pt](0.0,0)(0.0,0.3)(0.3,0.3)
          \rput(0.1,0.8){$h$}
          \psline(0.61,-0.07)(0.75,-0.35)
          \rput(0.79,-0.52){$B$}
        }
      \end{pspicture}
    }
  \ec
\end{figure}
A cross-section of a cone, cut parallel to the cone's base, has the same
shape the base has but a different scale.  If coordinates are chosen
such that the altitude~$h$ runs in the~$\vu z$ direction with $z=0$ at
the cone's vertex, then the cross-sectional area is evidently%
\footnote{
  The fact may admittedly not be evident to the reader at first glance.
  If it is not yet evident to you, then ponder Fig.~\ref{integ:241:fig2}
  a moment.  Consider what it means to cut parallel to a cone's base a
  cross-section of the cone, and how cross-sections cut nearer a
  cone's vertex are smaller though the same shape.  What if the base
  were square?  Would the cross-sectional area not be $(B)(z/h)^2$ in
  that case?  What if the base were a right triangle with equal
  legs---in other words, half a square?  What if the base were some
  other strange shape like the base depicted in
  Fig.~\ref{integ:241:fig2}?  Could such a strange shape not also be
  regarded as a definite, well-characterized part of a square?  (With a
  pair of scissors one can cut any shape from a square piece of paper,
  after all.)  Thinking along such lines must soon lead one to the
  insight that the parallel-cut cross-sectional area of a cone can be
  nothing other than $(B)(z/h)^2$, regardless of the base's shape.
}
$(B)(z/h)^2$.  For this reason, the cone's volume is
\[
  V_\mr{cone}
  = \int_0^h (B)\left(\frac{z}{h}\right)^2\,dz
  = \frac{B}{h^2} \int_0^h z^2\,dz
  = \frac{B}{h^2} \left[\frac{z^3}{3}\right]_{z=0}^{h}
  = \frac{B}{h^2} \left(\frac{h^3}{3}\right)
\]
Evaluating,
\bq{integ:241:V-cone}
  V_\mr{cone} = \frac{Bh}{3}.
\eq

\subsection{The surface area and volume of a sphere}
\label{integ:241.30}

\index{integral!surface}
\index{surface integration}
\index{surface area}
\index{solid!surface area of}
\index{sphere!surface area of}
\index{area!of a sphere's surface}
\index{strip, tapered}
\index{tapered strip}
\index{equator}
Of a sphere, Fig.~\ref{integ:fig-sphere},
one wants to calculate both the surface area and the volume.
\begin{figure}
  \caption{A sphere.}
  \label{integ:fig-sphere}
  \sphere
\end{figure}
\begin{figure}
  \caption[An element of a sphere's surface.]
  {An element of the sphere's surface (see Fig.~\ref{integ:fig-sphere}).}
  %{The Death Star with a square gun.} % say the author's children, 2007
  \label{integ:fig-sphere2}
  \bc
    % Figure bounds:
      \nc\xa{-5.0}\nc\xb{ 5.0}
      \nc\ya{-3.5}\nc\yb{ 3.5}
    \nc\xxr{2.5}    % The sphere's radius.
    \nc\xxrb{2.8}   % Axis extent.
    \nc\xxq{0.30}   % Right-angle symbol size.
    \nc\xxd{0.85}\nc\xxda{0.1}\nc\xxdb{0.3} % rho dimension offsets
    \nc\xxs{0.20}   % Perspective ratio of the x-y circle.
    \nc\xxphir{0.8} % Angle dimension radius.
    \nc\xxc{0.40}
    % Angles.  (The xg is a perspective angle for the x axis.)
      \nc\xxxg    {5} \nc\xxcosxg   {0.99619} \nc\xxsinxg   {0.08716}
      \nc\xxphi  {50} \nc\xxcosphi  {0.64279} \nc\xxsinphi  {0.76604}
      \nc\xxtheta{75} \nc\xxcostheta{0.25882} \nc\xxsintheta{0.96593}
      \nc\xxphib {35} \nc\xxcosphib {0.81915} \nc\xxsinphib {0.57358}
    \setlength\tla{\xxr cm}         % The sphere's radius.
    \setlength\tlb{\xxcostheta\tla} % The                      y coordinate of the point.
    \setlength\tlc{\xxsintheta\tla} % The in-ellipse           x coordinate of the point.
    \setlength\tld{\xxsinphi\tlc}   % The on-paper             x coordinate of the point.
    \setlength\tle{\xxcosphi\tlc}   % The non-x-y-perspectived y coordinate of the z-rho intersection.
    \setlength\tlf{\xxs\tle}        % The x-y-perspectived     y coordinate of the z-rho intersection.
    \setlength\tlg{\xxsintheta\tla}
    \setlength\tlh{\xxcostheta\tla}
    \nc\xxaxisx{ % An axis without the upper extension.
      {
        \psset{linewidth=0.5pt}
        \psline(0,-\xxr)(0,-\xxrb)
      }%
    }
    \nc\xxaxis{ % An axis (vertical by default).
      {
        \xxaxisx
        \psline(0,\xxr)(0,\xxrb)
      }%
    }
    \begin{pspicture}(\xa,\ya)(\xb,\yb)
      \small
      \psset{dimen=middle}
      %\psframe[dimen=outer,linewidth=0.5pt](\xa,\ya)(\xb,\yb) % A figure bounding box.
      %\psdot(1.42,0.25)
      %\psdot(1.89,0.35)
      %\psdot(1.89,-0.32)
      %\psdot(1.41,-0.41)
      % This is an ugly way to fill the region, but it seems to work for
      % this figure.
      {
        \psset{linewidth=2.0pt}
        \pspolygon[linewidth=0.0pt,fillstyle=solid,fillcolor=lightgray]
          (1.42,0.25)(1.89,0.35)(1.91,0.02)(1.89,-0.32)(1.41,-0.41)(1.43,-0.08)
        \localscalebox{1.0}{\xxs}{
          \psarc(0,0){\xxr}{-180}{0}
        }
        \rput(0,\tlh){
          \localscalebox{1.0}{\xxs}{
            \psarc(0,0){\tlg}{-180}{0}
          }
        }
        \rput(0,-\tlh){
          \localscalebox{1.0}{\xxs}{
            \psarc{->}(0,0){\tlg}{-70}{-58}
            \psarc{<-}(0,0){\tlg}{-43}{-31}
          }
        }
        \pscircle(0,0){\xxr} % The outer silhouette of the sphere.
      }
      {
        \psset{linewidth=0.5pt}
        \rput{0} (0,0){\xxaxis} % The z axis.
        \rput{90}(0,0){\xxaxis} % The y axis.
        \rput{90}(0,0){ % (Rotation and rerotation are needed to work around a LaTeX syntax issue.)
          \localscalebox{1.0}{\xxsinphi}{
            % The vertical ellipse.
            \rput{*0}(0,0){
              \psarc(0,0){\xxr}{-90}{90} % The constant-phi arc.
            }%
          }
        }
        \rput{90}(0,0){ % (Rotation and rerotation are needed to work around a LaTeX syntax issue.)
          \localscalebox{1.0}{\xxsinphib}{
            % The vertical ellipse.
            \rput{*0}(0,0){
              \psarc(0,0){\xxr}{-90}{90} % The constant-phi arc.
            }%
          }
        }
      }
      {
        % Again, a bit ugly, but visually it works.
        \psset{linewidth=0.5pt}
        \rput(0,0.17){$\psline{<-}(0,0)(0,\xxc)$}
        \rput(0,-0.50){$\psline{<-}(0,0)(0,-\xxc)$}
      }
      \rput[r](0.75,-1.15){$\rho\,d\phi$}
      \rput[b](0,0.68){$r\,d\theta$}
      \rput(0,3.05){$\hat z$}
      \rput(3.00,0){$\hat y$}
    \end{pspicture}
  \ec%
\end{figure}
For the surface area, the sphere's surface is sliced vertically down the~$z$
axis into narrow, constant-$\phi$, tapered strips (each strip broadest
at the sphere's equator, tapering to points at the sphere's~$\pm z$
poles) and horizontally across the~$z$ axis into narrow,
constant-$\theta$ rings, as in Fig.~\ref{integ:fig-sphere2}.  A surface
element so produced (seen as shaded in the latter figure) evidently has
the area%
\footnote{
  It can be shown, incidentally---the details are left as an
  exercise---that $dS = -r \,dz\,d\phi$ also.  The subsequent
  integration arguably goes a little easier if~$dS$ is accepted in this
  mildly clever form.  The form is interesting in any event if one
  visualizes the specific, annular area the expression
  $\int_{\phi=-\pi}^\pi \,dS = -2\pi r\,dz$ represents: evidently,
  unexpectedly, a precisely equal portion of the sphere's surface
  corresponds to each equal step along the~$z$ axis, pole to pole; so,
  should you slice an unpeeled apple into parallel slices of equal
  thickness, though some slices will be bigger
  across and thus heavier than others, each slice curiously must take an
  equal share of the apple's skin.  (This is true, anyway, if you
  judge Fig.~\ref{integ:fig-sphere2} to represent an apple.  The
  author's children judge it to represent ``the Death Star with a
  square gun,'' so maybe it depends on your point of view.)
}
\[
  dS = (r\,d\theta)(\rho\,d\phi) = r^2\sin\theta\,d\theta\,d\phi.
\]
The sphere's total surface area then is the sum of all such elements
over the sphere's entire surface:
\bqa
  S_\mr{sphere}
  &=& \int_{\phi=-\pi}^{\pi}\int_{\theta=0}^{\pi} dS \xn\\
  &=& \int_{\phi=-\pi}^{\pi}\int_{\theta=0}^{\pi}
    r^2 \sin\theta \,d\theta \,d\phi \xn\\
  &=& r^2 \int_{\phi=-\pi}^{\pi} [-\cos \theta]_0^\pi \,d\phi \xn\\
  &=& r^2 \int_{\phi=-\pi}^{\pi} [2] \,d\phi \xn\\
  &=& 4\pi r^2,
  \label{integ:241:S-sphere}
\eqa
where we have used the fact from Table~\ref{integ:basic-antider} that
$\sin \tau = (d/d\tau)(-\cos \tau)$.

\index{sphere!volume of}
\index{integral!closed surface}
\index{surface integration!closed}
\index{closed surface integration}
Having computed the sphere's surface area, one can find its volume
just as \S~\ref{integ:241.10} has found a circle's area---except that
instead of dividing the circle into many narrow triangles, one divides the
sphere into many narrow \emph{cones,} each cone with base area~$dS$
and altitude~$r$, with the vertices of all the cones meeting at the
sphere's center.  Per~(\ref{integ:241:V-cone}), the volume of one such
cone is $V_\mr{cone}=r\,dS/3$.  Hence,
\[
  V_\mr{sphere} = \oint_S V_\mr{cone} = \oint_S \frac{r\,dS}{3}
  = \frac{r}{3} \oint_S dS = \frac{r}{3} S_\mr{sphere},
\]
where the useful symbol
\[
  \oint_S
\]
indicates \emph{integration over a closed surface.}
In light of~(\ref{integ:241:S-sphere}), the total volume is
\bq{integ:241:V-sphere}
  V_\mr{sphere} = \frac{4\pi r^3}{3}.
\eq
(One can compute the same spherical volume more prosaically, without
reference to cones, by writing $dV=r^2\sin\theta\,dr\,d\theta\,d\phi$
then integrating $\int_V dV$.  The derivation given above, however, is
preferred because it lends the additional insight that a sphere can
sometimes be viewed as a great cone rolled up about its own vertex.  The
circular area derivation of \S~\ref{integ:241.10} lends an analogous
insight: that a circle can sometimes be viewed as a great triangle
rolled up about \emph{its} own vertex.)

% ----------------------------------------------------------------------

\section{Checking an integration}
\label{integ:245}
\index{checking an integration}
\index{integration!checking of}

\index{checking division}
\index{division!checking}
Dividing $\mbox{0x46B}/\mbox{0xD} = \mbox{0x57}$ with a pencil, how
does one check the result?%
\footnote{
  Admittedly, few readers will ever have done much such multidigit
  \emph{hexadecimal} arithmetic with a pencil, but, hey, go with it.  In
  decimal, it's $1131/13 = 87$.

  Actually, hexadecimal is just proxy for binary (see
  appendix~\ref{hex}), and long division in straight binary is kind of
  fun.  If you have never tried it, you might.  It is simpler than
  decimal or hexadecimal division, and it's how computers divide.  The
  insight gained is worth the trial.
}
Answer: by multiplying $(\mbox{0x57})(\mbox{0xD})=\mbox{0x46B}$.
Multiplication inverts division.  Easier than division, multiplication
provides a quick, reliable check.

Likewise, integrating
\[
  \int_{a}^{b} \frac{\tau^2}{2} \,d\tau = \frac{b^3 - a^3}{6}
\]
with a pencil, how does one check the result?  Answer: by
differentiating
\[
  \left[
    \frac{\partial}{\partial b} \left( \frac{b^3 - a^3}{6} \right)
  \right]_{b=\tau} = \frac{\tau^2}{2}.
\]
Differentiation inverts integration.  Easier than integration,
differentiation like multiplication provides a quick, reliable check.

More formally, according to~(\ref{integ:antider}),
\bq{integ:245:20}
  S \equiv \int_{a}^{b} \frac{df}{d\tau} \,d\tau = f(b) - f(a).
\eq
Differentiating~(\ref{integ:245:20}) with respect to~$b$ and~$a$,
\settowidth{\tla}{$\ds -\frac{df}{d\tau}$}
\settowidth{\tlb}{\scriptsize$a$}
\bq{integ:245:24}
  \begin{split}
    \left.\frac{\partial S}{\partial b}
      \right|_{\makebox[\tlb][c]{\scriptsize$b$}=\tau}
      &= \makebox[\tla][r]{$\ds \frac{df}{d\tau}$}, \\
    \left.\frac{\partial S}{\partial a}
      \right|_{\makebox[\tlb][c]{\scriptsize$a$}=\tau}
      &= \makebox[\tla][r]{$\ds -\frac{df}{d\tau}$}.
  \end{split}
\eq
Either line of~(\ref{integ:245:24}) can be used to check an
integration.  Evaluating~(\ref{integ:245:20}) at $b=a$ yields that
\bq{integ:245:26}
  S|_{b=a} = 0,
\eq
which can be used to check further.%
\footnote{
  Using~(\ref{integ:245:26}) to check the example,
  $(b^3 - a^3)/6|_{b=a} = 0$.
}

\index{definite integral}
\index{integral!definite}
\index{indefinite integral}
\index{integral!indefinite}
As useful as~(\ref{integ:245:24}) and~(\ref{integ:245:26}) are, they
nevertheless serve only integrals with variable limits.  They are of
little use to check \emph{definite integrals} like~(\ref{inttx:250:20})
below, which lack variable limits to differentiate.  However, many or
most integrals one meets in practice have or can be given variable
limits.  Equations~(\ref{integ:245:24}) and~(\ref{integ:245:26}) do
serve such \emph{indefinite integrals.}

\index{differentiation!analytical versus numeric}
\index{integration!analytical versus numeric}
It is a rare irony of mathematics that, though numerically
differentiation is indeed harder than integration, analytically
the opposite is true.  Analytically, differentiation is the
easier.  So far, mostly, the integrals the book has introduced have been
easy ones (\S~\ref{integ:241.08} excepted), but chapter~\ref{inttx} will
bring harder ones.  Even experienced mathematicians are apt to err in
analyzing these.  Reversing an integration by taking a relatively easy
derivative is thus an excellent way to check a hard-earned integration
result.

% ----------------------------------------------------------------------

\section{Contour integration}
\label{integ:260}
\index{integral!contour}
\index{contour integration}
\index{path integration}

To this point we have considered only integrations in which the variable
of integration advances in a straight line from one point to another:
for instance, $\int_a^b f(\tau) \,d\tau$, in which the function
$f(\tau)$ is evaluated at $\tau = a, a+d\tau, a+2d\tau, \ldots, b$.  The
integration variable is a real-valued scalar which can do nothing but
make a straight line from~$a$ to~$b$.

\index{$d\ell$}
Such is not the case when the integration variable is a vector.
Consider the integral
\[
  S = \int_{\ve r=\vu x\rho}^{\vu y\rho} (x^2+y^2) \,d\ell,
\]
where~$d\ell$ is the infinitesimal length of a step along the path of
integration.  What does this integral mean?  Does it mean to integrate
from $\ve r=\vu x\rho$ to $\ve r=0$, then from there to $\ve r=\vu
y\rho$?  Or does it mean to integrate along the arc of
Fig.~\ref{integ:260:fig}?  The two paths of integration begin and end at
the same points, but they differ in between, and the integral certainly
does not come out the same both ways.
\begin{figure}
  \caption{A contour of integration.}
  \label{integ:260:fig}
  \index{contour}
  \bc
    {
      \nc\xax{-5}
      \nc\xbx{-3}
      \nc\xcx{ 5}
      \nc\xdx{ 3}
      \begin{pspicture}(\xax,\xbx)(\xcx,\xdx)
        \psset{dimen=middle}
        \small
        %\psframe[linewidth=0.5pt](\xax,\xbx)(\xcx,\xdx)
        \nc\xx{2.5}
        \nc\xxp{1.3}
        \nc\xxq{26.565}
        \nc\xxqq{13.283}
        \nc\xxr{2.2361}
        \nc\xxrr{1.1180}
        \nc\xxrrr{2.3}
        \nc\xxs{2.6}
        \nc\xxc{1.80}
        \psline[linewidth=0.5pt](-\xx,0)(\xx,0)
        \psline[linewidth=0.5pt](0,-\xx)(0,\xx)
        \psline[linewidth=0.5pt,linestyle=dashed]{cc-cc}(0,0)(2,1)
        \psarc[linewidth=2.0pt]{->}(0,0){\xxr}{0}{90}
        \psarc[linewidth=0.5pt]{->}(0,0){\xxp}{0}{\xxq}
        \rput{\xxqq}(0,0){
          \uput[r](\xxp,0){
            \rput{*0}(0,0){$\phi$}
          }
        }
        \rput{\xxq}(0,0){
          \uput[u](\xxrr,0){
            \rput{*0}(0,0){$\rho$}
          }
        }
        \rput[l](\xxs,0){$x$}
        \rput[b](0,\xxs){$y$}
        \rput(\xxc,\xxc){$C$}
      \end{pspicture}
    }
  \ec
\end{figure}
Yet many other paths of integration from~$\vu x\rho$ to~$\vu y\rho$ are
possible, not just these two.

Because multiple paths are possible, we must be more specific:
\[
  S = \int_C (x^2+y^2) \,d\ell,
\]
where~$C$ stands for ``contour'' and means in this example the specific
contour of Fig.~\ref{integ:260:fig}.  In the example, $x^2+y^2=\rho^2$
(by the Pythagorean theorem) and $d\ell=\rho\,d\phi$, so
\[
  S = \int_C \rho^2 \,d\ell
  = \int_0^{2\pi/4} \rho^3\,d\ve\phi = \frac{2\pi}{4}\rho^3.
\]

\index{integral!closed contour}
\index{contour integration!closed}
\index{closed contour integration}
In the example the contour is open, but closed contours which begin and
end at the same point are also possible, indeed common.  The useful
symbol
\[
  \oint
\]
indicates \emph{integration over a closed contour.}  It means that the
contour ends where it began: the loop is closed.  The contour of
Fig.~\ref{integ:260:fig} would be closed, for instance, if it continued
to $\ve r=0$ and then back to $\ve r=\vu x\rho$.

\index{integral!vector contour}
\index{contour integration!of a vector quantity}
Besides applying where the variable of integration is a vector, contour
integration applies equally where the variable of integration is a
complex scalar.  In the latter case some interesting mathematics emerge,
as we shall see in \S\S~\ref{taylor:350} and~\ref{inttx:250}.

% ----------------------------------------------------------------------

\section{Discontinuities}
\label{integ:670}
\index{discontinuity}

\index{Heaviside, Oliver (1850--1925)}
\index{Heaviside unit step function}
\index{unit step function, Heaviside}
\index{$u$}
The polynomials and trigonometrics studied to this point in the book
offer flexible means to model many physical phenomena of interest, but
one thing they do not model gracefully is the simple discontinuity.
Consider a mechanical valve opened at time $t=t_o$.  The flow $x(t)$
past the valve is
\[
  x(t) = \begin{cases}
    0, & t < t_o; \\
    x_o, & t > t_o.
  \end{cases}
\]
One can write this more concisely in the form
\[
  x(t) = u(t-t_o) x_o,
\]
where $u(t)$ is the \emph{Heaviside unit step,}\footnote{%
  Whether $u(0) = 0$, $u(0) = 1/2$ or $u(0) = 1$ seldom
  matters.  The definition as printed has that $u(0) = 1$ for the
  convenience of the Laplace transform of \S~\ref{fouri:200}, but this
  is an artificial reason.  In other contexts, you can alter or ignore
  the definition on the edge as needed.%
}
\bq{integ:670:10}
  u(t) \equiv \begin{cases}
    0, & t < 0; \\
    1, & t \ge 0;
  \end{cases}
\eq
plotted in Fig.~\ref{integ:670:fig-u}.
\begin{figure}
  \caption{The Heaviside unit step $u(t)$.}
  \label{integ:670:fig-u}
  \bc
    \nc\fxa{-3.0} \nc\fxb{3.0}
    \nc\fya{-0.8} \nc\fyb{2.2}
    \begin{pspicture}(\fxa,\fya)(\fxb,\fyb)
      %\psframe[linewidth=0.5pt,dimen=outer](\fxa,\fya)(\fxb,\fyb)
      \nc\xxxab{2.0}
      \nc\xxya{0.5}
      \nc\xxyb{1.5}
      \nc\xxo{0.15}
      \nc\xxc{1.7}
      \nc\xxd{1.1}
      \nc\xxl{0.2}
      {
        \small
        \psset{dimen=middle}
        {
          \psset{linewidth=0.5pt}
          \psline(-\xxxab,0)(\xxxab,0)
          \psline(0,-\xxya)(0,\xxyb)
          \uput[r](\xxxab,0){$t$}
          \uput[u](0,\xxyb){$u(t)$}
          \psline(-\xxl,\xxd)(\xxl,\xxd)
          \uput[l](-\xxl,\xxd){$1$}
        }
        {
          \psset{linewidth=2.0pt}
          \psline(-\xxc,0)(0,0)(0,\xxd)(\xxc,\xxd)
        }
      }
    \end{pspicture}
  \ec
\end{figure}

\index{Dirac, Paul (1902--1984)}
\index{Dirac delta function}
\index{delta function, Dirac}
\index{impulse function}
\index{$\delta$}
\index{mathematics!professional or pure}
\index{mathematics!applied}
\index{professional mathematics}
\index{pure mathematics}
\index{applied mathematics}
\index{Goldman, William (1931--)}
\index{nobleman}
\index{definition}
\index{function}
\index{sifting property}
\index{Dirac delta function!sifting property of}
\index{delta function, Dirac!sifting property of}
The derivative of the Heaviside unit step is the curious
\emph{Dirac delta}
\bq{integ:670:20}
  \delta(t) \equiv \frac{d}{dt}u(t),
\eq
also called%
\footnote{\cite[\S~19.5]{JJH}}
the \emph{impulse function,} plotted in Fig.~\ref{integ:670:fig-d}.
\begin{figure}
  \caption{The Dirac delta $\delta(t)$.}
  \label{integ:670:fig-d}
  \bc
    \nc\fxa{-3.0} \nc\fxb{3.0}
    \nc\fya{-0.8} \nc\fyb{2.2}
    \begin{pspicture}(\fxa,\fya)(\fxb,\fyb)
      %\psframe[linewidth=0.5pt,dimen=outer](\fxa,\fya)(\fxb,\fyb)
      \nc\xxxab{2.0}
      \nc\xxya{0.5}
      \nc\xxyb{1.5}
      \nc\xxo{0.15}
      \nc\xxc{1.7}
      \nc\xxd{1.1}
      \nc\xxl{0.2}
      {
        \small
        \psset{dimen=middle}
        {
          \psset{linewidth=0.5pt}
          \psline(-\xxxab,0)(\xxxab,0)
          \psline(0,-\xxya)(0,0)
          \uput[r](\xxxab,0){$t$}
          \uput[u](0,\xxd){$\delta(t)$}
        }
        {
          \psset{linewidth=2.0pt}
          \psline{->}(0,0)(0,\xxd)
        }
      }
    \end{pspicture}
  \ec
\end{figure}
This function is zero everywhere except at $t=0$, where it is infinite,
with the property that
\bq{integ:670:sift0}
  \int_{-\infty}^{\infty} \delta(t) \,dt = 1,
\eq
and the interesting consequence that
\bq{integ:670:sift}
  \int_{-\infty}^{\infty} \delta(t-t_o) f(t) \,dt = f(t_o)
\eq
for any function $f(t)$.  (Equation~\ref{integ:670:sift} is the
\emph{sifting property} of the Dirac delta.)%
\footnote{
  It seems inadvisable for the narrative to digress at this point to
  explore $u(z)$ and $\delta(z)$, the unit step and delta of a complex
  argument, though by means of Fourier analysis (chapter~\ref{fouri})
  or by conceiving the Dirac delta as an infinitely narrow Gaussian
  pulse (\S~\ref{fouri:130})
  it could perhaps do so.  The book has more pressing topics to treat.
  For the book's present purpose the interesting action of the two
  functions is with respect to the real argument~$t$.

  In the author's country at least, a sort of debate seems to have run
  for decades between professional and applied mathematicians over the
  Dirac delta $\delta(t)$.  Some professional mathematicians seem to
  have objected that $\delta(t)$ is not a function, inasmuch as it lacks
  certain properties common to functions as they define
  them \cite[\S~2.4]{Phillips/Parr}\cite{Doetsch}\@.  From the
  applied point of view the objection is admittedly a little hard to
  understand, until one realizes that it is more a dispute over methods
  and definitions than over facts.  What the professionals seem to be
  saying is that $\delta(t)$ does not fit as neatly as they would like
  into the abstract mathematical framework they had established for
  functions in general before Paul Dirac came along in~1930 \cite[``Paul
  Dirac,'' 05:48, 25~May 2006]{wikip} and slapped his disruptive
  $\delta(t)$ down on the table.  The objection is not so much that
  $\delta(t)$ is not allowed as it is that professional mathematics for
  years after~1930 lacked a fully coherent theory for it.

  It's a little like the six-fingered man in Goldman's \emph{The
  Princess Bride}~\cite{Goldman}\@.  If I had established a definition
  of ``nobleman'' which assumed ``human,'' the latter of
  whose relevant traits in my
  definition included five fingers on each hand, when the six-fingered
  Count Rugen appeared on the scene, then you would expect me to adapt
  my definition, wouldn't you?  By my pre\"existing definition, strictly
  speaking, the six-fingered count is by implication ``not a nobleman'';
  but such
  exclusion really tells one more about flaws in the definition than it
  does about the count.

  Whether the professional mathematician's definition of the
  \emph{function} is flawed, of course, is not for this writer to judge.
  Even if not, however, the fact of the Dirac delta dispute, coupled
  with the difficulty we applied mathematicians experience in trying to
  understand the reason the dispute even exists, has unfortunately
  surrounded the Dirac delta with a kind of mysterious aura, an elusive
  sense that $\delta(t)$ hides subtle mysteries---when what it really
  hides is an internal discussion of words and means among the
  professionals.  The professionals who had established the theoretical
  framework before~1930 justifiably felt reluctant to throw the whole
  framework away because some scientists and engineers like us came
  along one day with a useful new function which didn't quite fit, but
  that was the professionals' problem not ours.  To us the Dirac delta
  $\delta(t)$ is just a function.  The internal discussion of words and
  means, we leave to the professionals, who know whereof they speak.
}

The Dirac delta is defined for vectors, too, such that
\bq{integ:670:30}
  \int_V \delta(\ve r) \,d\ve r = 1.
\eq

% ----------------------------------------------------------------------

\section{Remarks (and exercises)}
\label{integ:680}

The concept of the integral is relatively simple once grasped, but its
implications are broad, deep and hard.  This chapter is short.  One
reason introductory calculus texts run so long is that they include
many, many pages of integration examples and exercises.  The reader who
desires a gentler introduction to the integral might consult among
others the textbook the chapter's introduction has recommended.

\index{exercises}
\index{style}
Even if this book is not an instructional textbook, it seems not meet
that it should include no exercises at all here.  Here are a few.  Some
of them do need material from later chapters, so you should not expect
to be able to complete them all now.  The harder ones are marked with
$\mbox{}^{*}\mbox{asterisks}$.  Work the exercises if you like.
%
\begin{enumerate}
  \item Evaluate
    (a)~$\int_{0}^{x} \tau \,d\tau$;\ \ %
    (b)~$\int_{0}^{x} \tau^2 \,d\tau$.\ \ %
    (Answer: $x^2/2$; $x^3/3$.)
  \item Evaluate
    (a)~$\int_{1}^{x} (1/\tau^2) \,d\tau$;\ \ %
    (b)~$\int_{a}^{x} 3\tau^{-2} \,d\tau$;\ \ %
    (c)~$\int_{a}^{x} C\tau^n \,d\tau$;\ \ %
    (d)~$\int_{0}^{x}
      \linebreak % bad break
      (a_2\tau^2 + a_1\tau) \,d\tau$;\ \ %
    $\mbox{}^{*}$(e)~$\int_1^{x} (1/\tau) \,d\tau$.
  \item $\mbox{}^{*}\mbox{Evaluate}$
    (a)~$\int_{0}^{x} \sum_{k=0}^{\infty} \tau^k \,d\tau$;\ \ %
    (b)~$\sum_{k=0}^{\infty} \int_{0}^{x} \tau^k \,d\tau$;\ \ %
    (c)~$\int_{0}^{x} \sum_{k=0}^{\infty} (\tau^k/k!)
      % bad break
      \linebreak
      \,d\tau$.
  \item Evaluate $\int_0^x \exp \alpha\tau \,d\tau$.
  \item Evaluate
    (a)~$\int_{-2}^5(3\tau^2-2\tau^3) \,d\tau$;\ \ %
    (b)~$\int_5^{-2}(3\tau^2-2\tau^3) \,d\tau$.\ \ %
    Work the exercise by hand in hexadecimal and give the answer in
    hexadecimal.
  \item Evaluate $\int_1^{\infty} (3/\tau^2) \,d\tau$.
  \item $\mbox{}^{*}\mbox{Evaluate}$ the integral of the example of
    \S~\ref{integ:260} along the alternate contour suggested there, from
    $\vu x\rho$ to~0 to $\vu y\rho$.
  \item Evaluate
    (a)~$\int_{0}^{x} \cos \omega\tau \,d\tau$;\ \ %
    (b)~$\int_{0}^{x} \sin \omega\tau \,d\tau$;\ \ %
    $\mbox{}^{*}\mbox{(c)}$%
      \footnote{\cite[\S~8-2]{Shenk}}
      $\int_{0}^{x} \tau\sin \omega\tau
      \,d\tau$.
  \item $\mbox{}^{*}\mbox{Evaluate}$%
    \footnote{\cite[\S~5-6]{Shenk}}
    (a)~ $\int_1^x \sqrt{1+2\tau} \,d\tau$;\ \ %
    (b)~ $\int_x^a [(\cos\sqrt\tau)/\sqrt\tau] \,d\tau.$
  \item $\mbox{}^{*}\mbox{Evaluate}$%
    \footnote{Parts~(a) and~(b) are sourced from \cite[back endpaper]{Shenk}.}
    (a)~$\int_0^x [1/(1+\tau^2)] \,d\tau$ (answer: $\arctan x$);\ \ %
    (b)~$\int_0^x [(4+i3)/\sqrt{2-3\tau^2}] \,d\tau$ (hint: the answer
    involves another inverse trigonometric);
    (c)~$\int_0^x \sqrt{1-\tau^2}\,d\tau$;
    (d)~$\int_0^x \tau\sqrt{1-\tau^2}\,d\tau$ (hint: use a different
    technique than for part~c);
    (e)~$\int_0^x \tau^2\sqrt{1-\tau^2}\,d\tau$ (hint: use a similar
    technique as for part~c).
  \item $\mbox{}^{**}\mbox{Evaluate}$
    (a)~$\int_{-\infty}^x\exp[-\tau^2/2] \,d\tau$; \ \ %
    (b)~$\int_{-\infty}^{\infty}\exp[-\tau^2/2] \,d\tau$.
\end{enumerate}
The last exercise in particular requires some experience to answer.
Moreover, it requires a developed sense of applied mathematical style to
put the answer in a pleasing form (the right form for part~b is very
different from that for part~a).  Some of the easier exercises, of
course, you should be able to work right now.

\index{cleverness}
The point of the exercises is to illustrate how hard integrals can be to
solve, and in fact how easy it is to come up with an integral which no
one really knows how to solve very well.  Some solutions to the same
integral are better than others (easier to manipulate, faster to
numerically calculate, etc.)\ yet not even the masters can solve
them all in practical ways.  On the other hand, integrals which arise in
practice often can be solved very well with sufficient cleverness---and
the more cleverness you develop, the more such integrals you can solve.
The ways to solve them are myriad.  The mathematical art of solving
diverse integrals is well worth cultivating.

Chapter~\ref{inttx} introduces some of the basic, most broadly useful
integral-solving techniques.  Before addressing techniques of
integration, however, as promised earlier we turn our attention in
chapter~\ref{taylor} back to the derivative, applied in the form of
the Taylor series.

