\chapter[The exponential function]{The Number $e$ and the Exponential Function}
\index{the exponential function}
The number $e$ is a \index{fundamental constant of mathematics} fundamental constant of mathematics, every bit as
important as $\pi$.  It is defined as follows: {\bf e is the number whose
natural logarithm is exactly 1}.  That is: $\ln e=1$.  In geometric terms,
this says that you look at the area under the reciprocal function $y=1/x$
between 1 and $a$, and move the upper limit of integration $a$ to the right
until you get an area of 1.  (See the drawing below).  It is not hard to
see that $e$ is somewhere between 2 and 3 (see Problem 1 at the end of the
section).  The value of $e$ to several decimal places is:
$e=2.71828\cdots$.  (The exact value cannot be given in decimal form, since
$e$, like $\pi$, is an irrational number.)

\begin{center}
%-figure KA -----------------------------
\begin{psfigure}{3in}{2in}{figKA.ps}
%\putcrosshair{0,0}
\puttext{-20, 10.}{\Small $\displaystyle y = \frac{1}{x}$}
\puttext{-10, -20}{\Small Area $=1$}
\puttext{13, -30}{\Small $e$}
\end{psfigure}\\
%------------------------------
\end{center}

In Chapter~8, we obtained the following relationship between the natural
logarithm and the log-to-the-base-$a$: $\ln x=\ln a\cdot\log_ax$.  In the
special case $a=e$, since $\ln e=1$ this gives us $$\ln x=\log_ex,$$ in
other words, {\it the natural logarithm is the same as the logarithm to the
base e}.  That is, $\ln x$ is equal to the power to which $e$ must be
raised to get $x$.  This can be expressed in the form $e^{\ln x}=x$, and
also in the form $\ln(e^x)=x$.  In other words, {\it the functions $\ln x$
and $e^x$ are inverse functions}.  We shall return to this later.

\smallskip
\index{bank interest problem}
There is another way to come up with the number $e$, which we shall explain
using bank interest.  Suppose that you put an initial amount of money $P$
(called the ``principal'') in the bank at time $t=0$.  Suppose that the
bank pays exactly 100\% annual interest (this is not as unreasonable as it
may seem, if you happen to live in a country with high inflation),
compounded $n$ times per year.  If $n=1$, then the money simply sits in the
bank for one year without increasing, at which point you get your 100\%
interest; that is, you have $2P$ in the bank after the first year is up.
If $n=2$, then after 6 months the money in the bank increases from $P$ to
$1.5\,P$ (that is, after half a year you get 50\%), and after another 6
months the money in the bank increases from $1.5\,P$ to $1.5\cdot
1.5\,P=2.25\,P$ (that is, you get another 50\%, this time of a greater
amount).  In general, if the interest is compounded $n$ times in the year,
then every $1/n$ years whatever sum you have in the bank is multiplied by
$\left(1+\frac{1}{ n}\right)$.  After 1 year the amount in the bank is
$$\left(1+\frac{1}{ n}\right)^nP.$$ For example, if $n=12$ (monthly
compounding), then you have $2.613\,P$ after 1 year; if $n=365$ (daily
compounding), then you have $2.71457\,P$ after 1 year; if $n=31536000$
(compounding every second), then you have $2.71828\,P$ after 1 year; and
the larger $n$ is (i.e., the more frequently the compounding occurs) the
more money you have.  However, this amount does not increase without bound.
Rather, as $n\longrightarrow\infty$ the amount you have in the bank after 1
year becomes closer and closer to $e\,P=2.71828\cdots P$.  (In the next
paragraph we explain why the value gets closer and closer to $e\,P$.)
Taking the limit as $n$ goes to infinity is called ``continuous
compounding.''  For all practical purposes, compounding every second is
equivalent to \index{continuous compounding} continuous compounding, and even daily compounding is close
to continuous compounding.

\smallskip

To see why the limiting value as $n\longrightarrow\infty$ is $eP$, we
compute the limit as $n\longrightarrow\infty$ of $(1+(1/n))^n$.  Instead of
looking at this power, let us take its natural log and find the limit of
that:
\begin{align*} 
\lim_{n\longrightarrow\infty}\ln\left((1+(1/n))^n\right)=&
\lim_{n\longrightarrow\infty}\frac{\ln\left(1+\frac{1}{n}\right)}{ 1/n} \,.
\end{align*}
But this is the slope of the chord on the graph of $y=\ln x$ joining the
points $(1,0)$ and $(1+\frac{1}{ n},\ln(1+\frac{1}{ n}))$.  As $n$ increases,
this chord approaches the tangent line to the curve at $x=1$, and so this
slope approaches the derivative at $x=1$, which is 1 (since $\frac{d}{ dx}\ln
x=\frac{1}{ x}$).  Thus, as $n\longrightarrow\infty$, the $\ln$ of
$(1+(1/n))^n$ approaches 1.  Thus,
$\lim_{n\longrightarrow\infty}(1+(1/n))^n$ is equal to the number whose
$\ln$ is 1, namely $e$: $$\lim_{n\longrightarrow\infty}\left(1+\frac{1}{
n}\right)^n=e.$$

