%% 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}
\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} }


%INPUT THE INSTRUCTIONS PAGE 


%BUILD  TITLE PAGE 



\title{Derivatives of trigonometric functions}


\subtitle{In this module we will determine more efficient ways of computing
the derivatives of \emph{\hilite trigonometric functions}. }

\makebeamertitle
%1



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

\noindent The precise definition of the derivative tells us that
\[
{\ec f'(x)=\lim_{h\rightarrow0}\frac{f(x+h)-f(x)}{h}}.
\]
 It is often tedious to compute the derivative using the precise definition.
We would like a shorter way of computing the derivative for trigonometric
functions.

You saw in the module on experimental derivatives that the derivative
of $\ec\sin x$ appears to be $\ec\cos x$. In this module we argue
that this is in fact the case, and discuss as well the derivatives
of the other trigonometric functions $\ec\cos x$, $\ec\tan x$, $\ec\cot(x)$,
$\ec\sec x$, $\ec\csc x$. %2



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

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


\lyxframeend{}\lyxframe{{The derivative of $\sin x$}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent Let $\ec f(x)=\sin x$. We want to compute the derivative
of $\ec f(x)$.


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

From the definition, we know that
\[
{\ec f'(x)=\lim_{h\rightarrow0}\frac{f(x+h)-f(x)}{h}=\lim_{h\rightarrow0}\frac{\sin(x+h)-\sin x}{h}}.
\]


\end{onlyenv}%{}

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

From the definition, we know that
\[
\ec f'(x)=\lim_{h\rightarrow0}\frac{\sin(x+h)-\sin x}{h}.
\]



It is not immediately obvious how we should simplify this. Let's try
some properties of trigonometric functions.


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

Recall that 
\[
{\ec\sin(x+h)=\sin x\cos h+\sin h\cos x}.
\]
We'll rewrite the expression above using this fact.

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

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

From the definition, we know that
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\sin(x+h)-\sin x}{h}\\
 & {\ec=\lim_{h\rightarrow0}\frac{\sin x\cos h+\sin h\cos x-\sin x}{h}}.
\end{align*}
 Next we'll collect expressions containing $\ec\sin x$.

\end{onlyenv}%{}

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

From the definition, we know that
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\sin x\cos h+\sin h\cos x-\sin x}{h}\\
 & {\ec=\lim_{h\rightarrow0}\frac{\sin x\left(\cos h-1\right)+\sin h\cos x}{h}}.
\end{align*}
 At this point we will apply some algebraic machinery. The limit would
look a lot easier if we could remove the terms containing $\ec x$.
Unfortunately, we can't factor them, so we have to try something different.
We'll try the property of limits that \emph{if} the limit of two functions
$\ec g$ and $\ec k$ exist, then the limit of their sum is the sum
of their limits. That is\ldots{}

\end{onlyenv}%{}

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

From the definition, we know that
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\sin x\left(\cos h-1\right)+\sin h\cos x}{h}\\
 & \ec\overset{?}{=}\lim_{h\rightarrow}\frac{\sin x\left(\cos h-1\right)}{h}+\lim_{h\rightarrow0}\frac{\sin h\cos x}{h}\\
 & {\ec\overset{?}{=}\sin x\cdot\lim_{h\rightarrow}\frac{\left(\cos h-1\right)}{h}+\cos x\cdot\lim_{h\rightarrow0}\frac{\sin h}{h}}.
\end{align*}
 The symbol $\ec\overset{?}{=}$ indicates that we don't know the
two sides are equal, because we don't know that these limits exist.


\begin{explanation}We also used the constant multiple property of
limits: $\ec\sin x$ and $\ec\cos x$ are constant with respect to
a limit on $\ec h$.)\end{explanation}

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

\lyxframeend{}\lyxframe{{Do these limits exist?}}
\begin{overlayarea}
{\textwidth}{6in}
\begin{onlyenv}%{}
<1-2>

