
\chapter{Rules For Finding Derivatives}


\section{\index{ Linearity of the Derivative} Linearity of the Derivative }  
This means two things:

\begin{enumerate}
\item
If you know the derivative $f'(x)$ of a function $f(x)$, then the
derivative of a constant multiple $cf(x)$ is simply $cf'(x)$.  {\it The
derivative of a constant $c$ times a function is equal to $c$ times the
derivative of the function}:
\[ 
\frac{d}{ dx}\bigl(cf(x)\bigr)=c\frac{d}{ dx} f(x). 
\] 
This principle is obvious if you think of the derivative as a rate of
change.  For example, it says that if $f(t)$ is the distance function for a
\index{ bicycle} bicycle, and if the distance function for a car is always 5 times the
distance for the bicycle, then the \index{ car} car must be going at 5 times the
velocity of the bicycle: 
\[
        \frac{d}{ dt}\bigl(5f(t)\bigr)= 5\frac{d}{dt}f(t)\,.
\]

\smallskip

\item
If you know the derivatives $f'(x)$ and $g'(x)$ of two functions
$f(x)$ and $g(x)$, then the derivative of the sum $f(x)+g(x)$ is
simply $f'(x)+g'(x)$.  {\it The derivative of the sum of two functions is
equal to the sum of the derivatives of the functions}:
\[ 
\frac{d}{ dx}\bigl(f(x)+g(x)\bigr)=\frac{d}{ dx}f(x)+\frac{d}{ dx}g(x). 
\]
This principle is also obvious when one thinks of rates.  It says that
the rate at which the sum of two distances is changing is equal to the
sum of the rates at which each distance is changing.

\end{enumerate}

If you have already caught on to the idea of the derivative as a limit
of the difference quotient $\frac{\Delta y}{\Delta x}$, then these are
easy to understand. If $y$ is replaced by $cy$ then clearly the quotient
always gets multiplied by the same constant $c$ and so does the derivative
which is its limit! Similarly, if $y=w+z$ is a sum of two functions, then
their difference quotients clearly add up and give the sum formula.


Principle (2) can be used repeatedly, if we have a sum of more than two
functions.  It can also be used in combination with the first principle.
When combined in this way, the two principles together tell us that it is
easy to find the derivative of any {\bf \index{ linear combination} linear combination } of functions
whose derivatives we know.  By a ``linear combination'' we mean any
function that is constructed using the process of addition and multiplying
by constants.  For example, a polynomial is a linear combination of power
functions: $c_0+c_1x+c_2x^2+\cdots+c_nx^n$.


% example 1:
\begin{example}
\label{eg:6.1}

 In the section on the derivative function, we found the derivative of
$t^2$ (or $x^2$), of $mx+b$, and of the reciprocal function.  Use that,
together with linearity of the derivative, to do Problem 2(a)-(c) of that
section much more quickly.

\vfill

\pagebreak

%\smallskip

We have:
\begin{align}
\frac{d}{ dt}\left(80-4.9t^2\right)&=\frac{d}{ dt}80-4.9\frac{d}{ dt}t^2
=0-4.9(2t)=-9.8t.
\notag\\
\frac{d}{ dx}\left(x^2-\frac{1}{ x}\right)&=\frac{d}{ dx}x^2-
\frac{d}{ dx}x^{-1}=2x-\left(-x^{-2}\right)=2x+\frac{1}{ x^2}.
\notag\\
\frac{d}{ dx}\left(ax^2+bx+c\right)&=a\frac{d}{ dx} x^2+\frac{d}{ dx}(bx+c)=
2ax+b.
\notag 
\end{align} 

\end{example}


%Example 2.
\begin{example}
\label{eg:6.2}

 Find the derivative of $y=\left(1-5x^3\right)^2$.

\smallskip
Since $\left(1-5x^3\right)^2=1-10x^3+25x^6$, the derivative is
\begin{align*} 
\frac{d}{ dx}\left(1-10x^3+25x^6\right)
   =&\frac{d}{ dx}1-10\frac{d}{ dx}x^3+25\frac{d}{ dx}x^6\\
    =&0-10\cdot 3x^2+25\cdot 6x^5=-30x^2+150x^5. 
\end{align*}
\end{example}