\smallskip

Let us return to the bank interest problem, and ask how much money is in
the bank after $t$ years.  In $t$ years the interest is compounded $nt$
times, so that the amount in the bank is $$\left(1+\frac{1}{
n}\right)^{nt}P=\left(\left(1+\frac{1}{ n}\right)^n\right)^tP.$$ If the money
is ``compounded continuously,'' i.e., we take the limit as
$n\longrightarrow\infty$, then this amount is simply $e^tP$.

\smallskip

(In practice, most banks compound money daily: $n=365$.  We shall always
assume, however, that the money is compounded ``continuously,'' i.e.,
$n=\infty$.  As a practical matter, there is very little difference.  For
example, even at the high interest rate of 100\%, with daily compounding
\$1000 grows to \$2714.57 in a year, while with continuous compounding
it grows to \$2718.28.  With lower interest rates, the difference between
\index{daily compounding} daily compounding and continuous compounding is even less.)

\smallskip

\noindent
\begin{rightindent}{3.0 truein}
 
The function $e^x$ is called the {\bf \index{exponential function} exponential function}.  It is the
inverse function of $\text{log}_e$, which we saw is the natural log
function ~ln.
In other words, to say that $y=e^x$ is equivalent to saying that $x=\ln y$.
In the graph at the right we show the graphs of $e^x$ (solid line) and $\ln x$
(dotted line).  As always with inverse functions, these two graphs are the
mirror images of one another with respect to the line $y=x$.
\smallskip


 
The function $y=f(x)=e^x$ has a very basic property, which we discover when we 
\end{rightindent}
\hfill
%-figure KB -----------------------------
\begin{psfigure}{2.5in}{2.0in}{figKB.ps}
%\putcrosshair{0,0}
\puttext{33.3, 46.7}{\Small $y = e^{x}$}
\puttext{53.3, 10.}{\Small $y = \ln x$}
\end{psfigure}
%------------------------------

\noindent
find its derivative $y'$.  To find this derivative, we start with the
relation $x=\ln y$, and take $d/dx$ of both sides: 
$$
1=\frac{1}{ y}~\frac{dy}{ dx},\qquad\text{so~that}\qquad\frac{dy}{ dx}=y,\qquad
\text{i.e.,}\qquad\frac{d}{ dx}\,e^x=e^x.
$$
That is, the function $y=e^x$ has the very special property that {\it its
derivative is the very same function.} It turns out that there is no other
function --- except for constant multiples $Ce^x$ --- that has this
property.


\section[Properties]{Some Properties of the Exponential Function}
\index{properties of the exponential function}
By the law of exponents, if $A$ and $B$ are any numbers or expressions,
then 
\begin{equation}
e^A\cdot e^B=e^{A+B};\qquad e^A/e^B=e^{A-B};\qquad
\left(e^A\right)^B= e^{AB}.
\tag{Property 1}
\end{equation}

Because ~ln~ and the exponential function are inverse functions,
\begin{equation}
\ln(e^A)=A;\qquad e^{\ln A}=A.
\tag{Property 2}
\end{equation}

By the chain rule, 
\begin{equation}
\frac{d}{ dx} e^{u(x)}=e^{u(x)}u'(x).
\tag{Property 3}
\end{equation}

Since $\frac{d}{ dx}e^{kx}=ke^{kx}$ (by (3) with $u(x)=kx$), it follows
that 
\begin{equation}
\int e^{kx}dx=\frac{1}{ k}e^{kx}+C.
\tag{Property 4}
\end{equation}

\begin{example}
\label{eg:10.1}

Find the center of mass of a uniform plate bounded by the
lines $x=0$, $x=2$ and the curves $y=1/2^x$ and $y=-1/2^x$.

\smallskip

