%% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{beamer}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{amsmath}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 % this default might be overridden by plain title style
 \newcommand\makebeamertitle{\frame{\maketitle}}%
 \AtBeginDocument{
   \let\origtableofcontents=\tableofcontents
   \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
   \def\gobbletableofcontents#1{\origtableofcontents}
 }
 \long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}%
 \def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}%
 \def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}}
 \def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}}
 \def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}}
 \long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{%
   \frame<#1>[#2][#3]{\frametitle{#4}#5}}
 \def\lyxframeend{} % In case there is a superfluous frame end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{appearance}

\makeatother

\usepackage{babel}
\begin{document}
%MODULE: Continuity


%USER DEFINED COMMANDS
\global\long\def\ds{{\displaystyle }}
 \global\long\def\nsp{\hspace{1em}*{9pt}}
 \global\long\def\lns{\rule{0pt}{11pt} }
 \global\long\def\xp{\mbox{\Large\sl e} }


%BUILD  TITLE PAGE 



\title{The Chain Rule}


\subtitle{In this module we turn to another property of derivatives, the {\hilite
Chain Rule}.}

\makebeamertitle
%1



\lyxframeend{}\lyxframe{{Defining the problem}}

\begin{question}How can we compute the derivatives of the following
functions \emph{quickly}?
\begin{itemize}
\item $\ec\sin(x^{2}-1)$ 
\item $\ec\left(x^{2}-x+1\right)^{100}$ 
\end{itemize}
\end{question} 


\lyxframeend{}\lyxframe{{SAGE worksheets}}

\noindent You do not need a SAGE worksheet for this module.


\lyxframeend{}\lyxframe{{The Chain Rule}}

\noindent We start by stating \emph{\hilite the Chain Rule}:
\begin{theorem}%{}
[(The Chain Rule)]

\noindent Let $\ec g$ and $\ec u$ be functions such that $\ec u$
is differentiable on its domain and $\ec g$ is differentiable on
the range of $\ec u$. If $\ec f=g\circ u$ then 
\[
{\ec f'(x)=g'(u)\cdot u'(x)}.
\]
 Alternatively, in Leibniz notation
\[
{\ec\frac{df}{dx}=\frac{dg}{du}\cdot\frac{du}{dx}}.
\]

\end{theorem}%{}
\noindent The Leibniz notation does \emph{not} prove the theorem,
although it suggests it. We will not prove this theorem (your text
or your instructor can provide a proof) but we will review quite a
few examples.





\lyxframeend{}\lyxframe{{A note on the Chain Rule}}

\noindent Look back at the Chain Rule and observe the structure of
$\ec f$: it is a \emph{composition of functions}. The Chain Rule's
strength is that it helps us compute derivatives of functions with
this structure. The examples given at the beginning of the module
are of this kind:





\pause{}

\noindent 
\begin{itemize}
\item $\ec\sin(x^{2}-1)=(g\circ u)(x)$ where

\begin{itemize}
\item $\ec g(u)=\sin u$, and 
\item $\ec u(x)=x^{2}-1$. 
\end{itemize}
\end{itemize}




\pause{}
\begin{itemize}
\item $\ec\left(x^{2}-x+1\right)^{100}=(g\circ u)(x)$ where

\begin{itemize}
\item $\ec g(u)=u^{100}$, and 
\item $\ec u(x)=x^{2}-x+1$. 
\end{itemize}
\end{itemize}




\pause{}

\noindent Compositions of functions often look as if they have an
{}``inside'' and an {}``outside''; here $\ec u$ is the {}``inside''
function and $\ec g$ is the {}``outside'' function.





\lyxframeend{}\lyxframe{First Example}
\begin{overlayarea}
{\textwidth}{6in}

\noindent In the {\hilite first} example, we have $\ec f(x)=\sin(x^{2}-1)=(g\circ u)(x)$
where
\begin{itemize}
\item $\ec g(u)=\sin u$, and 
\item $\ec u(x)=x^{2}-1$. 
\end{itemize}





\pause{}
\begin{onlyenv}%{}
<2>

Application of the Chain Rule gives
\begin{align*}
\ec f'(x) & {\ec=g'(u)\cdot u'(x)}.
\end{align*}
 \begin{explanation}Definition of the Chain Rule.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<3>

Application of the Chain Rule gives
\begin{align*}
\dims f'(x) & \dims=g'(u)\cdot u'(x)\\
 & {\ec=\cos u\cdot(2x)}.
\end{align*}
 \begin{explanation}Substituted the derivatives.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<4>

Application of the Chain Rule gives
\begin{align*}
\dims f'(x) & \dims=\cos u\cdot(2x)\\
 & {\ec=2x\cos\left(x^{2}-1\right)}.
\end{align*}
 \begin{explanation}Substituted for $u$.\end{explanation}

\end{onlyenv}%{}
\end{overlayarea}

\lyxframeend{}\lyxframe{{Second Example}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent In the {\hilite second} example, we have $\ec f(x)=\left(x^{2}-x+1\right)^{100}=(g\circ u)(x)$
where
\begin{itemize}
\item $\ec g(u)=u^{100}$, and 
\item $\ec u(x)=x^{2}-x+1$.
\end{itemize}

\pause{}
\begin{onlyenv}%{}
<2>

Application of the Chain Rule gives 
\begin{align*}
\ec f'(x) & {\ec=g'(u)\cdot u'(x)}.
\end{align*}
 \begin{explanation}Definition of the Chain Rule.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<3>

Application of the Chain Rule gives 
\begin{align*}
\dims f'(x) & \dims=g'(u)\cdot u'(x)\\
 & {\ec=100u^{99}\cdot(2x)}.
\end{align*}
 \begin{explanation}Substituted the derivatives.\end{explanation}

\end{onlyenv}%{}





\pause{}
\begin{onlyenv}%{}
<4>

Application of the Chain Rule gives 
\begin{align*}
\dims f'(x) & \dims=100u^{99}\cdot(2x)\\
 & {\ec=200\left(x^{2}-x+1\right)^{99}}.
\end{align*}
 \begin{explanation}Substituted for $u$.\end{explanation}

\end{onlyenv}%{}
\end{overlayarea}

\lyxframeend{}\lyxframe{{Third Example}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent Let's try a third example. Let $\ec f(x)=\tan\left((x-3)^{3}+(x-3)^{2}-1\right)$.
Start by identifying $\ec f$ and $\ec u$ in this function.


\pause{}
\begin{onlyenv}%{}
<2-7>

We have 
\begin{itemize}
\item $\ec g(u)=\tan u$, and 
\item $\ec u(x)=(x^{2}-3)^{3}+(x^{2}-3)^{2}-1$.
\end{itemize}
\end{onlyenv}%{}


\begin{onlyenv}%{}
<2>

(It is possible to obtain a different answer. Check with your instructor
if you think you have a different answer that is correct.)

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<3>

Notice that $\ec u(x)$ is also a composition of functions! Before
we can compute $\ec f'(x)$ we will have to compute $\ec u'(x)$.

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<4-7>

Put $\ec u(x)=(g_{1}\circ u_{1})(x)$ where
\begin{itemize}
\item $\ec g_{1}(u_{1})=u_{1}^{3}+u_{1}^{2}-1$, and 
\item $\ec u_{1}(x)=x^{2}-3$. 
\end{itemize}
\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<5>

Then
\begin{align*}
\ec u'(x) & {\ec=g_{1}'(u_{1})\cdot u_{1}'(x)}.
\end{align*}
 \begin{explanation}Definition of the Chain Rule.\end{explanation}



\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<6>

Then
\begin{align*}
\dims u'(x) & {\dims=g_{1}'(u_{1})\cdot u_{1}'(x)}\\
 & {\ec=(3u_{1}^{2}+2u_{1})\cdot2x}.
\end{align*}
 \begin{explanation}Substituted the derivatives.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<7>

Then
\begin{align*}
\dims u'(x) & {\dims=(3u_{1}^{2}+2u_{1})\cdot2x}\\
 & {\ec=2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]}.
\end{align*}
 \begin{explanation}Substituted for $u_{1}$.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<8->

We have 
\begin{itemize}
\item $\ec g(u)=\tan u$,
\item $\ec u(x)=(x^{2}-3)^{3}+(x^{2}-3)^{2}-1$, and
\item $\ec u'(x)=2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]$.
\end{itemize}
\end{onlyenv}%{}


\begin{onlyenv}%{}
<8>

We finally put them together:
\begin{align*}
\ec f'(x) & {\ec=g'(u)\cdot u'(x)}.\\
 & \phantom{=\sec^{2}\left[(x^{2}-3)^{3}+(x^{2}-3)^{2}-1\right]\cdot2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]}
\end{align*}
 \begin{explanation}The Chain Rule.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<9>

We finally put them together:
\begin{align*}
\dims f'(x) & \dims=g'(u)\cdot u'(x)\\
 & {\ec=\sec^{2}u\cdot2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]}.\\
 & \phantom{=\sec^{2}\left[(x^{2}-3)^{3}+(x^{2}-3)^{2}-1\right]\cdot2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]}