\section{The  Product Rule } 
Suppose that we want to find the derivative of a function that is written
as a product $f(x)=u(x)v(x)$, where each of the two factors $u(x)$ and
$v(x)$ is a function whose derivative we know.  For example,
$f(x)=x^3\sqrt{25-x^2}$ is the product of a function $u(x)=x^3$ whose
derivative was already computed (namely, $u'(x)=3x^2$) and a function
$v(x)=\sqrt{25-x^2}$ whose derivative we also know (namely,
$v'(x)=-x/\sqrt{25-x^2}$).

\smallskip

We derive the \index{ product rule} product rule using the \index{ tangent line approximation} tangent line approximation formula for
$u(x)$ and $v(x)$:
\begin{align}
u(x+h)&\approx u(x)+(h)u'(x);
\notag\\
v(x+h)&\approx v(x)+(h)v'(x). 
\notag
\end{align}
We now look at the difference quotient for $f(x)=u(x)v(x)$, whose limit as
$h$ approaches zero is the derivative $f'(x)$:
\begin{align}
&\frac{f(x+h)-f(x)}{h}=
\frac{u(x+h)v(x+h)-u(x)v(x)}{h}
\notag\\
&\qquad \approx
\frac{\Bigl(u(x)+(h)u'(x)\Bigr)\Bigl(v(x)+(h)v'(x)\Bigr)-u(x)v(x)
}{h}
\notag\\
&\qquad =
\frac{u(x)v(x)+(h)  \Bigl(u(x)v'(x)+u'(x)v(x)\Bigr)+(h)^2u'(x)v'(x)
-u(x)v(x)}{h}
\notag\\
&\qquad =
\Bigl(u(x)v'(x)+u'(x)v(x)\Bigr)+(h)u'(x)v'(x).
\notag
\end{align}
As $h$ approaches zero, the last term $(h)u'(x)v'(x)$ drops
out, and we are left with $u(x)v'(x)+u'(x)v(x)$.  Thus,
\[ 
  \text{if~~}f(x)=u(x)v(x),\qquad\text{then}\qquad
f'(x)=u(x)v'(x)+u'(x)v(x). 
\]
This rule can be written in shorthand as follows:
\begin{equation}
\frac{d}{ dx}(uv)=uv'+u'v. 
\tag{Product rule}
\end{equation}
In words, {\it the derivative of a product is equal to the first function
times the derivative of the second function plus the derivative of the
first function times the second function}.

\smallskip

The above calculations certainly motivate the formula and do give an idea of the
proof. They still lack many details for a complete proof. You should think about  what is possibly wrong with them. The details will be discussed in class.

\medskip

\noindent{\bf WARNING:} 
\underline{Never} take the derivative of a product by multiplying 
the derivatives of the terms.  With addition you have $(u+v)'=u'+v'$, but
with multiplication $(uv)'\ne u'v'$.



%Example 3.
\begin{example}
\label{eg:6.3}

Find the derivative of $f(x)=x^3\sqrt{25-x^2}$, and determine the points
where the curve has a horizontal tangent line.

\smallskip

By the product rule, $f'(x)=x^3\left(-x/\sqrt{25-x^2}\right)+3x^2\sqrt{25-
x^2}$.  To say that a point $(x,f(x))$ has a horizontal tangent line means
that the slope of the tangent line is $0$, i.e., $f'(x)=0$.  So we must
solve the equation $-x^4/\sqrt{25-x^2}+3x^2\sqrt{25-x^2}=0$.  We do this
by first clearing denominators (multiplying everything through by
$\sqrt{25-x^2}$).  The result is: $-x^4+3x^2(25-x^2)=0$.  When you have
an equation like this, it is a good idea to try to factor the expression
on the left.  Right away we can factor out $x^2$; then we gather terms in
what remains: $x^2(-x^2+3(25-x^2))=x^2(-4x^2+75)=0$.  This has roots
$x=0$ or $4x^2=75$, i.e., $x=\pm\sqrt{75/4}=\pm 2.5\sqrt{3}=\pm 4.33\cdots$.
Thus, there are three points with \index{ horizontal tangent} horizontal tangent lines:
$(0,0)$, $(4.33,202.97)$, and $(-4.33,-202.97)$.

\end{example}


%Example 4.
\begin{example}
\label{eg:6.4}

Use the product rule to show how the $nx^{n-1}$ formula can be obtained
for $n=4,5,6,\ldots$ (i.e., the successive values of $n$ after the values
$n=0,1,2,3$ for which we already derived the $nx^{n-1}$ formula earlier).

\smallskip

So suppose we don't yet know a formula for the derivative of $x^4$, but we
do know the derivative of $x^3$ (namely, $3x^2$).  Then we can write
$x^4=x^3\cdot x$, so that, by the product rule,
\[ 
\frac{d}{ dx}x^4=\frac{d}{ dx}\left(x^3\cdot x\right)=x^3\left(\frac{d}{ dx}x
   \right)+\left(\frac{d}{ dx}x^3\right)x=x^3\cdot 1+3x^2\cdot x=4x^3. 
\]
This confirms the $nx^{n-1}$ rule when $n=4$.  Now that we have established
the rule for the derivative of $x^4$, we can use the same method to treat
$x^5$:
\[ 
\frac{d}{ dx}x^5=\frac{d}{ dx}\left(x^4\cdot x\right)
=x^4\left(\frac{d}{ dx}x \right)+\left(\frac{d}{ dx}x^4\right)x
=x^4\cdot 1+4x^3\cdot x=5x^4. 
\]
And similarly for $n=6$:
\[ 
\frac{d}{ dx}x^6=\frac{d}{ dx}\left(x^5\cdot x\right)
  =x^5\left(\frac{d}{ dx}x \right)+\left(\frac{d}{ dx}x^5\right)x
  =x^5\cdot 1+5x^4\cdot x=6x^5. 
\]
By now it should be clear that, continuing in this way, we can establish
the validity of the $nx^{n-1}$ rule for all positive integers $n$.

\end{example} 


\section{The Quotient Rule}  
Suppose that we want to find the derivative of a function that is written
as the quotient of two functions whose derivatives we know:
$f(x)=u(x)/v(x)$.  The rule is:
\begin{equation}
\frac{d}{ dx}\,\frac{u(x)}{ v(x)}=\frac{v(x)u'(x)-u(x)v'(x)}{ v(x)^2}, 
\tag{Quotient Rule}
\end{equation}
or, in shorthand notation, $\left(\frac{u}{ v}\right)'=\frac{vu'-uv'}{ v^2}$.
This rule is a little more complicated than the product rule: {\it the
derivative of a quotient is equal to the denominator times the derivative
of the numerator minus the numerator times the derivative of the
denominator, all over the square of the denominator}.  We shall not prove
the \index{ quotient rule} quotient rule here.  We will derive the quotient rule later in this section, when we cover the chain rule.



%Example 5
\begin{example}
\label{eg:6.5}

Use the quotient rule to find the derivative of the derivative of the upper
semicircle function $y=\sqrt{25-x^2}$.  (The derivative of the derivative
is called the ``\index{ second derivative} second derivative.'')

\smallskip

Since the derivative is $-x/\sqrt{25-x^2}$, we want the derivative of an
expression of the form $u(x)/v(x)$, where $u(x)=-x$ and $v(x)=\sqrt{25-
x^2}$.  Since $u'=-1$ and $v'=-x/\sqrt{25-x^2}$, the quotient rule gives
us: 
\[ 
\frac{d}{ dx}\frac{-x}{\sqrt{25-x^2}}=
  \frac{\sqrt{25-x^2}(-1)-(-x)\left(-x/\sqrt{25-x^2}\right)}{(\sqrt{25-x^2})^2}
  = \frac{-\sqrt{25-x^2}-\frac{x^2}{\sqrt{25-x^2}}}{ 25-x^2}. 
\]
The last expression can be simplified by multiplying the top and bottom by
$\sqrt{25-x^2}$.  After a little cancelation, we arrive at
$-25/(25-x^2)^{3/2}$.
\end{example}

\smallskip

{\bf Alternative method:} The above calculations can be simplified by using
proper notations and some clever simplification. First set $y=\sqrt{25-x^2}$
and note that $y'=-x/y$. Applying the quotient rule and linearity we get 
$$(y')' = - \frac{yx'-xy'}{y^2} = (-1/y^2){y-x(-x/y)}=(-1/y^2)\frac{(y^2+x^2)}{y}.$$

Noticing that $x^2+y^2=25$, we get that
$$y''=-\frac{25}{y^3} = - \frac{25}{(25-x^2)^{3/2}}.$$
This idea will be developed into implicit differentiation method later.

%Example 6.
\begin{example}
\label{eg:6.6}
 
Find the derivative of $\sqrt{100-x^2}/\sqrt{x}$ in two ways: using the
quotient rule, and using the product rule.

\smallskip

First, using the quotient rule and the fact that $\sqrt{100-x^2}$ has
derivative $\frac{-x}{\sqrt{100-x^2}}$ and $\sqrt{x}$ has derivative
$\frac{1}{2 \sqrt{x}}$, we obtain:
\begin{align*}
\frac{d}{ dx}\, \frac{\sqrt{100-x^2}}{\sqrt{x}}
&=
\frac{\sqrt{x}(-x/\sqrt{100-x^2})-(1/2\sqrt x)\sqrt{100-x^2}}{x}
\,\cdot\,
\frac{2\sqrt{x}\cdot\sqrt{100-x^2}}{ 2\sqrt{x}\cdot\sqrt{100-x^2}}\\
&=
\frac{-x^2-100}{ 2x^{3/2}\sqrt{100-x^2}}. 
\end{align*}


\smallskip

Alternately, we could use the product rule if we first write our function
in the form $x^{-1/2}\sqrt{100-x^2}$:
\begin{align*}
\frac{d}{ dx}\Bigl(x^{-1/2}\sqrt{100-x^2}\Bigr) &=
x^{-1/2}\frac{-x}{\sqrt{100-x^2}}-\frac{1}{ 2}x^{-3/2}\sqrt{100-x^2}\\
&=
-\frac{x^{1/2}}{\sqrt{100-x^2}}-\frac{1}{ 2}x^{-3/2}\sqrt{100-x^2}, 
\end{align*}
which is algebraically equivalent to the answer we got using the quotient
rule.

{\bf Alternative method:}
As above, the work can be cleaned up by using a few names. Let $y=\sqrt{100-x^2}$
and $z=x^{1/2}$. Then $y'=-\frac{x}{\sqrt{100-x^2}} = -\frac{z^2}{y}$. Also,
$z'=\frac{1}{2z}$. The derivative of the function becomes:

$$\frac{y}{z} = \frac{zy'-yz'}{z^2}=\frac{1}{z^2}(-\frac{z^3}{y}-\frac{y}{2z})
=-\frac{1}{2yz^3}(2z^4+y^2).$$

Getting the final answer is now the matter of plugging in the values of $y,z$ and
simplifying.

\end{example}

\medskip

{\bf A bit of advice on avoiding the quotient rule.}  Do {\bf not} use the
quotient rule when the numerator is a constant, because it is unnecessarily
cumbersome in that case.  For example, to find
the derivative of $10/x^2$, write this as $10x^{-2}$ and use the power rule:
the derivative is $10\cdot(-2)x^{-3}=-20/x^3$.

On the other hand it is a good idea to try your quotient rule on $1/x$, whose 
derivative is known to be $-1/x^2$. It helps you to remember that the negative
term in the numerator is $-uv'$.

\medskip

\section{The Second Derivative and Acceleration} 
As mentioned before, the \index{ second derivative} second derivative is simply the derivative of the
derivative.  If $y=f(x)$ is our function, then there are various ways to
denote the second derivative $\disp\frac{d}{ dx}\left(\frac{d}{ dx}\,f(x)\right)$:
\[ 
  y''=f''(x)=\frac{d^2}{ dx^2}\,f(x)=\frac{d^2y}{ dx^2}=\frac{d}{ dx}\left(
\frac{d}{ dx}\,f(x)\right). 
\]



%Example 7
\begin{example}
 \label{eg:6.7}

Find the second derivative of (a) $y=x^n$, (b) $y=1/x$, (c) $ax^2+bx+c$
(where $a$, $b$, $c$ are constants).

\smallskip

(a) We have 
\[ 
\frac{d}{ dx}\left(\frac{d}{ dx}\,x^n\right)
=\frac{d}{ dx}\left( nx^{n-1}\right)=n(n-1)x^{n-2}. 
\]

Then (b) is the special case $n=-1$, i.e., the second derivative of $x^{-1}$
is $2x^{-3}$.  

In part (c) we have 
$\displaystyle\frac{d}{ dx}\bigl(\frac{d}{ dx}(ax^2+bx+c)\bigr)
  =\frac{d}{ dx}(2ax+b)=2a$.

\end{example}

\medskip

{\bf Dot Notation.} If the time $t$ is playing the role of the $x$-variable,
i.e., if $y=f(t)$, then we often use dots rather than primes for the
derivatives: 
\[
\dot{y}=\disp\frac{d}{dt}f(t)\,, \quad
\ddot{y}=\disp\frac{d^2}{dt^2}f(t)\,.  
\]
If the $y$-variable is denoted by a letter other than $y$, we still use the
dot notation.  For example, if the distance function is denoted $s=s(t)$,
then we write $\ddot{s}(t)$ for the second derivative of the distance
function.

\smallskip

In the case of a distance function $s=s(t)$, both the first derivative
function $\dot{s}(t)$ and the second derivative function $\ddot{s}(t)$ have
a familiar practical meaning.  The first derivative $\dot{s}(t)$ is, as
we've seen, the \index{ velocity} velocity function, which is often denoted $v(t)$:
$v(t)=\dot{s}(t)=\disp\frac{d}{dt}\,s(t)$.  The derivative of that --- the
instantaneous rate at which the velocity is changing --- is what is called
the {\bf \index{ acceleration} acceleration }, often denoted $a(t)$:
\[ 
    a(t)=\frac{d}{ dt}v(t)=\frac{d^2}{ dt^2}s(t)=\ddot{s}(t). 
\] 
Earlier we saw that the velocity at a certain instant $t$ is the slope of
the tangent line to the graph of the distance function at the point
$(t,s(t))$.  Similarly, the acceleration at a certain instant $t$ is the
slope of the tangent line to the graph of the velocity function at the
point $(t,v(t))$.



%Example 8
\begin{example}
\label{eg:6.8}

A \index{ bicycle} bicycle is traveling along a road (which we take to be the $x$-axis).
Its distance in meters from the reference point (0 on the $x$-axis) at time
$t$ seconds is given by the formula $x(t)=50+5t+t^2$.  Find the derivative
function $\dot{x}(t)$ and the second derivative function $\ddot{x}(t)$,
graph all three functions (distance, velocity, and acceleration), and
explain in words what is going on.

\smallskip

First $v(t)=\dot{x}(t)=\disp\frac{d}{dt}(50+5t+t^2)=
5+2t$.  Next, $a(t)=\ddot{x}(t)=\disp\frac{d}{dt}v(t)=
\frac{d}{ dt}(5+2t)=2$.  The distance function $x(t)$ tells us that the
bicycle is at $x(0)=50$ meters from the reference point at time $t=0$
and is moving to the right at a certain velocity $v(t)$.  The formula 
for this velocity function $v(t)=5+2t$ says that the speed of the bicycle
is $5$ m/sec at first ($t=0$), but it increases steadily.  The rate at
which the velocity increases is the acceleration function $a(t)=2$,
which happens to be a constant function in this example.  The acceleration
is measured in ``meters per second per second'' or ``meters per second
squared,'' written $2$ m/sec${}^2$.  Here are the graphs of the distance,
velocity, and acceleration functions:

\bigskip


%--- figure FA --------------------------------------------------
\begin{center} 
\begin{psfigure}{5in}{2.0in}{figFA.ps}
%\putcrosshair{0,0}
\puttext{-65,-55}{$s(t)$}
\puttext{0,-55}{$v(t)=\dot{s}(t)$}
\puttext{70,-55}{$a(t)= \ddot{s}(t)$}
\puttext{-87,50}{\Small$\text{ m}$}
\puttext{-20,50}{\Small$\text{ m/sec}$}
\puttext{45,50}{\Small$\text{ m/sec}^2$}
\end{psfigure}\\
\end{center}

\medskip

%----------------------------------------------------------------
\end{example}

\medskip

% example 9
\begin{example} {(Free fall without air resistance)}
\label{eg:6.9}

This is a good place to discuss the vertical motion of an object moving
without air resistance under the influence of \index{ gravity} gravity. Let $y$ denote the
height (say in meters) of the object above ground level and let $t$ be the
time (in seconds). Suppose that at time $t=0$ an object is located at 
height $y = y_{0}$ and has velocity $v_{0}$. (Notice that $v_0$ is positive 
means that the object is initially moving upward.) Then $y$ and $t$ are
related by the formula
\begin{equation}
y = y(t) = - \frac{1}{2} g t^2 + v_{0} t +  y_{0} \,.
\tag{\index{ Falling Body Formula} Falling Body Formula }
\end{equation}
Taking derivatives gives the formula for the velocity
\[
        v(t) = \frac{d}{dt}y(t) = - g t + v_{0} \,,
\]
and taking one more derivative gives the acceleration
\[
        a(t) = \frac{d}{dt} v(t) = - g \,.
\]
In particular, the acceleration of a falling body is constant, it is 
called the {\bf \index{ acceleration due to gravity} acceleration due to gravity }. On the
surface of the earth $ g = 9.8 \text{m/sec}^2$. (Notice that the acceleration
is {\it negative} because the force of gravity points down.) 

{\bf Deducing the formulas;}
We stated the above formulas without proofs. However, if we start with the
formula $a(t)=-9$, then the formulas for $v(t)$ and $s(t)$ can be deduced 
by guesswork and the differentiation formulas that we already know. For instance,
the formula for $v(t)$ must be $-gt+C$ for some constant $C$ (think why!). 
Checking the values at $t=0$, we can see why $C=v_0$. You should attempt
to finish the formula for $y(t)$ yourself.

This is the process of finding \index{ antiderivatives} antiderivatives and will be developed later.

\end{example}

\section{The Chain Rule}  
The \index{ chain rule} chain rule is the way to find the derivative of a function that is
built up from simpler functions by the {\bf  \index{ composition of  two
functions} composition of  two
functions }, i.e. by taking a ``function of a function.''
For example, the function $\sqrt{1+x^4}$ is built up from the square root
function and the function $1+x^4$.  The function $1/\sqrt{5-\sqrt{x}}$ is
built up from the reciprocal square root function (i.e., the $(-1/2)$-power
function) and the function $5-\sqrt{x}$.  We shall write $y=f(x)=g(u(x))$
to indicate that $y$ is obtained by taking a function $g(u)$ (which we
sometimes call the ``outside function'') and applying it to another
function $u(x)$ (which we call the ``inside function'').  In the two
examples just mentioned:


\begin{align*}
g(u)=\sqrt{u} \text{ and } 
u(x) =1+x^4
&\quad\Longrightarrow\quad 
y=f(x)=g(u(x))=\sqrt{1+x^4}; \\
  g(u)=1/\sqrt{u}
\text{ and }
u(x)=5-\sqrt{x}
&\quad\Longrightarrow \quad 
y=f(x)=g(u(x))=1/\sqrt{5-\sqrt{x}}. 
\end{align*}
The chain rule enables us to find $dy/dx$ once we know the derivative of
the outside function $dy/du=g'(u)$ and the derivative of the inside
function $du/dx=u'(x)$.

\smallskip

We shall derive the chain rule using the \index{ tangent line approximation} tangent line approximation.  The
tangent line approximation formula for the function $y=g(u)$ can be written
in the form $\Delta y\approx g'(u)\Delta u$.  Similarly, the tangent line
approximation formula for the function $u(x)$ can be written $\Delta
u\approx u'(x)\Delta x$.  Putting these two facts together, we see that a
small change $\Delta x$ produces a change $u'(x)$ times as much in $u$,
which, in turn, produces a change $g'(u)$ times as much in $y$, i.e.,
$\Delta y\approx g'(u)\Delta u\approx g'(u)u'(x)h$.  Since we also
have $\Delta y\approx f'(x)\Delta x$, it follows that the two
``proportionality factors'' between $\Delta x$ and $\Delta y$ must be
equal, i.e., $f'(x)=g'(u)u'(x)$.  This is the chain rule.  It is especially
easy to remember when it is written in the $dy/dx$ notation:
\begin{equation}
\frac{dy}{ dx}=\frac{dy}{ du}\cdot\frac{du}{ dx}.  \quad
\tag{Chain Rule}
\end{equation}
It is as if the ``dy,'' ``du,'' and ``dx'' can be treated individually as
algebraic quantities, where we cancel the two ``du'' on the right.

Indeed, another way of formulating the above calculations is to write
$$\frac{\Delta y}{\Delta x} = \frac{\Delta y }{\Delta u}\cdot \frac{\Delta u}{\Delta x}$$
which is precise. Now we take the limits as $\Delta x$ goes to $0$. We have to see
why $\Delta u$ also goes to zero and then the formula will be proved. We leave
the precise treatment for the appendix.

\smallskip

Schematically, we can regard a function of a function as a 2-step
procedure, first going from $x$ to $u$ and then from $u$ to $y$.  The chain
rule says that the derivative from $x$ to $u$ must be multiplied by the
derivative from $u$ to $y$ to get the derivative from $x$ to $y$.

\smallskip

Before giving some computational examples, we shall give a story problem to
show that the chain rule makes sense from a practical point of view.



%Example 10.
\begin{example}
\label{eg:6.10}

Suppose your income is in the 28\% \index{ tax} tax bracket, and it is increasing at the
rate of \$1000 per year.  At what rate is your tax increasing?

\smallskip

As before, let us use $x$ to denote income and $y$ to denote the income
tax.  Recall that ``28\% tax bracket'' means that $y$ as a function of $x$
has slope 0.28 over the range of values of $x$ (your income) in question.
In this problem $y$ depends on $x$, which in turn depends on the time $t$.
We could write that $y=g(x)$ and $x=x(t)$ together give $y=f(t)=g(x(t))$.
(Thus, $x$ is playing the rule of $u$ in the chain rule, and $t$ is playing
the role of $x$.)  The \index{ chain rule} chain rule says that
\begin{align*}
\frac{dy}{ dt}=\frac{dy}{ dx}\cdot\frac{dx}{ dt}
 &=(28\%)\cdot(1000~\text{dollars/ year)}\\
 &=0.28\cdot 1000~\text{dollars/year}=280~\text{dollars/year}. 
\end{align*}
That is, tax is increasing at the rate of \$0.28 for every dollar increase
in income, and income is increasing at the rate of \$1000 for every year
increase in time; hence, tax is increasing at the rate $0.28\cdot 1000=280$
dollars every year.

\end{example}



%Example 11.
\begin{example}
\label{eg:6.11}
(a) Use the chain rule to find the derivative of the upper \index{ semicircle} semicircle
function $y=\sqrt{r^2-x^2}$ (where $r$ is a constant), and see that the
answer agrees with our earlier formula for the derivative obtained using
geometry.  Also find the derivative of the two examples mentioned above:
(b) $y=\sqrt{1+x^4}$, (c) $y=1/\sqrt{5-\sqrt{x}}$.

\smallskip

(a) We take $y=g(u)=\sqrt{u}$ for the outside function and $u=r^2-x^2$ for
the inside function.  Then, since $du/dx=-2x$, we have
\[ 
\frac{dy}{ dx}=\frac{dy}{ du}\cdot\frac{du}{ dx}
  =\frac{1}{ 2\sqrt{u}}\cdot(-2x)
  = -\frac{x}{\sqrt{u}}=-\frac{x}{\sqrt{r^2-x^2}}, 
\] 
as expected. 

(b) Here the outside function is $y=g(u)=\sqrt{u}$, and the inside function
is $u=1+x^4$.  So
\[
\frac{dy}{ dx}=\frac{dy}{ du}\cdot\frac{du}{ dx}=\frac{1}{ 2\sqrt{u}}\cdot 4x^3=
\frac{4x^3}{ 2\sqrt{1+x^4}} 
\]
(the answer should be written in terms of $x$, i.e., in $g'(u)$ you should
substitute $u=u(x)$, which in this case is $1+x^4$).

\smallskip

(c) Here the outside function is $y=g(u)=u^{-1/2}$, and the inside function
is $u=5-\sqrt{x}$.  So
\[ 
\frac{dy}{ dx}=\frac{dy}{ du}\cdot\frac{du}{ dx}=-\frac{1}{ 2}u^{-3/2}\left(-\frac{1}{
2\sqrt{x}}\right)=\frac{1}{ 4(5-\sqrt{x})^{3/2}\>\sqrt{x}}. 
\]

\end{example}



When the outside function $g(u)$ is the power function $u^n$, we can write
the chain rule in the form
\[
\frac{d}{ dx}\left(u(x)^n\right)=n\,u(x)^{n-1}\,\frac{du}{ dx}. 
\]
For example, the derivative of the square of a function is $\frac{d}{
dx}u(x)^2=2u(x)u'(x)$.

%Example 12
\begin{example}
\label{eg:6.12}
 Find the derivative of $(1+3x)^2$ in two ways: (a) by the chain rule; (b)
by expanding the square.

\smallskip

(a) In the above formula for the derivative of $u(x)^2$, we take
$u(x)=1+3x$, so that $u'(x)=3$.  Then $\frac{d}{ dx}(1+3x)^2=2(1+3x)\cdot 3=
6(1+3x)$.

\smallskip

(b) We write $(1+3x)^2=1+6x+9x^2$, and then $\frac{d}{ dx}(1+6x+9x^2)=
6+9\cdot 2x=6+18x=6(1+3x)$, the same answer as in part (a).  

\end{example}


We next use the chain rule to show how we get the quotient rule.  We write
the quotient $u(x)/v(x)$ in the form of a product $u(x)(v(x)^{-1})$.  Then
we apply the chain rule to find the derivative of $v(x)^{-1}$, where the
outside function is the reciprocal function and the inside function is
$v(x)$.  According to the chain rule,
\[
\frac{d}{ dx}\left(v(x)^{-1}\right)=-\frac{1}{ v(x)^2}v'(x). 
\]
We are now ready to apply the product rule:
\begin{align}\frac{d}{ dx}\left(\frac{u(x)}{ v(x)}\right)&=
\frac{d}{ dx}\left(u(x)(v(x)^{-1})\right)=
u(x)\frac{d}{ dx}\left(v(x)^{-1}\right)+u'(x)(v(x)^{-1})
\notag\\
&=
u(x)\left(-\frac{1}{ v(x)^2}v'(x)\right)+\frac{u'(x)}{ v(x)}
=\frac{-u(x)v'(x)}{ v(x)^2}+\frac{v(x)}{ v(x)}\cdot\frac{u'(x)}{ v(x)}
\notag\\
&=
\frac{v(x)u'(x)-u(x)v'(x)}{ v(x)^2},
\notag\end{align}
which is the quotient rule.

\smallskip

Another comment to make about the chain rule is that it can be used to find
the derivative of a function of a function of a function, or even a
function of a function of a function of a function, and so on, where in
each case we build up a function by applying a chain of simple functions.
Here is an example to illustrate this.



%Example 13
\begin{example}
\label{eg:6.13}
Find the derivative of $\sqrt{1+\sqrt{1+\sqrt{x}}}$.

\smallskip

The outermost function is $g(u)=\sqrt{u}$, where $u(x)=1+\sqrt{1+
\sqrt{x}}$.  In the chain rule we need $u'(x)$, which in this case we find
by using the chain rule again:
\[
  u'(x)=\frac{1}{ 2\sqrt{1+\sqrt{x}}}\cdot\frac{d}{ dx}(1+\sqrt{x})=
\frac{1}{ 4\sqrt{1+\sqrt{x}}\sqrt{x}}. 
\]  
Finally,
\begin{align}
\frac{d}{ dx}\sqrt{1+\sqrt{1+\sqrt{x}}}
&=\frac{d}{ dx}\sqrt{u}=
\frac{1}{ 2\sqrt{u}}u'(x)=\frac{1}{ 2\sqrt{1+\sqrt{1+\sqrt{x}}}}\cdot\frac{1}{
4\sqrt{1+\sqrt{x}}\sqrt{x}}
\notag\\
&=\frac{1}{ 8\sqrt{x}\sqrt{1+\sqrt{x}}
\sqrt{1+\sqrt{1+\sqrt{x}}}}.
\notag
\end{align}

\end{example}



