\chapter{The \index{ Tangent Line Approximation} Tangent Line Approximation }
 
\section{The \index{ Power Rule} Power Rule }
Before discussing the main theme of this section, we introduce the formula
for the derivative of a \index{ power function} power function, i.e., a function of the form
$y=f(x)=x^n$.  Here $n$ can be anything --- positive or negative, integer
or fraction (or even irrational, like $\pi$).  The formula is:
$f'(x)=n\,x^{n-1}$.  That is,
\begin{equation} 
\frac{d}{ dx}\,x^n=n\,x^{n-1}. 
\tag{Power Rule}
\end{equation}

\smallskip

We shall use this derivative formula in this section, even though we have
not yet explained why it is valid --- this will be done later.  For some
special values of $n$ we did derive this formula in the last section, namely:
\begin{xalignat*}{2}
    &\frac{d}{ dx}x^2=2x,
&
    &\frac{d}{ dx} x^3=3x^2, \notag\\
    &\frac{d}{ dx}\left(\frac{1}{ x}\right) =\frac{d}{ dx}x^{-1}
        =(-1)x^{-2}=-\frac{1}{ x^2},
&
   &\frac{d}{ dx}\,x^1 =1\cdot x^0 = 1. \notag\\
\intertext{Here are some examples of the $n\,x^{n-1}$ formula for other $n$:}
&\frac{d}{ dx}\sqrt{x}=\frac{d}{ dx}x^{1/2}=\frac{1}{ 2}x^{(1/2)-1}
=\frac{1}{2\sqrt{x}},
&
&\frac{d}{ dx}{\root 3\of x}=\frac{d}{ dx}x^{1/3}=\frac{1}{ 3}
x^{-2/3},\notag\\
&\frac{d}{ dx}\left(x^{2/3}\right)=\frac{2}{ 3}x^{-1/3}. 
&&  \notag
\end{xalignat*}
The last of these formulas tells us how to find the slopes of the tangent
lines to the graph of $y=x^{2/3}$ in Example 4.5 of the last section.  As
expected, as $x$ gets closer and closer to 0, the slopes become infinite
(since 0 to a negative power is infinite).



\section{The  Tangent Line Approximation }  

The \index{ tangent line approximation} tangent line approximation is one of the most fundamental uses of the
derivative.  Suppose we have a function $f(x)$ which we can easily evaluate
at some particular $x$.  For example, the function $f(x)=1/x$ has an
obvious value when $x=1$ or when $x=100$; the function $f(x)=\sqrt{x}$ has
an obvious value when $x=4$ or when $x=0.01$.  Now suppose that we want to
evaluate our function not at the easy $x$ but rather at some nearby
$x+\Delta x = x+h$.  For example, we want to find the reciprocal not of $1$ but
rather of $1.01$; or we want to find the square root not of $4$ but rather of
$3.99$.  The tangent line approximation is a way of doing this quickly but
not with perfect precision --- the result will be a little off (the
accuracy depends on the particular function and on the size of $\Delta x$
--- the smaller the $\Delta x$ the better the accuracy).

\smallskip

In a tangent line approximation problem we will know $f(x)$ and want to
find $f(x+h)$.  The derivative $f'$ will also be relatively easy to
compute at the point $x$.  The formula derived below expresses $f(x+h)$
in terms of $f(x)$,$f'(x)$ and of course $h$.  

\smallskip

To derive the formula, we draw a picture of our situation:

\bigskip

