%\documentclass[c]{beamer}

%\usecolortheme{whale}


\documentclass[xcolor=dvipsnames,envcountsect]{beamer} 
%\documentclass{beamer}
\beamertemplatenavigationsymbolsempty 
\usecolortheme[named=Blue]{structure} %change
%\usecolortheme{seahorse}
%\usecolortheme{rose}
 %default blue to brown
%\usetheme{Warsaw}
%\usetheme{CambridgeUS}
\useoutertheme{infolines}
%\usecolortheme{dolphin}
%\usefonttheme{serif}
\usetheme{Madrid}

%\addtocounter{framenumber}{-5} 
%\setbeamertemplate{footline}[default] 
\usefonttheme{professionalfonts} % using non standard fonts for beamer
%\usefonttheme{serif} % default family is serif


\usepackage{multicol}
%\usepackage[compatibility=false]{caption}
%\usepackage{subfig}
\usepackage{algcompatible}
\usepackage[section]{algorithm}
\usepackage{algorithmicx}
%\usepackage{algorithmic}
\usepackage{algpseudocode}

%\usepackage[caption=false]{subfig}


%\usetheme{Frankfurt}
%\usetheme{AnnArbor}
% % % % % % % % % % %
%\usepackage{fancyhdr}
%\usepackage{graphicx}
%\usepackage{caption}
%\usepackage{tikz,siunitx}
%
%\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}
%
%\usetikzlibrary{automata,arrows}
%\usepackage{subcaption}
%\usepackage{enumitem}
%\setlist{nolistsep}
%\usepackage{float}
% % % % % % % % % % %


\usepackage{extarrows}
\usepackage{verbatim}
\usepackage{bm}
\usepackage[all,cmtip]{xy}
\usepackage[framemethod=default]{mdframed}
\def\Ker{\textrm {Ker\,}}
\def\Im{\textrm{Im\,}}
\def\Z{\mathbb{Z}}
\def\N{\mathcal{N}}
\def\Z{\mathbb{Z}}
\def\F{\mathbb{F}}
\def\Aut{\mathrm{Aut}}
\def\rightiso{\xrightarrow{\simeq}}
\def\B{B}
\def\H{H}
\def\A{\mathcal{A}}
\def\Bb{\overline{B}}
\def\Rb{\overline{R}}
%\def\p{} 
\def\p{\pause}
\def\cl{\color{blue}}
\def\clg{\color{red}}
%\usefonttheme{structuresmallcapsserif}
\def\cl{\color{blue}}
\def\clg{\color{red}}



\setbeamertemplate{theorems}[numbered]



\newtheorem{proposition}{Proposition}[section]
\newtheorem*{conjecture}{Conjecture}
%\theoremstyle{definition} \newtheorem{algorithm}{Algorithm}[section]
\theoremstyle{definition} \newtheorem{remark}{Remark}[section]


\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\renewcommand{\algorithmicprocedure}{\textbf{Procedure:}}
\renewcommand{\Procedure}{\textbf{Function:}}
\renewcommand{\EndProcedure}{\textbf{EndFunction:}}

\usepackage{ifthen}

% This is the file main.tex


