%\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 6 ]{\large{ Lecture 6} 
\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}
$$\lim_{x \to 0} \frac{1-\cos x}{x^{2}}$$
\end{example}
Note: $\cos (2A)=1-2\sin^{2}(A)$\\
Let: $A=x/2$, then 
$\Rightarrow \quad \cos x=1-2\sin^{2} x/2,$ so $$\hspace{-3cm} \lim_{x \to 0} \frac{1-\cos x}{x^{2}}
=\lim_{x \to 0} \frac{1-[1-2\sin^{2}(x/2)]}{x^{2}}$$
$$\hspace{2cm} =\lim_{x \to 0} \frac{2\sin^{2}(x/2)}{x^{2}}=\lim_{x \to 0} 2\frac{\sin x/2}{x/2} \cdot \frac{\sin x/2}{x/2} \cdot (1/2)(1/2)$$
$$=\lim_{x \to 0} 2\frac{\sin x/2}{x/2} \cdot \frac{\sin x/2}{x/2} \cdot (1/2)(1/2) $$
$$=\lim_{x \to 0} \frac{\sin x/2}{x/2} \cdot \lim_{x \to 0} \frac{\sin x/2}{x/2} \cdot 1/2$$
$\hspace{3cm} =(1)(1)(1/2)=1/2$
\end{frame}

\begin{frame}

{\textbf {\textcolor{red}{Useful approximation:}}}\\
$1.$ when $x \to 0$ then $\cos x \quad \approx \quad 1-\frac{x^{2}}{2}$\\
$2.$ when $x \to 0$ then $\sin x \quad \approx \quad x-\frac{x^{3}}{6}$\\
\begin{example}
$$\lim_{x \to 0} \frac{\sin x-x}{x^{3}}$$
\end{example}
$$\lim_{x \to 0} \frac{\sin x-x}{x^{3}}=\lim_{x \to 0} \frac{[x-\frac{x^{3}}{6}]-x}{x^{3}}$$
$$\hspace{2cm} =\lim_{x \to 0} \frac{-\frac{x^{3}}{6}}{x^{3}}=-1/6$$
\end{frame}
\begin{frame}
a lot of limit analysis ends with $\infty$, in these cases we say that the limit does not exist.  $$\frac{infinity}{constant\neq 0} \quad or \quad \frac{constant\neq 0}{0} \Rightarrow \infty$$
\begin{example}
$\lim_{x \to 0} 1/x=1/0=\infty$
\begin{center}
			\includegraphics[scale=0.5]{Figures/lec33.png}
		\end{center}
\end{example}
\end{frame}
\begin{frame}
\begin{example}
If $f(x)=\frac{x+1}{x^{3}}$, find $\lim_{x \to 0} f(x)$
\end{example}
$f(x)$ tends to $\frac{constant \approx 1}{\approx 0}$\\
so $\lim_{x \to 0} f(x)=\infty$, it does not exist. \\
{\textbf {\textcolor{red}{Note:}}}\\
$$\frac{constant \neq 0}{infinity} \quad or \quad \frac{0}{constant\neq 0} \quad \Rightarrow 0$$
\end{frame}
\begin{frame}

one can think of sequences as values of continuous functions at $x=1,2,3,\cdots$\\
for example $f(x)=x^{2}+1$, $a_{n}=n^{2}+1$\\
$\{a_{n}\}=\{2,5,10,17,\cdots\}$\\
we can use our limit theory on continuous functions to decide if a sequence has a limit.
\end{frame}
\begin{frame}
\begin{example}
Does $\{a_{n}\}$ with $a_{n}=\frac{n^{2}+1}{n+1}$ have a limit.\\
$\lim_{n \to \infty} \frac{n^{2}+1}{n+1}=\lim_{n \to \infty} \frac{n+\frac{1}{n}}{1+\frac{1}{n}}=\infty$
\end{example}
$\{a_{n}\}$ has no limit if diverges to infinity\\

\end{frame}

\begin{frame}
\begin{center}
			\includegraphics[scale=0.5]{Figures/lec22.pdf}
		\end{center}
		\begin{itemize}
		%\item $x$ is a variable
		%\item $f(x)$ is a function
		\item $a$ is a fixed number which $x$ can take i.a. $x=a$
		\item $\delta$ and $\epsilon$ are small positive numbers i.e. $\delta > 0$
		%\item $\epsilon$ is a small positive number
		\item $|x-a| < \delta$ the distance from $x$ to $a$ is less than $\delta$
		\item $f(x)$ approaches a number $l$ as $x$ approaches $a$
		\end{itemize}
\end{frame}

\begin{frame}
So if I am able to find a $\delta$ given an $\epsilon$ then (in an informal way) this means:\\
that we can make the value of $f(x)$ as close as we like to $L$ by taking $x$ sufficiently close to $a$.\\
\textbf{Formally}:\\
A function $f(x)$ is said to approach a limit $l$ as $x$ approaches the value $a$, if given any small positive number $\epsilon$, it is possible to find a positive number $\delta$, such that for any $x$:$$|x-a|<\delta \quad \Rightarrow \quad |f(x)-l|<\epsilon $$ 
we write $$\lim_{x\to a} f(x)=l$$  
\end{frame}
\begin{frame}
\begin{example}
Prove formally that: $$\lim_{x\to 3} (4x-5)=7$$
\end{example}
Given $\epsilon$, then $$|f(x)-l|<\epsilon \Leftrightarrow |(4x-5)-7|<\epsilon$$ $$\Leftrightarrow |4x-5-7|<\epsilon$$ $$\Leftrightarrow |4x-12|<\epsilon$$  $$\Leftrightarrow 4|x-3|<\epsilon$$  $$\Leftrightarrow |x-3|<\epsilon/4$$
so if we pick $\delta=\epsilon/4$ then from above we see that  if $|x-3|<\delta=\epsilon/4$ implies  $\delta$ so $|(4x-5)-7|<\epsilon$.
\end{frame}


\begin{frame}{Exercises}
\begin{itemize}
\item[(1)] $$\lim_{x \to 2} \frac{x^{3}-8}{x^{2}-4}$$
\item[(2)] $$\lim_{x \to 1} \frac{x^{2}-1}{(\sqrt{x}-1)(x+2)}$$
\item[(3)] $$\lim_{x \to 0} \frac{\sin^{2}x}{\sin 2x \cdot \tan 4x}$$
\item[(4)] $$\lim_{x \to 0} x \cos \frac{1}{x^{2}}$$
\end{itemize}

\end{frame}


















\end{document}