%--- figure EA --------------------------------------------------
\begin{centering}
\begin{psfigure}{\textwidth}{2in}{figEA.ps}
\puttext{0,50}{\Small$(x+h,f(x) + f'(x) h)$}
\put(8,45){\vector(3,-1){10}}

\puttext{13,12}{\Small$\Delta x=h$}
\puttext{30,23}{\small$\Delta y$}

\puttext{0,-55}{\Small$x$}
\puttext{25,-55}{\Small$x+h$}
\puttext{-75,17}{\Small$f(x)$}
\puttext{-85,35}{\Small$f(x+h)$}

\end{psfigure}\\

\medskip

\
\end{centering}
%----------------------------------------------------------------




\noindent
We want to find the $y$-coordinate of the point on the curve above $x+h$.
Physically, we can get to that point by starting at our known point
$(x,f(x))$ and following the curve until we go a horizontal distance $h=\Delta x$ 
to the right (we go to the left if $h$ is negative).  In doing
this, we move upward a distance $\Delta y=f(x+h)-f(x)$.  If we
can determine $\Delta y$, then we know what to add to our known value
$f(x)$ to get the value we're interested in: $f(x+h)$.
Now $\Delta y/h$ is the slope of the chord joining the two points
on the curve.  The idea of the tangent line approximation is to use instead
the slope of the tangent line to the curve at the point $(x,f(x))$.  (This
will give us a slightly different value for the change in $y$ --- namely,
it gives us
the change in $y$ if we were to follow the tangent line rather than the
actual curve when we move to the right a horizontal distance of $h$.)
That is,
\begin{align*}
\text{(slope of chord)}&\approx(\text{slope of tangent line})\\
\intertext{or}
\frac{\Delta y}{h}&\approx f'(x) \,.  \\
\intertext{And so }
\Delta y &\approx f'(x) \, h \,.
\end{align*}
This gives us the {\bf (VERY IMPORTANT!) }
{\bf tangent line approximation} formula


\begin{centering}
\medskip
\fbox{  $\displaystyle 
    f(x+h)=f(x)+\Delta y\approx f(x)+(h)f'(x).$}\\

\medskip
\end{centering}



In using this formula, the basic steps are: (1) decide what your function
$f$ is in the given problem,
and what you're taking for $x$ and $x+h$; (2) find the
derivative $f'(x)$; and (3) evaluate the formula.


\medskip

%Example 1.
\begin{example}
Find $2.1^3$.

\smallskip

Here our function is $f(x)=x^3$, which we can evaluate in our heads at the
point $x=2$, namely $f(2)=2^3=8$.  We want to know its value at the nearby
point $x+h=2.1$.  Thus, $h=0.1$.  In the \index{ tangent line
approximation formula} tangent line
approximation formula, we need to know $f'(x)$.  Now $\frac{d}{ dx}x^3=3x^2$
(Use the Power Rule
above).  Hence $f'(x)=f'(2)=3\cdot 2^2=12$.  We are now ready to use the
tangent line approximation formula:
\[ 
    f(2+0.1)\approx f(2)+(0.1)f'(2)=8+0.1\cdot 12=9.2. 
\]

\smallskip

Of course, we could easily find $(2.1)^3$ more exactly by calculator (or precisely
by multiplying by hand): the result is 9.261.


%--- figure EB --------------------------------------------------
\begin{centering}
\begin{psfigure}{\textwidth}{2.75in}{figEB.ps}
\end{psfigure}\\
\end{centering}
%----------------------------------------------------------------

\noindent
Since the tangent line approximation does not give the exact answer, and
since we could have found $2.1^3$ easily enough without it, you might
wonder why one bothers with the tangent line approximation.  There are
several answers: (1) In easy examples, with experience you can perform the
tangent line approximation in your head, thereby getting a better ``feel''
for how the function changes when you make a small change from $x$ to
$x+h$.  For instance, in Example 5.1 we can say that ``the cube of a
number near 2 is going to be near 8, and the difference between the cube
and 8 is going to be about 12 times the difference between our number and
2.''  (2) In many practical applications, the tangent line approximation
gives simple answers to questions about experimental error, especially {\it
percent error}.  (3) Later on, in the section on implicit functions, we
will encounter examples where $y$ cannot be written in terms of $x$, and so
there is no way to evaluate the $y$-coordinate of the point on the curve
above $x+h$ except through an approximation method, such as the
tangent line approximation.

A more important answer will come much later. A generalization of the tangent
line approximation will develop into a systematic method for calculation
with any desired precision and this will explain what your calculators
or computers are doing. This is the topic concerning \index{ Taylor polynomials} Taylor polynomials.
In fact, the method can finally be pushed into making precise power series 
expansions of most functions. This will come much later!

In other words, do not look down upon the imprecise answers, we are just 
warming up!

\end{example}



%Example 2.
\begin{example} 
Find $1/4.99$.

\smallskip
Here we're interested in evaluating the reciprocal function very near to an
$x$-value whose reciprocal we can evaluate in our heads, namely:
$f(5)=1/5=0.2$.  That is, our function is $f(x)=1/x$, our $x$ is 5, and
$x+h=4.99$, i.e., $h=-0.01$.  Since
$f'(x)=-1/x^2=-1/25=-0.04$, we have:
\begin{align*} 
1/4.99&=f(4.99)=f(5+(-0.01))\approx f(5)+(-0.01)f'(5)\\
      &=0.2-0.01\cdot(-0.04)= 0.2004. 
\end{align*}
Using a calculator, we can find a better value:
$1/4.99=0.200400801\cdots$.  A more sophisticated calculation can do better:
$0.20040080160320641282565130$. Thus, in this case the tangent line
approximation is accurate to 5 decimal places.

You should consider the question of what decimal expansion, if any, would be a 
completely precise answer? ({\bf Hint:} In this case, it is a \index{ recurring decimal} recurring decimal 
with a pattern of $498$ digits!)

\end{example}



%Example 3
\begin{example}

On the circle of radius $10$ centered at the origin find a point in the first
quadrant whose $x$-coordinate is $6.01$. Also, do the same for $x=5.99$.

\smallskip
First the point $x=6.01$.
Here we know the ``easy point'' $(6,8)$ on the circle, and we want to know
the $y$-coordinate of the nearby point $(6.01,?)$.  The function is
$y=f(x)=\sqrt{100-x^2}$, our $x$ is 6, and our $x+h=6.01$, i.e.,
$h=0.01$.  Using the technique in the last section (e.g., Problem 1
on the homework), we can find the derivative: $f'(x)=-x/\sqrt{
100-x^2}=-6/\sqrt{100-6^2}=-0.75$.  Thus, the tangent line approximation
tells us that $f(6.01)\approx f(6)+0.01\cdot f'(6)=8+0.01(-0.75)= 7.9925$.
(A more precise value, computed by calculator, is $7.992490225\cdots$.)

The point $x=5.99$ can be done similarly by taking $h=-0.01$ instead.
So, we get $f(5.99)\approx 8+(-0.01)(-0.75)=8.0075$.
(A more precise value, computed by calculator, is $8.0074902435\cdots$.)
 


\end{example}



%Example 4
\begin{example}

 If $1$ quart equals $0.9464$ liter, and $1$ liter of water occupies exactly $1000$
cc (cubic centimeters), i.e., a cubic container $10$ cm on a side, then what
are the dimensions (in cm) of a cubic container that holds $1$ quart of
water?

\smallskip

In a story problem like this, we must first analyze the operation that is
being performed.  The question can be reworded as follows: if a cube
holding 1000 cc has side 10 cm, then what is the side of a cube holding
$0.9464$ as much?  The process of going from the volume to the side is the
cube-root function.  Since ``$0.9464$ as much as $1000$ cc'' obviously means
$946.4$ cc, we can rephrase the question once again: if the cube-root of 1000
is $10$, then what is the cube-root of $946.4$?  


Let $s$ be the length of the side of the cube and $V$ its volume, then
\[
      s = f(V) = \sqrt[3]{V} \,.
\] 
In the tangent line approximation we take $V=1000$ and $V+\Delta V=946.4$,
i.e., $\Delta V=h=-53.6$.  By the Power Rule, we have $f'(V)=\frac{1}{
3}V^{-2/3}$.  When $V=1000$, we have $1000^{-2/3}=1/100$, and so 
$f'(1000)=1/(3\cdot 100)=1/300$.  So the tangent line approximation says
that ${\root 3 \of{946.4}}=f(946.4)\approx f(1000)+(-53.6)\cdot f'(1000)
=10-53.6/300=9.821$ cm.  (Note: a more exact value obtained by calculator is
$9.81804256\cdots$.)


{\em Alternate Method.} Write $V = s^3$. Then by the tangent line
approximation $\Delta V \approx 3s^2\Delta s$. Since $s = 10$ and $\Delta V =
-53.6$, we have $-53.6 \approx 300 \Delta s $.
Solving for $\Delta s$ gives $\Delta s \approx -0.179$, so
$(\text{new }s) = 10 + \Delta s \approx 10 - 0.179$ $= 9.821$ cm.

This method illustrates an important concept. It is often easier to use
a relation between quantities, rather than one explicit functional 
evaluation. Solving explicitly for $s$ was not necessary and indeed led to
more complicated calculations!

\end{example}


The next example involves {\it \index{ percent error} percent error }.  If you measure a value $x$,
then the error (meaning the maximum possible error, or perhaps the maximum
error that is likely) is the amount by which the true value could possibly
differ from your measured value.  We shall denote the error $\Delta x$.  In
most cases the true value could be on either side of the measured value, so
the error is actually $\pm \Delta x$.  By the {\bf percent error} we mean
the percent that this error is of the measured value, namely:
\[
     \text{percent~error}=100\frac{\Delta x}{ x}.
\]
For example, if you measure the speed of a car to be 50 mph to within 1 mph
on either side, that means you have a percent error of $\pm 100(1)/50=\pm 2\%$.  
If you
know the percent error, say $\pm p\%$, then to convert this to absolute
error $h$, use the formula: $\Delta x =\frac{p}{ 100}x$.

The reason for using the percent error is that it is a more realistic estimate
of the error size. For instance an error of $10$ feet in measuring a mile is 
not as serious as an error of $10$ feet in measuring off a football field
of $100$ yards! The former percent error is only $100(10)/5280=0.189$, but the
latter is $100(10)/300=3.333$.

%Example 5
\begin{example}

 If you determine the length of a side of a cubic container by measuring
the volume of liquid it holds, then an error of $\pm 1\%$ in measuring the
volume will lead to what percent error in your value for the length of a
side?  An error of $\pm p\%$ will lead to what percent error for the side?

\smallskip

This is a lot like Example 5.4.  Again our process is: starting with the
volume of a cube, determine its side.  That is, our function is again the
cube-root function.  But we're not given any concrete values --- and to
answer the question we don't need any.

\smallskip

So let $V$ stand for the measured value of the volume, and let $s=f(V)=
{\root 3 \of V}$ be the length of a side.  We want to know the error
$\Delta s$ that is caused if $V$ is replaced by $V\pm\Delta V$, where
$\Delta V$ is a 1\% error, i.e., $\Delta V=0.01V$.  Actually, what we want
to know is the {\it percent} error in the side $s$, i.e., $100 (\Delta
s)/s$.  According to the tangent line approximation,
\[ 
   \Delta s\approx f'(V)\Delta V=\frac{1}{ 3}V^{-2/3}\cdot 0.01V
  =
\frac{1}{ 3}\cdot 0.01{\root 3\of V}, 
\]
where the last equality comes from the rule of exponents: $V^{-2/3}\cdot
V=V^{-2/3}\cdot V^1=V^{-2/3+1}=V^{1/3}={\root 3 \of V}$.  But ${\root 3\of
V}$ is precisely the value $s=f(V)$.  So our percent error in $s$ is
\[ 
  100\frac{\Delta s}{ s}\approx 100 \left(\frac{1}{ 3}\right)\frac{0.01{\root 3\of V}}{ s}
  =
\frac{1}{ 3}\%. 
\]
If we take $-\Delta V$ in place of $\Delta V$, we get $-1/3\>\%$.  Thus,
the percent error in $s$ is $\pm\frac{1}{ 3}\%$.  This answers our first
question.

\smallskip

If the error in $V$ is $\pm p\%$ instead of $\pm 1\%$, everything would go
through the same way, except with a factor of $p$ everywhere:
\[ 
100\frac{\Delta s}{ s}\approx 100\frac{f'(V)\Delta V}{ s}=
100\frac{(1/3)V^{-2/3}\cdot 0.01p\,V}{s}=\frac{1}{ 3}p, 
\]
so the error in $s$ is $\pm\frac{1}{ 3}p\%$.  That is, {\it a certain percent
error in measuring the volume of a cube leads to a percent error one-third
as great in the value computed for the side.}

\end{example}


{\bf Note.} 
Notice where the $1/3$ came from in the last example: the
exponent in $x^{1/3}$ that comes down in the rule for the derivative of
$x^n$.  In the same way, it turns out that whenever your function is of the
form $y=f(x)=Cx^n$ (where $C$ is any constant), there is a simple
relationship between the percent error in your measurement of $x$ and the
percent error in $y$ obtained using the tangent line approximation.  More
examples of this will show up in the homework.
 