\noindent We will not prove that these limits have values; we will
simply approximate them. Turn to SAGE now and estimate the limits
\begin{align*}
\ec\lim_{h\rightarrow}\frac{\left(\cos h-1\right)}{h} & \ec=?\\
\ec\lim_{h\rightarrow0}\frac{\sin h}{h} & {\ec=?}.
\end{align*}



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

\begin{explanation}\emph{Hint:} Use either a numerical table or a
graph to approximate the limit.\end{explanation}

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

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

\noindent We will not prove that these limits have values; we will
simply approximate them. Turn to SAGE now and estimate the limits
\begin{align*}
\ec\lim_{h\rightarrow}\frac{\left(\cos h-1\right)}{h} & \ec=0\\
\ec\lim_{h\rightarrow0}\frac{\sin h}{h} & {\ec=1}.
\end{align*}
 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.2]{figures/lim_sinx_x} \qquad{}\includegraphics[scale=0.2]{figures/lim_cosx_1_x}
\caption{ Plots of $\ec\sin h/h$ (left) and $\ec(\cos h-1)/h$ (right).}
\end{figure}


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

\lyxframeend{}\lyxframe{The derivative of $\sin x$}
\begin{overlayarea}
{\textwidth}{6in}

\noindent Let $f(x)=\sin x$. We want to compute the derivative of
$f(x)$.
\begin{onlyenv}%{}
<1>

From the definition, we know that
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\sin x\left(\cos h-1\right)+\sin h\cos x}{h}\\
 & \ec=\lim_{h\rightarrow}\frac{\sin x\left(\cos h-1\right)}{h}+\lim_{h\rightarrow0}\frac{\sin h\cos x}{h}\\
 & {\ec=\sin x\cdot\lim_{h\rightarrow}\frac{\left(\cos h-1\right)}{h}+\cos x\cdot\lim_{h\rightarrow0}\frac{\sin h}{h}}.
\end{align*}
 Now we know that the limits exist, so we can apply the limit properties
without qualms.

\end{onlyenv}%{}

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

From the definition, we know that
\begin{align*}
\dims f'(x) & \dims=\sin x\cdot\lim_{h\rightarrow}\frac{\left(\cos h-1\right)}{h}+\cos x\cdot\lim_{h\rightarrow0}\frac{\sin h}{h}\\
 & {\ec=\sin x\cdot0+\cos x\cdot1}.
\end{align*}


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

\lyxframeend{}\lyxframe{{The derivative of $\sin x$}}

\noindent Thus
\begin{theorem}%{}
\noindent The derivative of $\ec\sin x$ is $\ec\cos x$.
\end{theorem}%{}
\noindent This confirms our intuition from the experimentation.


\lyxframeend{}\lyxframe{{The derivative of $\cos x$}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent Now let's turn to the derivative of $\ec\cos x$.
\begin{onlyenv}%{}
<1>

Experimenting with the {\hilite Function Factory} and {\hilite
Tangent Line Guesser} SAGElets suggests that the derivative of $\ec\cos x$
is $\ec-\sin x$. The precise definition gives us
\begin{align*}
\ec f'(x) & {\ec=\lim_{h\rightarrow0}\frac{\cos\left(x+h\right)-\cos x}{h}}.
\end{align*}


\end{onlyenv}%{}

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

Experimenting with the {\hilite Function Factory} and {\hilite
Tangent Line Guesser} SAGElets suggests that the derivative of $\ec\cos x$
is $\ec-\sin x$. The precise definition gives us
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\cos\left(x+h\right)-\cos x}{h}\\
 & {\ec=\lim_{h\rightarrow0}\frac{\cos x\cos h-\sin x\sin h-\cos x}{h}}.
\end{align*}
 \begin{explanation}Trig property.\end{explanation}

\end{onlyenv}%{}

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