\newcommand\uleft[2]{\,{}^{#1}\hspace*{-.1em}{#2}}
\def\idgroup{\mathbf{1}}
\newcommand\rdef[1]{\textit{\textcolor{blue}{#1}}}
\newcommand\mdef[1]{\textcolor{Brown}{#1}}

\newcommand\link[2]{\hyperlink{#2}{\beamergotobutton{#1}}}

\def\GAP{{\sf GAP} }
\def\HAP{{\sf HAP} }
\def\XMod{{\sf XMod}}
\def\C{\mathcal{C}}
\def\ZG{\mathbb{Z}G}
\input{rbg}
\def\minusvspace{\vspace*{-18pt}}
\def\xyscale{\xymatrixrowsep{0.25in} \xymatrixcolsep{0.25in}}

\def\xysmall{\xymatrixrowsep{0.15in} \xymatrixcolsep{0.15in}} 
\def\Ne{\mathcal{N}}
\def\CW{\textrm{CW}}
\parskip 0.1in

\input{def}

\def\xd{\vspace*{10pt}}
\def\ixd{\vspace*{3pt}}



 




\title[]{MA140-Engineering Calculus}
\author[Lecture 5 ]{\large{ Lecture 5 } 
\and %\\ \small{Supervisor: Dr. John Burns}
\\ 
 \includegraphics[scale=0.0]{Figures/lec14.jpg}}
%\date[June 2-4, 2016]{June 2-4, 2016}
%\institute[Uppsala University]{ }


\begin{document}
\begin{frame}
\titlepage
\end{frame}


\section{MA140}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\begin{example}
Evaluate: $$\lim_{x \to 1} \frac{x^{2}+x-2}{x^{2}-x}$$
\end{example}
 {\textcolor{blue}{$$\lim_{x \to 1} \frac{x^{2}+x-2}{x^{2}-x}=\lim_{x \to 1} \frac{(x-1)(x+2)}{x(x-1)}=\lim_{x \to 1} \frac{x+2}{x}=3$$}} 
 {\textbf {\textcolor{red}{Note:}}} If the denominator is zero, canceling common factors in the numerator and denominator may reduce the fraction to one whose denominator is no longer zero
\end{frame}
\begin{frame}
\begin{example}
$$\lim_{x \to 2} (\frac{1}{2}-\frac{1}{x})\frac{1}{x-2}$$
\end{example}
$$\lim_{x \to 2} (\frac{1}{2}-\frac{1}{x})\frac{1}{x-2}=\lim_{x \to 2} \frac{x-2}{2x} \cdot \frac{1}{x-2}$$
$$\hspace{3.5cm} =\lim_{x \to 2} \frac{1}{2x}=\frac{1}{2(2)}=\frac{1}{4}$$
\end{frame}
\begin{frame}
\begin{example}
Evaluate $$\lim_{x\to 0} \frac{\sqrt{1+x^{2}}-1}{x^{2}}$$
\end{example}
{\textcolor{blue}{$$\lim_{x\to 0} \frac{\sqrt{1+x^{2}}-1}{x^{2}}=\lim_{x\to 0} \frac{(\sqrt{1+x^{2}}-1)(\sqrt{1+x^{2}}+1)}{x^{2}(\sqrt{1+x^{2}}+1)}$$\\
$\hspace{1cm} \displaystyle{ \lim_{x\to 0} \frac{(1+x^{2}-1)}{x^{2}(\sqrt{1+x^{2}}+1)}=\lim_{x\to 0} \frac{(x^{2})}{x^{2}(\sqrt{1+x^{2}}+1)}}$
$$\lim_{x\to 0} \frac{1}{\sqrt{1+x^{2}}+1}=\frac{1}{\sqrt{1}+1}=1/2$$}}
\end{frame}
\begin{frame}

\begin{theorem}{Sandwich Theorem}
Suppose that $g(x)\leq f(x) \leq h(x)$ for all $x$ in some open interval containing $c$, except possibly at $c$ itself. Suppose also that $$\lim_{x \to c} g(x)=\lim_{x \to c} h(x)=L$$
Then $\lim_{x \to c} f(x)=L$
\end{theorem}
\begin{center}
			\includegraphics[scale=0.2]{Figures/lec32.pdf}
		\end{center}
		\end{frame}
		\begin{frame}
\begin{example}
Given $$1-\frac{x^{2}}{4}\leq u(x) \leq 1+\frac{x^{2}}{2} \quad for all \quad x\neq 0$$
Find the $\lim_{x \to 0} u(x)$, no matter how complicated $u$ is.
\end{example}
Since $$\lim_{x \to 0} (1-\frac{x^{2}}{4})=1 \quad and \quad \lim_{x \to 0} (1+\frac{x^{2}}{2})=1$$ the Sandwich theorem implies that $$\lim_{x \to 0} u(x)=1$$
\end{frame}
\begin{frame}
\begin{center}
			\includegraphics[scale=0.5]{Figures/lec31.png}
		\end{center}
\end{frame}
\begin{frame}
\begin{example}
An important limit: $$\lim_{x\to 0} \frac{\sin x}{x}=1$$
\end{example}

\begin{center}
			\includegraphics[scale=0.25]{Figures/lec23.pdf}
		\end{center}
\end{frame}
\begin{frame}
Area of $\triangle OAP < $ Area of the sector $OAP < $ Area of $\triangle OAT$\\ 
Area of $\triangle OAP=\frac{1}{2} \sin \theta $\\
Area of the sector $OAP=\frac{1}{2}r^{2}\theta=\frac{\theta}{2}$\\
Area of $\triangle OAT=\frac{1}{2} \tan \theta $ 
$$\frac{1}{2}\sin \theta < \frac{1}{2} \theta < \frac{1}{2} \tan \theta$$
$$1 < \frac{\theta}{\sin \theta} < \frac{1}{\cos \theta} $$
Taking the reciprocals reverses the inequalities so:
$$1 > \frac{\sin \theta}{\theta} > \cos \theta $$
Since $\lim_{\theta \to 0}\cos \theta=\lim_{\theta \to 0} 1=1$, The Sandwich theorem gives:
$$\lim_{\theta \to 0} \frac{\sin \theta}{\theta}=1$$


\end{frame}



\begin{frame}
\begin{example}
$$\lim_{x \to 0} \frac{\tan 3x}{\sin 2x}$$
\end{example}
$$\hspace{-3cm} \lim_{x \to 0} \frac{\tan 3x}{\sin 2x}=\lim_{x \to 0} \frac{\sin 3x}{\cos 3x} \cdot \frac{1}{\sin 2x}$$
$$=\lim_{x \to 0} \sin 3x \cdot \frac{1}{\cos 3x} \cdot \frac{1}{\sin 2x}$$
$$\hspace{1cm} =\lim_{x \to 0} \frac{\sin 3x}{3x} \cdot \frac{1}{\cos 3x} \cdot \frac{2x}{\sin 2x} \cdot \frac{3x}{2x}$$
$$=(\lim_{x \to 0} \frac{\sin 3x}{3x})(\lim_{x \to 0} \frac{1}{\cos 3x})(\lim_{x \to 0} \frac{2x}{\sin 2x})(\lim_{x \to 0} \frac{3x}{2x})$$
$$=(1)(1)(1)(3/2)=3/2$$
\end{frame}






















\end{document}