%\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 8 ]{\large{ Lecture 8} 
\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}
A continuous function is one with an "unbroken" graph
\begin{definition}
A function $f$ is continuous at $x=a$ if:
\begin{itemize}
\item the point $a$ is in the domain of $f$
\item $f(x)$ has a limit as $x \to a$
\item $\lim_{x \to a} f(x)=f(a)$
\end{itemize}
\end{definition}
If $f$ is continuous at every point in its domain, we say $f$ is continuous.\\
{\textbf {\textcolor{red}{Note:}}}
Lots of functions are continuous e.g. polynomials, trigonometric (not $\tan$), $|x|$ and so on.
\end{frame}
\begin{frame}
Here are some examples of discontinuity.
\begin{center}
			\includegraphics[scale=0.4]{Figures/lec48.pdf}
		\end{center}
\end{frame}
\begin{frame}
\begin{example}
Consider the function $$f(x)= \left\{
\begin{array}{ll}
      x+1, & x<2 \\
      bx^{2}, & x\geqslant 2 \\
      
\end{array} 
\right.$$
For what values of $b$ is $f$ continuous at $x=2.$
\end{example}
We have $$\lim_{x \to 2^{-}} f(x)=2+1=3$$
and $$\lim_{x \to 2^{+}} f(x)=b(2)^{2}=4b$$
Also note $$f(2)=b(2)^{2}=4b$$
First, for the function to have a limit at $x=2$, $$\lim_{x \to 2^{-}} f(x)=\lim_{x \to 2^{+}} f(x)$$
\end{frame}
\begin{frame}

so $3=4b$, then $b=3/4$, so $$\lim_{x \to 2} f(x)=3$$
Second, we will check that this value of $b$ ensures $$\lim_{x \to 2} f(x)=f(2)$$
 $3=4b$ or $3=4(3/4)$. So when $b=3/4,$ $f(x)$ is continuous at $x=2$. 

\end{frame}

\begin{frame}{(The Intermediate Value Theorem)}
\begin{theorem}
A function $y=f(x)$ that is continuous on an interval $[a,b]$ takes on every value between $f(a)$ and $f(b)$. In other words, if $y_{0}$ is any value between $f(a)$ and $f(b)$, then $y_{0}=f(c)$ for some $c$ in $[a,b]$ 
\end{theorem}

\begin{center}
			\includegraphics[scale=0.25]{Figures/lec49.pdf}
		\end{center}

\end{frame}
\begin{frame}
\begin{example}
Sketch a discontinuous graph for which the above theorem does not hold 
\end{example}
The function $$f(x)= \left\{
\begin{array}{ll}
      2x-2, & 1\leqslant x<2 \\
      3, & 2 \leqslant x \leqslant 4 \\
      
\end{array} 
\right.$$ 
This function does not take on all values between $f(1)=0$ and $f(4)=3$, it misses all the values between $2$ and $3$.

\begin{center}
			\includegraphics[scale=0.2]{Figures/lec50.pdf}
		\end{center}
\end{frame}
\begin{frame}
\begin{example}
Show that there is a root of the equation $$4x^{3}-6x^{2}+3x-2=0$$
between $1$ and $2$.
\end{example}
Let $f(x)=4x^{3}-6x^{2}+3x-2$, we will use the above theorem with $a=1, b=2, c=0$, so 
\begin{itemize}
\item $f(x)$ is a polynomial so it is continuous 
\item $f(1)=4-6+3-2=-1<0$\\
$f(2)=32-24+6-2=12>0$
\item and $f(a)<c<f(b)$

\end{itemize}
All conditions hold so, there exists a $y$, $1<y<2$ such that $f(y)=0$ \\
So there is a root between $1$ and $2$
\end{frame}
\begin{frame}
\begin{example}
How many roots does $x^{3}+1=3x^{2}$ have?
\end{example}
So, $$x^{3}-3x^{2}+1=0$$
We define $$f(x)=x^{3}-3x^{2}+1$$
$f(x)$ is a polynomial and hence continuous.
\begin{itemize}
\item $f(-1)=-1-3+1<0$ negative
\item $f(0)=1>0$ positive
\item $f(2)=8-3(4)+1<0$ negative
\item $f(3)=1>0$ positive
\end{itemize} 
So using The Intermediate Value Theorem, we see that $f(x)=0$ has $3$ roots. 
\end{frame}
\begin{frame}
\begin{example}
Find the number of asymptotes and discontinuities of $$f(x)=\frac{(x-1)(x-2)}{(x+1)(x-3)}$$ Then find the $x-$intercept and $y-$intercept and plot $f$ 
\end{example}
\begin{example}
How many discontinuities has $$f(x)= \left\{
\begin{array}{ll}
      \frac{(x-1)(x-2)}{(x+1)(x-3)}, & x \neq 1 \\
      1, & x=1 \\
      
\end{array} 
\right.$$ 
\end{example}
\end{frame}


















\end{document}