Experimenting with the {\hilite Function Factory} and {\hilite
Tangent Line Guesser} SAGElets suggests that the derivative of $\ec\cos x$
is $\ec-\sin x$. The precise definition gives us
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\cos x\cos h-\sin x\sin h-\cos x}{h}\\
 & {\ec=\lim_{h\rightarrow0}\frac{\cos x\left(\cos h-1\right)-\sin x\sin h}{h}}.
\end{align*}
 \begin{explanation}Collected $\cos x$.\end{explanation}

\end{onlyenv}%{}

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

Experimenting with the {\hilite Function Factory} and {\hilite
Tangent Line Guesser} SAGElets suggests that the derivative of $\ec\cos x$
is $\ec-\sin x$. The precise definition gives us
\begin{align*}
\dims f'(x) & \dims=\lim_{h\rightarrow0}\frac{\cos x\left(\cos h-1\right)-\sin x\sin h}{h}\\
 & {\ec=\cos x\cdot\lim_{h\rightarrow0}\frac{\cos h-1}{h}-\sin x\cdot\lim_{h\rightarrow0}\frac{\sin h}{h}}.
\end{align*}
 \begin{explanation}Limit properties. We argued earlier that these
limits exist.\end{explanation}

\end{onlyenv}%{}

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

Experimenting with the {\hilite Function Factory} and {\hilite
Tangent Line Guesser} SAGElets suggests that the derivative of $\ec\cos x$
is $\ec-\sin x$. The precise definition gives us
\begin{align*}
\dims f'(x) & \dims=\cos x\lim_{h\rightarrow0}\frac{\cos h-1}{h}-\sin x\lim_{h\rightarrow0}\frac{\sin h}{h}\\
 & {\ec=\cos x\cdot0-\sin x\cdot1}.
\end{align*}


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

\lyxframeend{}\lyxframe{{The derivative of $\cos x$}}

\noindent Thus
\begin{theorem}%{}
\noindent The derivative of $\ec\cos x$ is $\ec-\sin x$.
\end{theorem}%{}

\lyxframeend{}\lyxframe{{The derivatives of other trig functions}}
\begin{overlayarea}
{\textwidth}{6in}

\noindent Other trig functions can be derived using
\begin{itemize}
\item the derivatives of $\ec\sin x$ and $\ec\cos x$, and 
\item the properties of derivatives. \end{itemize}
\begin{onlyenv}%{}
<1>

For example, $\ec\tan x=(\sin x)/(\cos x)$, so its derivative is
(from the quotient rule) 
\begin{align*}
\ec\frac{\cos x\cdot\cos x-\sin x\cdot(-\sin x)}{\cos^{2}x} & \phantom{=\frac{\cos^{2}x+\sin^{2}x}{\cos^{2}x}}
\end{align*}


\end{onlyenv}%{}

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

For example, $\ec\tan x=(\sin x)/(\cos x)$, so its derivative is
(from the quotient rule) 
\begin{align*}
\ec\frac{\cos x\cdot\cos x-\sin x\cdot(-\sin x)}{\cos^{2}x} & \ec=\frac{\cos^{2}x+\sin^{2}x}{\cos^{2}x}
\end{align*}


\end{onlyenv}%{}

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

For example, $\ec\tan x=(\sin x)/(\cos x)$, so its derivative is
(from the quotient rule) 
\begin{align*}
\dims\frac{\cos x\cdot\cos x-\sin x\cdot(-\sin x)}{\cos^{2}x} & \dims=\frac{\cos^{2}x+\sin^{2}x}{\cos^{2}x}\\
 & \ec=\frac{1}{\cos^{2}x}
\end{align*}
 \begin{explanation}Pythagorean identity.\end{explanation}

\end{onlyenv}%{}

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

