
\chapter{The \index{ Derivative Function} Derivative Function }

In the last section we saw how, given a function $y=f(x)$ and some
particular value of $x$, we can speak of the \index{ derivative} derivative of the function
at $x$, denoted by $f'(x)$.  In geometrical terms, $f'(x)$ is the slope
of the tangent line which grazes the curve at the point $(x,f(x))$.
In this section, instead of taking just one particular value of $x$
(or a few particular values, as in Problem 2 of the last homework), we
let $x$ vary.  That is, we are interested in the rule which for every $x$
in the domain of our function $f(x)$ determines the value of the derivative
$f'(x)$.  That gives us a new function $f'$, called ``$f$ prime'' or ``the
derivative of $f$.''


% example 1:
\begin{example}
Find the derivative function $f'(x)$ for the first function discussed in
the last section: $f(x)=\sqrt{625-x^2}$.

\smallskip

The point on the upper semicircle above $x$ has coordinates
$(x,\sqrt{625-x^2})$.  The radius out to that point has slope $\Delta
y/\Delta x=(\sqrt{625-x^2}-0)/(x-0)=(\sqrt{625-x^2})/x$.  Since the tangent
to the circle at that point is perpendicular to this radius, its slope is
the negative reciprocal, i.e., $-x/\sqrt{625-x^2}$.  Thus,
$f'(x)=-x/\sqrt{625-x^2}$.  For example, if you plug $x=20,\>24,\>-7$, or
$-15$ into this formula, you get the answers to Problem 2 of the last
homework.
\end{example}

Of course, the above calculation depends on the clever geometrical
method for finding the tangent. We need a more reliable method!

{\bf Notation.} There are various other ways to denote the derivative
$f'(x)$.  If $y=f(x)$,
we can also write $y'$, or else $dy/dx$, or $\frac{d}{ dx}f(x)$.  
For example, using the different types of notation in Example~1, where
$f(x)=\sqrt{625-x^2}$, we can write:
\[ 
y'=f'(x)=\frac{dy}{ dx}=\frac{d}{ dx}\Bigl(\sqrt{625-x^2}\Bigr)=
-\frac{x}{\sqrt{625-x^2}}. 
\]


% example 2:

\begin{example}

Find the derivative function for the second function in
the last section: $y=f(t)=t^2$.

\smallskip

The derivative $f'(t)$ is the {\bf \index{ instantaneous velocity} instantaneous velocity }, which we find
by taking the limit as $h=\Delta t$ approaches zero of the \index{ average velocity} average velocity 
during the time interval between $t$ and $t+h$.  That average velocity
is the difference quotient
\begin{align*} 
\frac{\text{distance~traveled}}{\text{time}}
&=\frac{(t+h)^2-t^2}{h} \\
&=\frac{t^2+2t(h)+(h)^2-t^2}{h}
 =\frac{2t(h)+(h)^2}{h}=2t+h. 
\end{align*}
The limit of this as $h$ approaches zero is $2t$.  Thus, $f'(t)=
\disp\frac{d}{dt}\left(t^2\right)=2t$.  In the case of a distance function, the
derivative (the instantaneous velocity) is often denoted with a dot rather
than a prime; so we can write: $\dot{y}=\disp\frac{d}{dt}\left(t^2\right)=2t$.

\end{example}

\bigskip

% example 3

\begin{example}
Find the derivative function for the third function in the last section:
$y=f(x)=1/x$.

\smallskip

We go through the procedure at the end of the last section, but with any
possible $x$ rather than with 2.   The difference quotient --- the slope of
the chord joining the point $(x,1/x)$ on the reciprocal curve to the 
nearby point $(x+h,\,1/(x+h))$ --- is:
\begin{align}
\frac{f(x+h)-f(x)}{h}&=\frac{1/(x+h)-1/x}{h}=
\frac{x(x+h)}{ x(x+h)}\cdot\frac{1/(x+h)-1/x}{h}
=
\notag\\
&=\frac{x-(x+h)}{ x(x+h)h}
=\frac{-h}{ x(x+h)h}=-\frac{1}{ x(x+h)}.
\notag
\end{align}
As $h$ approaches zero, the denominator approaches $x(x+0)=x^2$,
and so we get:
\[ 
    y'=f'(x)=\frac{d}{ dx}\left(\frac{1}{ x}\right)=-\frac{1}{ x^2}. 
\]

\end{example}

In Example 1 we had a special geometrical situation (the tangent being
perpendicular to the radius) which does not apply for any function except
circles.  But in Examples 2 and 3 we had a more general procedure for
finding the derivative function: (1) form the difference quotient;
(2) simplify algebraically; and (3) take the limit as $h$ becomes
smaller and smaller.  In other words, we define the derivative function
$f'(x)$ as follows:
\[ 
  f'(x)=\lim_{h\longrightarrow 0}\frac{f(x+h)-f(x)}{h}.
\]

\smallskip

{\bf Warning.}  If you happen to know a bunch of derivative formulas from
an earlier course, for the time being you should know that they are true but
unproved!
In examples like the ones above and the homework below, you are required
to know how to find the derivative formula starting from our current definition
of the derivative.

\medskip

\section{Corners and \index{ Cusps} Cusps }  
Sometimes one encounters a point in the domain of a function $y=f(x)$ where
there is {\bf no derivative}, because there is no well defined tangent line.
At other times, our limiting process can fail if the tangent is vertical.
First we consider the lack of a well defined tangent.
  
