%% 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{calc}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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}\newcommand{\reals}{\mathbb R}

\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} }
 \global\long\def\arcsec{\mathrm{arcsec}}


%INPUT THE INSTRUCTIONS PAGE 


%BUILD  TITLE PAGE 



\title{Implicit Differentiation}


\subtitle{There are cases where we would like to compute the derivative for
a \emph{relation} that is not a function, or that cannot easily be
written in the form $\ec y=f(x)$. In these circumstances, it can
still make sense to compute a derivative---all we need is that the
limit of the slopes of the secant lines exists---but since we cannot
isolate $\ec y$ from $\ec x$, we need a more general method than
the ones used heretofore. We call this method \emph{\hilite implicit
differentiation}. }

\makebeamertitle
%1



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

\begin{question} How can we find the derivative at any point of the
following relations \emph{quickly}? 
\begin{itemize}
\item $\ec x^{2}+y^{2}=1$ 
\item $\ec x^{2}e^{xy}=x+y$ 
\item $\ec\arcsin x$, $\ec\arctan x$, $\ec\arcsec x$ 
\end{itemize}
\end{question} %2



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

\noindent You will need a blank SAGE worksheet for this module.


\lyxframeend{}\lyxframe{{Implicit Differentiation}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent If we look back at the first example,
\[
{\ec x^{2}+y^{2}=1},
\]
 we notice that it is possible to solve for $\ec y$ explicitly:
\[
{\ec y=\pm\sqrt{1-x^{2}}}.
\]

\begin{onlyenv}%{}
<1>

\noindent This is not a function, but we can choose either the positive
or negative branch to compute the derivative at a given point.


\noindent 
\begin{figure}[h!]
\centering{}\includegraphics[scale=0.15]{figures/circle} \qquad{}\includegraphics[scale=0.15]{figures/circle_two_branches} 
\end{figure}


\end{onlyenv}%{}

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

\noindent \vspace{-6ex}
\begin{figure}[h!]
\centering{}\includegraphics[scale=0.15]{figures/circle} \qquad{}\includegraphics[scale=0.15]{figures/circle_two_branches} 
\end{figure}


\end{onlyenv}%{}


\begin{onlyenv}%{}
<2>

On the {\hilite upper (positive) branch} we have
\begin{align*}
\ec y & {\ec=\sqrt{1-x^{2}}=(1-x^{2})^{1/2}}.
\end{align*}


\end{onlyenv}%{}

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

On the {upper (positive) branch} we have
\begin{align*}
\dims y & \dims=\sqrt{1-x^{2}}=(1-x^{2})^{1/2}\\
\ec y' & {\ec=\frac{1}{2}(1-x^{2})^{-1/2}\cdot(-2x)}.
\end{align*}
 \begin{explanation}Don't forget the Chain Rule.\end{explanation}

\end{onlyenv}%{}

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

On the {\hilite lower (negative) branch} we have
\begin{align*}
\ec y & {\ec=-\sqrt{1-x^{2}}=-(1-x^{2})^{1/2}}.
\end{align*}


\end{onlyenv}%{}

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

On the {lower (negative) branch} we have
\begin{align*}
\dims y & \dims=-\sqrt{1-x^{2}}=-(1-x^{2})^{1/2}\\
\ec y' & {\ec=-\frac{1}{2}(1-x^{2})^{-1/2}\cdot(-2x)}.
\end{align*}
 \begin{explanation}Don't forget the Chain Rule.\end{explanation}

\end{onlyenv}%{}

\pause{}


Either way, we found
\[
{\ec y'=\mp\frac{x}{\sqrt{1-x^{2}}}}.
\]


\end{overlayarea}

\lyxframeend{}\lyxframe{{Implicit Differentiation}}

\noindent Even though $\ec y$ is not a function of $\ec x$ in the
circle $\ec C$, we can find functions $\ec y_{1}$ and $\ec y_{2}$
such that $\ec C$ is the union of the points described by two functions.
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.2]{figures/circle} \qquad{}\includegraphics[scale=0.2]{figures/circle_two_branches} 
\end{figure}


\noindent Thus the relation $\ec x^{2}+y^{2}=1$ defines $\ec y$
as a function of $\ec x$ \emph{locally}. We can treat $\ec y$ as
a function that depends on $\ec x$, and differentiate using the Chain
Rule.


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

\noindent We demonstrate this using the first example.
\begin{onlyenv}%{}
<1>

\noindent 
\begin{align*}
\ec x^{2}+y^{2} & {\ec=1}.
\end{align*}


\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}+y^{2} & \dims=1\\
\ec2x+2y\cdot{\hilite y'} & {\ec=0}.
\end{align*}
 \begin{explanation}Since $y$ is a function of $x$, the Chain Rule
tells us that the derivative of $y^{2}$ is $2y\cdot{y'}$.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}+y^{2} & \dims=1\\
\dims2x+2y\cdot y' & \dims=0\\
\ec y' & {\ec=-\frac{x}{y}}.
\end{align*}
 \begin{explanation}Solve for $y'$.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}+y^{2} & \dims=1\\
\dims2x+2y\cdot y' & \dims=0\\
\dims y' & \dims=-\frac{x}{y}.
\end{align*}
 We illustrate this by computing the slopes of lines tangent to the
circle at various points.

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims y' & \dims=-\frac{x}{y}.
\end{align*}
 We illustrate this by computing the slopes of lines tangent to the
circle at various points.


The point $\hilite(0,1)$ is on the curve, since $\ec0^{2}+1^{2}=1$.
At this point, 
\[
{\ec y'=-0/1=0}.
\]
 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.2]{figures/tanline_at_top} 
\end{figure}


\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims y' & \dims=-\frac{x}{y}.
\end{align*}
 We illustrate this by computing the slopes of lines tangent to the
circle at various points.


The point $\hilite(\sqrt{2}/2,\sqrt{2}/2)$ is on the curve, since
$\ec\left(\frac{\sqrt{2}}{2}\right)^{2}+\left(\frac{\sqrt{2}}{2}\right)^{2}=1$.
At this point, 
\[
{\ec{y'}=-\frac{\frac{\sqrt{2}}{2}}{\frac{\sqrt{2}}{2}}=-1}.
\]
 \vspace{-6ex}
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.2]{figures/tanline_at_upper_right}
\end{figure}


\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims y' & \dims=-\frac{x}{y}.
\end{align*}
 We illustrate this by computing the slopes of lines tangent to the
circle at various points.


The point $\hilite(1,0)$ is on the curve, since $\ec1^{2}+0^{2}=1$.
At this point, 
\[
{\ec{y'}=-\frac{1}{0}},\mathrm{\ corresponding\ to\ a\ vertical\ line}.
\]
 
\begin{figure}[h!]
\centering{}\includegraphics[scale=0.2]{figures/tanline_at_right} 
\end{figure}


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

\lyxframeend{}\lyxframe{{Implicit Plots}}

\noindent It isn't always easy to view the graph of a relation. If
you can't separate $\ec y$ and $\ec x$, you can still plot it in
SAGE using the \texttt{\ttcolor implicit\_plot()} command. For example,
the graphs of the circles were generated using these commands:\emph{
(Try it!)}

\framebox{\parbox[c]{8.75in}{%
\texttt{\scriptsize \ttcolor circleplot = implicit\_plot(x\^{}2+y\^{}2-1,(x,-2,2),(y,-2,2),cmap='jet',plot\_points=500)}{\scriptsize }\\
\texttt{\scriptsize \ttcolor circleplot.show(aspect\_ratio=1)}{\scriptsize }\\
\texttt{\scriptsize \ttcolor upperplot = implicit\_plot(x\^{}2+y\^{}2-1,(x,-2,2),(y,0,2),cmap='jet',plot\_points=500)}{\scriptsize }\\
\texttt{\scriptsize \ttcolor lowerplot = implicit\_plot(x\^{}2+y\^{}2-1,(x,-2,2),(y,-2,0),cmap='hsv',plot\_points=500)}{\scriptsize }\\
\texttt{\scriptsize \ttcolor (upperplot+lowerplot).show(aspect\_ratio=1)}%
}}

The first argument is an expression \texttt{\ttcolor exp} which corresponds
to the equation $\ec\mathtt{\ttcolor exp}=0$. We want to plot $\ec x^{2}+y^{2}=1$,
which corresponds to $\ec x^{2}+y^{2}-1=0$, so $\ec\mathtt{\ttcolor exp}=x^{2}+y^{2}-1$.
The second and third arguments are a range of $x$- and $y$-values
over which to graph $\ec{\ttcolor\texttt{exp}}=0$. The third argument
corresponds to a color. The usual colors don't apply for implicit
plots; stick with \texttt{\ttcolor 'jet'} (blue), \texttt{\ttcolor
'hsv'} (red), and \texttt{\ttcolor 'summer'} (green). The final argument
ensures an accurate graph; if the number is too small, the graph will
be wrong.


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

\noindent We can also differentiate the second example, where it is
not possible to isolate $\ec y$.
\begin{onlyenv}%{}
<1>

\noindent 
\begin{align*}
\ec x^{2}e^{xy} & {\ec=x+y}.
\end{align*}


\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}e^{xy} & {\dims=x+y}\\
\ec2xe^{xy}+x^{2}e^{xy}\cdot\left(y+x{\hilite y'}\right) & {\ec=1+{\hilite y'}}.
\end{align*}
 \begin{explanation}Use the Product Rule and the Chain Rule. We only
write $y'$ when we take the derivative of $y$.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}e^{xy} & {\dims=x+y}\\
\dims2xe^{xy}+x^{2}e^{xy}\cdot\left(y+xy'\right) & \dims=1+y'\\
\ec2xe^{xy}+x^{2}ye^{xy}+x^{3}e^{xy}\cdot{\hilite y'} & {\ec=1+{\hilite y'}}.
\end{align*}
 \begin{explanation}Distribution.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}e^{xy} & {\dims=x+y}\\
\dims2xe^{xy}+x^{2}e^{xy}\cdot\left(y+xy'\right) & \dims=1+y'\\
2xe^{xy}+x^{2}ye^{xy}+x^{3}e^{xy}\cdot{y'} & =1+{y'}\\
\ec\left(x^{3}e^{xy}-1\right){\hilite y'} & {\ec=1-e^{xy}\left(x^{2}+2x\right)}.
\end{align*}
 \begin{explanation}Everything with $y'$ on one side;\\
everything without it to the other.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims x^{2}e^{xy} & {\dims=x+y}\\
\dims2xe^{xy}+x^{2}e^{xy}\cdot\left(y+xy'\right) & \dims=1+y'\\
2xe^{xy}+x^{2}ye^{xy}+x^{3}e^{xy}\cdot{y'} & =1+{y'}\\
\left(x^{3}e^{xy}-1\right){y'} & {=1-e^{xy}\left(x^{2}+2x\right)}\\
\ec{y'} & {\ec=\frac{1-e^{xy}\left(x^{2}+2x\right)}{x^{3}e^{xy}-1}}.
\end{align*}
 \begin{explanation}Solve for $y'$.\end{explanation}

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

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

\noindent The third example asks us to find the derivatives of the
inverse functions of $\ec\sin x$, $\ec\tan x$, and $\ec\sec x$.
The derivatives of these functions have an interesting form. Implicit
differentation allows us to find these derivatives. Start with $\ec\arcsin x$:
\begin{onlyenv}%{}
<1>

\noindent 
\begin{align*}
\ec y & {\ec=\arcsin x}.
\end{align*}


\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims y & {\dims=\arcsin x}\\
\ec\sin y & {\ec=x}.
\end{align*}
 \begin{explanation}Properties of inverse functions.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims\sin y & {\dims=x}\\
\ec\cos y\cdot y' & {\ec=1}.
\end{align*}
 \begin{explanation}Differentiated both sides with respect to $x$.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims\cos y\cdot y' & {\dims=1}\\
\ec y' & {\ec=\frac{1}{\cos y}}.
\end{align*}
 \begin{explanation}Solve for $y'$.\end{explanation}

\end{onlyenv}%{}

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

\noindent 
\begin{align*}
\dims y' & {\dims=\frac{1}{\cos y}}\\
\ec y' & {\ec=\frac{1}{\cos\left(\arcsin x\right)}}.
\end{align*}
 \begin{explanation}Substitute $y=\arcsin x$.\end{explanation}

\end{onlyenv}%{}

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

\noindent  
\begin{align*}
\dims y' & {\dims=\frac{1}{\cos\left(\arcsin x\right)}}\\
\ec y' & {\ec=\frac{1}{\sqrt{1-x^{2}}}}.
\end{align*}
 \begin{explanation}This is a property learned in precalculus; we
explain it briefly. We want to know $\cos\alpha$ where $\alpha=\arcsin x$.
Thus $x=\sin\alpha$, so we can draw a right triangle with hypotenuse
of length $1$ that has an angle of measure $\alpha$ and a leg opposite
$\alpha$ of length $x$. The length of the side adjacent to $\alpha$
will then be $\sqrt{1-x^{2}}$. \end{explanation}

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

\lyxframeend{}\lyxframe{{Third Example}}

\noindent We have the following.
\begin{theorem}%{}
\noindent [(Derivatives of inverse trig functions)]
\begin{itemize}
\item If $\ec f(x)=\arcsin x$, then $\ec f'(x)=\frac{1}{\sqrt{1-x^{2}}}$. 
\item If $\ec f(x)=\arctan x$, then $\ec f'(x)=\frac{1}{{1+x^{2}}}$. 
\item If $\ec f(x)=\arcsec x$, then $\ec f'(x)=\frac{1}{x\sqrt{x^{2}-1}}$. 
\end{itemize}
\end{theorem}%{}
\begin{explanation}You should check on your own that the other two
are correct.\end{explanation}


\lyxframeend{}\lyxframe{{Conclusion}}
\begin{itemize}
\item \emph{\hilite Implicit differentiation} allows us to compute the
derivative in cases where $\ec y$ may not be a function of $\ec x$. 
\item Implicit differentation uses the chain rule: whenever you have to
take the derivative of $\ec y$, you multiply by $\hilite y'$. 
\item Implicit differentiation allowed us to determine the derivatives of
three new functions:\setlength{\shadeboxwidth}{4in}

\begin{theorem}%{}
[(Derivatives of inverse trig functions)]
\begin{itemize}
\item If $\ec f(x)=\arcsin x$, then $\ec f'(x)=\frac{1}{\sqrt{1-x^{2}}}$. 
\item If $\ec f(x)=\arctan x$, then $\ec f'(x)=\frac{1}{{1+x^{2}}}$. 
\item If $\ec f(x)=\arcsec x$, then $\ec f'(x)=\frac{1}{x\sqrt{x^{2}-1}}$. 
\end{itemize}
\end{theorem}%{}

You should remember these derivatives. 

\end{itemize}

\lyxframeend{}
\end{document}