For example, $\ec\tan x=(\sin x)/(\cos x)$, so its derivative is
(from the quotient rule) 
\begin{align*}
\dims\frac{\cos x\cdot\cos x-\sin x\cdot(-\sin x)}{\cos^{2}x} & \dims=\frac{\cos^{2}x+\sin^{2}x}{\cos^{2}x}\\
 & \dims=\frac{1}{\cos^{2}x}\\
 & {\ec=\sec^{2}x}.
\end{align*}


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

\lyxframeend{}\lyxframe{{The derivative of other trig functions}}

\noindent Similar arguments will give the derivatives of other trig
functions. We omit the details and summarize here.
\begin{theorem}%{}
[(The derivatives of basic trig functions)]
\begin{itemize}
\item The derivative of $\ec\sin x$ is $\ec\cos x$. 
\item The derivative of $\ec\cos x$ is $\ec-\sin x$. 
\item The derivative of $\ec\tan x$ is $\ec\sec^{2}x$. 
\item The derivative of $\ec\cot x$ is $\ec-\csc^{2}x$. 
\item The derivative of $\ec\sec x$ is $\ec\sec x\tan x$. 
\item The derivative of $\ec\csc x$ is $\ec-\csc x\cot x$. 
\end{itemize}
\end{theorem}%{}
You should commit these to memory.


\lyxframeend{}\lyxframe{{Example 1}}

\noindent The properties of derivatives allow us to say that if $\ec f(x)=3\tan x-2\cos x$
then
\[
{\ec f'(x)=3\sec^{2}x+2\sin x}.
\]



\lyxframeend{}\lyxframe{{Example 2}}

\noindent If we want to find the equation of the line tangent to $\ec\sin x$
at $\ec x=\pi/3$, its slope is $\cos\left(\pi/3\right)$ and so the
line is
\begin{align*}
\ec y-\frac{\sqrt{3}}{2} & \ec=\frac{1}{2}\left(x-\frac{\pi}{3}\right)\\
\ec y & {\ec=\frac{x}{2}-\frac{\pi}{6}+\frac{\sqrt{3}}{2}}.
\end{align*}
 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.3]{figures/tanline} 
\end{figure}



\lyxframeend{}\lyxframe{{Example 3}}

\noindent Since $\ec1\approx\pi/3$, we can compute a linear approximation
of $\ec\sin1$ using the tangent line at $\ec x=\pi/3$. 
\begin{align*}
\ec\sin1\approx L(1) & \ec=\cos\left(\frac{\pi}{3}\right)\left(1-\frac{\pi}{3}\right)+\sin\left(\frac{\pi}{3}\right)\\
 & \ec=\frac{1}{2}\left(1-\frac{\pi}{3}\right)+\frac{\sqrt{3}}{2}\\
 & \ec=\frac{3\left(1+\sqrt{3}\right)-\pi}{6}\\
 & {\ec\approx0.8424}.
\end{align*}
 In fact, $\ec\sin1\approx0.8415$.


\lyxframeend{}\lyxframe{{Conclusion}}
\begin{itemize}
\item We found a shortcut for {\hilite the derivatives of trigonometric
functions}.\setlength{\shadeboxwidth}{4in} \end{itemize}
\begin{theorem}%{}
[(The derivatives of basic trig functions)]
\begin{itemize}
\item The derivative of $\ec\sin x$ is $\ec\cos x$. 
\item The derivative of $\ec\cos x$ is $\ec-\sin x$. 
\item The derivative of $\ec\tan x$ is $\ec\sec^{2}x$. 
\item The derivative of $\ec\cot x$ is $\ec-\csc^{2}x$. 
\item The derivative of $\ec\sec x$ is $\ec\sec x\tan x$. 
\item The derivative of $\ec\csc x$ is $\ec-\csc x\cot x$. 
\end{itemize}
\end{theorem}%{}
\begin{itemize}
\item To find these shortcuts, we used the precise definition of the derivative,
argued the values of limits using geometry, and used properties of
the derivative. 
\end{itemize}

\lyxframeend{}
\end{document}