In order
for the notion of the tangent line at a point to make sense, the curve must
be ``\index{ smooth} smooth '' at that point.  This means that if you imagine a particle
traveling at some steady speed along the curve, then the particle does not
experience an abrupt change of direction.  There are two types of
situations you should be aware of --- \index{ corners} corners and cusps --- where there's a
sudden change of direction and hence no derivative.

\medskip

% example 4:
\begin{example}
  Discuss the derivative of the absolute value function $y=f(x)=|x|$.
(This is the function that for negative $x$ drops the minus sign and for
nonnegative $x$ leaves it unchanged.)

\smallskip

If $x$ is positive, then this is the function $y=x$, whose derivative is
the constant 1.  (Recall that when $y=f(x)=mx+b$, the derivative is the
slope $m$.)  If $x$ is negative, then we're dealing with the function $y=-x$,
whose derivative is the constant $-1$.  If $x=0$, then the function has
a corner, i.e., there is no tangent line.  A tangent line 
would have to point in the direction of the curve --- but there are {\it
two} directions of the curve that come together at the origin.  Thus,


\[ 
y'=\frac{d}{ dx}|x|=
\begin{cases}
   1&\text{if $x>0$;}\\
  -1&\text{if $x<0$;}\\
  \text{undefined}&\text{if $x=0$.}
\end{cases}
 \]
\medskip

\begin{centering}
%-----------------------------
\begin{psfigure}{3.00in}{1.75in}{figDA.ps}
\puttext{0,40}{\Small$y=|x|$}
\puttext{80,40}{\Small$y = \disp\frac{d |x|}{dx}$}
\end{psfigure}\\
%----------------------------
\end{centering}
\end{example}

It is worthwhile discussing our difference quotients at $x=0$. We are interested in
$\frac{|0+h|}{h} = \frac{|h|}{h}$. Clearly, this quotient is $1$ if $h>0$ and 
$-1$ if $h<0$. This explains why there is no possible limit as $h \longrightarrow 0$.
We can also imagine limits as $h$ goes to $0$ thru positive values and deduce that
it is $+1$. Similarly, the limit as $h$ goes to $0$ thru negative values is $-1$. In 
this case, it is possible to justify the statement that the function has two tangents
with slopes $1$ and $-1$. More on this later.

% example 5:


\begin{rightindent}{2.5in}
\begin{example}
 The function 
\[
     y=f(x)=x^{2/3}
\]
 pictured at the right has a derivative for every nonzero value of $x$
(which we will find a formula for later), but it does not have a derivative
at the origin, which is a \index{ cusp} cusp.
\end{example}
\end{rightindent}
\hfill
%-----------------------------
\begin{psfigure}{2.0in}{1.35in}{figDB.ps}
\puttext{40,40}{\Small$y=x^{2/3}$}
\end{psfigure}
%----------------------------

From the picture, it appears that this has a vertical tangent given by the
equation $x=0$. The algebraic procedures for establishing this are too complicated
to introduce right now, but we will take it up later.

\bigskip


\section{\index{ Graphical Differentiation} Graphical Differentiation }
Often in applications one has a function $y=f(x)$ which is not given by a
formula at all, but rather by drawing a smooth curve through points
corresponding to a table of experimental data.  Whenever the function
$f(x)$ is given to you as a curve without any formula, you can find the
derivative function $f'(x)$ using a graphical method.  Namely, (1) divide
up the domain of your function into regular intervals; (2) for each $x$
which is an endpoint of an interval, look at the point over $x$ on the
curve; (3) put a small ruler along the curve at that point $(x,f(x))$ so
that it just grazes the curve there (i.e., it is tangent to the curve
there); (4) find the slope of the ruler, by measuring distance up divided
by distance across (for example, if you are doing this against a piece of
graph paper, and if you go over to the right 5 little boxes and up 8 little
boxes, then the slope is 8/5=1.6); (5) tabulate the slopes obtained for all
of the $x$ values; (6) graph these values, drawing a smooth curve between
them.  The curve you draw is the derivative function $f'(x)$.

\newpage
%\bigskip

% example 6:
\begin{example}
Use graphical differentiation to find the graph of $f'(x)$ for the curve
$y=f(x)$ pictured below.

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

\begin{centering}
\begin{psfigure}{\textwidth}{2.5in}{figDC.ps}
\puttext{40,30}{\Small$y = f(x)$}
\end{psfigure}\\
\end{centering}

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

Following the 6-step procedure, we make a table of values of $f'(x)$ for
$x$ at intervals of 0.2 from $-1$ to $1$:

\smallskip

\begin{centering}
\begin{tabular}{crrrrrrrrrrr}
$x$     &-1.0&-0.8&-0.6&-0.4&-0.2&0.0             &0.2&0.4&0.6&0.8&1.0\\
$f'(x)$ &0.3 &0.4 & 0.5 &0.6 &1.0 &\text{infinite}&1.0&0.6&0.5&0.4&0.3
\end{tabular}\\
\end{centering}

\smallskip

\noindent
Note that this is a very approximate procedure, so our values of $f'(x)$
can be relied upon only to 1 or 2 significant figures. The estimates of the 
slopes are also subjective and a function of the accuracy of measurement.

Based on this
table of values, we obtain an approximate graph of the derivative function
$f'(x)$.  Note that the derivative becomes infinite as we get closer and
closer to $x=0$, because the tangent to the curve there is vertical (has
infinite slope).  We say that $f'(0)$ ``does not exist'' (or ``is
infinite'').

\medskip
%-----------------------------

\begin{centering}
\begin{psfigure}{\textwidth}{2in}{figDD.ps}
\puttext{50,25}{$f'(x)$}
\end{psfigure}\\
\end{centering}

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

\end{example}