\end{align*}
 \begin{explanation}Substituted for $g'$ and $u'$.\end{explanation}

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<10>

We finally put them together:
\begin{align*}
\dims f'(x) & \dims=\sec^{2}u\cdot2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]\\
 & {\ec=\sec^{2}\left[(x^{2}-3)^{3}+(x^{2}-3)^{2}-1\right]\cdot2x\left[3(x^{2}-3)^{2}+2(x^{2}-3)\right]}.
\end{align*}
 \begin{explanation}Substituted for $u$.\end{explanation}

\end{onlyenv}%{}
\end{overlayarea}

\lyxframeend{}\lyxframe{{Numerical Example}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent In the fourth example, the formulas for $\ec f$, $\ec g$,
and $\ec u$ are not known, but the following values \emph{are} known. 


\begin{center}
{\ec%
\begin{tabular}{|c|c|c|c|c|}
\hline 
$x$  & $g(x)$  & $g'(x)$  & $u(x)$  & $u'(x)$ \tabularnewline
\hline 
-2  & -2  & 10  & 5  & -10 \tabularnewline
\hline 
-1  & 5  & 2  & -3  & -5 \tabularnewline
\hline 
0  & 7  & 0  & 0  & -4 \tabularnewline
\hline 
1  & 6  & -3  & -2  & 0 \tabularnewline
\hline 
2  & 0  & -2  & -1  & 3 \tabularnewline
\hline 
\end{tabular}}
\par\end{center}


If $\ec f(x)=(g\circ u)(x)$, what is $\ec f'(2)$?


\pause{}
\begin{onlyenv}%{}
<2>

Again, we use the Chain Rule. We have
\begin{align*}
\ec f'(x) & {\ec=g'(u)\cdot u'(x)}.
\end{align*}


\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<3>

We want values of $\ec f'(x)$ when $\ec x=2$, or
\begin{align*}
\dims f'(x) & \dims=g'(u)\cdot u'(x)\\
\ec f'(2) & {\ec=g'(u(2))\cdot u'(2)}.
\end{align*}


\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<4>

We can determine those values from the table:
\begin{align*}
\dims f'(x) & \dims=g'(u)\cdot u'(x)\\
\dims f'(2) & \dims=g'(u(2))\cdot u'(2)\\
 & {\ec=g'(-1)\cdot3=2\cdot3=6}.
\end{align*}
So $\ec f'(2)=6$.

\end{onlyenv}%{}
\end{overlayarea}

\lyxframeend{}\lyxframe{{Conclusion}}
\begin{itemize}
\item The {\hilite Chain Rule} is a shortcut for {\hilite functions
derived by composition}:\setlength{\shadeboxwidth}{3.5in}

\begin{theorem}%{}
[(The Chain Rule)]Let $\ec g$ and $\ec u$ be functions such that
$\ec u$ is differentiable on its domain and $\ec g$ is differentiable
on the range of $\ec u$. If $\ec f=g\circ u$ then 
\[
{\ec f'(x)=g'(u)\cdot u'(x)}.
\]
 Alternatively, in Leibniz notation
\[
{\ec\frac{df}{dx}=\frac{dg}{du}\cdot\frac{du}{dx}}.
\]

\end{theorem}%{}
\item To use the Chain Rule, we must identify an {}``\emph{inside}'' function
and an {}``\emph{outside}'' function.
\end{itemize}

\lyxframeend{}
\end{document}
