%\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 7 ]{\large{ Lecture 7} 
\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}
Prove formally that $$\lim_{x \to 7} \frac{-x^{2}+9x-14}{x-7}=-5$$
\end{example}
Given $\epsilon$, then $$|f(x)-l|<\epsilon \Leftrightarrow  |\frac{-x^{2}+9x-14}{x-7}-(-5)|<\epsilon$$
$$\Leftrightarrow |\frac{-(x-7)(x-2)}{x-7}+5|<\epsilon$$
$$\Leftrightarrow |-(x-2)+5|<\epsilon$$
$$\Leftrightarrow |-x+7|<\epsilon \Leftrightarrow |x-7|<\epsilon$$
so we should pick $\epsilon = \delta$
\end{frame}
\begin{frame}
\begin{itemize}
\item $|x-a|<\delta$ is the same as $a-\delta < x < a+\delta$ or $-\delta < x-a < \delta  $
\begin{example}
solve $$|x-7|<3$$
\end{example}
$$-3 < x-7 < 3 \Leftrightarrow 7-3 < x < 7+3 \Leftrightarrow 4 < x < 10$$
\item For $x \in \mathbb{R}$: $$ |x|= \left\{
\begin{array}{ll}
      x, & x \geq 0 \\
      -x, & x<0 \\
      
\end{array} 
\right.$$
\item When multiplying an inequality by a negative number flip the inequality sign.
\end{itemize}
\end{frame}
\begin{frame}{One-sided limits}

\begin{example}
Let $$ f(x)= \left\{
\begin{array}{ll}
      3-x, & x<2 \\
      \frac{x}{2}+1, & x>2 \\
      
\end{array} 
\right.$$
\end{example}
\begin{center}
			\includegraphics[scale=0.25]{Figures/lec44.pdf}
		\end{center}
		\end{frame}
		\begin{frame}
		
{\textbf {\textcolor{red}{Note:}}} \begin{itemize}
\item The function approaches $1$ as $x$ approaches $2$ from the left.
\item The function approaches $2$ as $x$ approaches $2$ from the right. 
\end{itemize}
{\textcolor{red}{Notation:}}
$$\lim_{x \to 2^{-}} f(x)=1 \quad \lim_{x \to 2^{+}} f(x)=2$$
\end{frame}

\begin{frame}
These one-sided limits can be defined formally using the $\epsilon / \delta$ notation.\\
{\textcolor{red}{Clearly:}} $\lim_{x \to 2} f(x)$ above does not exist.
\begin{theorem}
A function $f(x)$ has a limit as $x$ approaches $a$ if and only if it has left-handed and right-handed limits there and these one-sided limits are equal.
$$\lim_{x \to a} f(x)=l \quad \Leftrightarrow  \quad \lim_{x \to a^{-}} f(x)=l \quad and \quad \lim_{x \to a^{+}} f(x)=l$$
\end{theorem}
\begin{example}
$$\lim_{x \to 0^{+}}\sqrt{x}=0$$
\end{example}
\end{frame}
\begin{frame}{Limits at Infinity }

\begin{example}
Find the limit of $y=\frac{1}{x}$ as $x \rightarrow \pm \infty$
\end{example}
\begin{center}
			\includegraphics[scale=0.25]{Figures/lec45.pdf}
		\end{center}  
\end{frame}

\begin{frame}{Asymptotes}

\begin{example}
$$\lim_{x \to \infty} \frac{x+3}{x+2}$$
\end{example}
When dealing with limits at infinity of rational functions it can be useful to divide top and bottom by the highest power of the bottom. $$\lim_{x \to \infty} \frac{x+3}{x+2}=\lim_{x \to \infty} \frac{x(1+\frac{3}{x})}{x(1+\frac{2}{x})}=\lim_{x \to \infty} \frac{(1+\frac{3}{x})}{(1+\frac{2}{x})}=1$$
this exercise tells us that when $x$ get very big, the function tends to 1.\\
 
\end{frame}
\begin{frame}
We say that the function $\displaystyle {\frac{x+3}{x+2}}$ has a \textit{horizontal asymptote} $y=1$
\begin{definition}
A line $y=b$ is a horizontal asymptote of the graph of a function $y=f(x)$ if either $$\lim_{x \to \infty} f(x)=b \quad or \quad \lim_{x \to -\infty} f(x)=b$$
\end{definition} 


\end{frame}
\begin{frame}
\begin{example}
Find the horizontal asymptote of $f(x)=\frac{5x^{2}+8x-3}{3x^{2}+2}$
\end{example}
$$\lim_{x \to \infty} \frac{5x^{2}+8x-3}{3x^{2}+2} = \lim_{x \to \infty} \frac{5+(8/x)-(3/x^{2})}{3+(2/x^{2})}=\frac{5+0-0}{3+0}=\frac{5}{3}$$
\begin{center}
			\includegraphics[scale=0.25]{Figures/lec46.pdf}
		\end{center}  
\end{frame}
\begin{frame}
Note that the denominator of $\displaystyle {\frac{x+3}{x+2}}$ is zero when $x=-2$.
$$\lim_{x \to -2^{-}} \frac{x+3}{x+2}=-\infty \quad \lim_{x \to -2^{+}} \frac{x+3}{x+2}=\infty$$
We say that the function $\displaystyle {\frac{x+3}{x+2}}$ has a \textit{vertical asymptote} 
$x=-2$
\begin{definition}
A line $x=a$ is a vertical asymptote of the graph of a function $y=f(x)$ if either $$\lim_{x \to a^{+}} f(x)=\infty \quad or \quad \lim_{x \to a^{-}} f(x)=\infty$$
\end{definition}

\end{frame}
\begin{frame}
\begin{center}
			\includegraphics[scale=0.25]{Figures/lec40.pdf}
		\end{center}  
\end{frame}
\begin{frame}
\begin{example}
Find all asymptotes of $f(x)$ and plot $$f(x)=\frac{x^{2}-3}{2x-4}$$writing this as a strictly proper rational function $$f(x)=\frac{x}{2}+1+\frac{1}{2x-4}$$  so, when $x$ gets very big $f(x)$ tends to $\frac{x}{2}+1$.\\
Also when $x$ gets very negative, $f(x)$ tends to $\frac{x}{2}+1$.\\
when $2x-4=0$ or $x=2$, we have a vertical asymptote.\\
the zeros of the function are: $$x^{2}-3=0 \Rightarrow x=\pm 3$$
\end{example}
\end{frame}
\begin{frame}
\begin{center}
			\includegraphics[scale=0.3]{Figures/lec41.pdf}
		\end{center}  
\end{frame}
\begin{frame}
\begin{example}
Find the horizontal and vertical asymptotes of the graph of $$f(x)=-\frac{8}{x^{2}-4}$$
\end{example}
First, since $\lim_{x \to \infty} f(x)=0$, the line $y=0$ is a horizontal asymptote.
Also, since $$\lim_{x \to 2^{+}} f(x)=-\infty \quad and \quad \lim_{x \to 2^{-}} f(x)=\infty$$ 
the line $x=2$ is a vertical asymptote both from the right and from the left.
\end{frame}
\begin{frame}
\begin{center}
			\includegraphics[scale=0.3]{Figures/lec47.pdf}
		\end{center}
\end{frame}
\begin{frame}{Exercises}
\begin{itemize}
\item $$\lim_{x \to 2^{-}}\frac{x-3}{x^{2}-4}$$
\item $$\lim_{x \to 2^{-}} \frac{x-3}{x^{2}-4}$$
\item $$\lim_{x \to 2} \frac{2-x}{(x-2)^{3}}$$

\end{itemize}
\end{frame}



















\end{document}