By symmetry, the center of mass is on the $x$-axis.  Its $x$-coordinate is
$$
\overline{x}=\frac{\int_0^2\frac{x}{ 2^x}dx}{\int_0^2\frac{dx}{ 2^x}}=
\frac{\int_0^2xe^{-(\ln 2)\>x}dx}{\int_0^2e^{-(\ln 2)\>x}dx},
$$ 
where we have
used properties (1) and (2) to write $1/2^x$ as $e^{-(\ln 2)\>x}$.  We next
use property (4) with $k=-\ln 2$ to find the bottom integral, and then
the trapezoid rule (with $n=4$) to find the top integral: 
$$
\int_0^2e^{-(\ln
2)\>x}dx=-\frac{1}{\ln 2}e^{-(\ln 2)\>x}\Big|_0^2= -\frac{1}{\ln 2}\frac{1}{
2^x}\Big|_0^2=\frac{1-(1/4)}{\ln 2}=1.08202;
$$ 
$$
\int_0^2\frac{x}{ 2^x}dx \approx
\frac{1}{ 2}\left( 0+\frac{0.5}{\sqrt{2}}+\frac{1}{ 2}
   +\frac{1.5}{ 2\sqrt{2}}+\frac{1}{ 2}\cdot
\frac{2}{ 2^2}\right)=\frac{5}{ 16}\sqrt{2}+\frac{3}{ 8}=0.81694.
$$ 
(Note: this last
integral can be evaluated precisely by the method of integration by parts,
which we will get to in about a week; it turns out that the exact value is
$-1/(2\ln 2)+3/(2\ln 2)^2=0.83968$.)  Finally,
$\overline{x}=0.83968/1.08202=0.77603$.

\end{example}


\begin{example}
\label{eg:10.2}

Sketch the curve $f(t)=e^{-t/T}\cos(\omega t)$ for $t>0$ (where
$\omega$ and $T$ are constants).  For simplicity, take $T=1$ sec.

\smallskip

To get an idea of what to expect, let's sketch the two functions whose product
is $f(t)$.  The graph of $y=e^{-t}$ is obtained by reflecting the graph of
$y=e^t$ (shown above) about the $y$-axis.  The graph of $\cos(\omega t)$
is obtained by squeezing the graph of $\cos t$ by a factor of $\omega$ toward
the $y$-axis (e.g., horizontal contraction by a factor of 5 if $\omega=5$,
horizontal expansion by a factor of 5 if $\omega=1/5$).  The graphs of
$y=e^{-t}$ and $y=\cos(5t)$ are shown below:

\begin{center}
%-figure KC -----------------------------
\begin{psfigure}{3in}{1.5in}{figKC.ps}
%\putcrosshair{0,0}
\end{psfigure}\\
%------------------------------
\end{center}

\noindent
The effect of multiplying $\cos(\omega t)$ (which oscillates between $1$ and
$-1$) by $e^{-t}$ (which steadily decreases from 1 to 0) is to obtain a
function which oscillates between maximum and minimum values ({\it local
maxima and minima}) that are steadily decreasing.  This type of function
$f(t)$, called ``damped harmonic oscillation,'' arises in practice, for
example, if you want to describe the motion of an object at the end of a
spring which is bouncing back and forth with amplitude that decreases
because of friction and air resistance.

\smallskip

Now let us determine the $t$-values for which our function $f(t)$ has
max/min points and points of inflection.  To find the max/min points, we
set $f'(t)=0$: 
$$
0=\frac{d}{dt}
e^{-t}\cos(\omega t)=-e^{-t}\cos(\omega t)+e^{-t}(-\omega\sin(\omega t))=
-e^{-t}(\cos(\omega t)+\omega\sin(\omega t)).
$$ 
Since $e^{-t}$ is never 0, this derivative vanishes when
$\cos(\omega t)+\omega\sin(\omega t)=0$, i.e. (if we divide through by
$\omega\cos(\omega t)$), when $\tan(\omega t)=-1/\omega$.  Thus, our
solutions $t$ are all positive values (in radians) of arctan$(-1/\omega)$,
divided by $\omega$.  For example, if $\omega=5$, then we
successively obtain a minimum at $t=0.589$, a maximum at $t=1.217$, a
minimum at $t=1.845$, a maximum at $t=2.474$, and so on.  To find the
inflection points, we set $f''(t)=0$, i.e. (after a little simplification):
$$
e^{-t}\bigl((1-\omega^2)\cos(\omega t)+2\omega\sin(\omega t)\bigr)=0.
$$ 
Thus, the points of
inflection occur when 
$t=\frac{1}{ \omega}\,$arctan$\left(\frac{\omega^2-1}{2\omega}\right)$.  For example, if $\omega=5$, then
$t=0.2\,$arctan$\,2.4=0.235,0.864,1.492,2.120$, etc.  The curve
$y=e^{-t}\cos(5t)$ is sketched at the top of the next page.

\begin{center}
%-figure KD-----------------------------
\begin{psfigure}{4in}{2in}{figKD.ps}
%\putcrosshair{0,0}
\puttext{-33.3, 33.3}{\Small$y = e^{-t}\cos(5 t)$}
\end{psfigure}\\
%------------------------------
\end{center}

\end{example}

