%\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}
\usepackage{amsmath}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}

%\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 15 ]{\large{ Lecture 15} 
\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}
Sketch the graph of the function $$f(x)=\frac{1}{1+e^{3x}}$$
\end{example}
{\textcolor{red}{Step $(1)$}}:\\
Find the critical points, we can write $f(x)$ as, $f(x)=(1+e^{3x})^{-1}$, so 
$$f'(x)=-3(e^{3x})(1+e^{3x})^{-2}=\frac{-3e^{3x}}{(1+e^{3x})^{2}}$$ 
As for all $x\in \mathbb{R}$, $e^{3x}>0$, so $f'(x)$ has no root and it is always negative which means that the function is always decreasing. \\
{\textcolor{red}{Step $(2)$}}:\\
Find the points of inflection: $$f''(x)=\frac{(1+e^{3x})^{2}[-9e^{3x}]-[-3e^{3x}][6e^{3x}(1+e^{3x})]}{(1+e^{3x})^{4}}$$
\end{frame}
\begin{frame}
Setting $f''(x)=0$, we have $$(1+e^{3x})^{2}(-9e^{3x})+[3e^{3x}][6e^{3x}(1+e^{3x})]=0$$
$$\Rightarrow (1+e^{3x})(-9)+18e^{3x}=0 \Rightarrow 1+e^{3x}=2e^{3x} \Rightarrow 1=e^{3x}$$ 
So $x=0$ could be the point of inflection, we need to check whether the second derivative changes sign around this point or not.\\
{\textcolor{red}{Step $(3)$}}:\\
No need to use the second derivative test, as there is no critical point. \\
{\textcolor{red}{Step $(4)$}}:\\
$f(0)=1/2$, the function has no x-intercept as $f(x)$ is never zero.
\end{frame}
\begin{frame}
As $f(x)$ is a rational function. we should also find the asymptotes
$$\lim_{x\to \infty}\frac{1}{1+e^{3x}}=0$$ also $$\lim_{x\to -\infty}\frac{1}{1+e^{3x}}=\frac{1}{1+0}=1$$
Is the denominator equal to zero? No, because there is no real $x$ when $1+e^{3x}=0$ \\
So the asymptotes are:\\
$y=0$ when $x \rightarrow \infty$\\
$y=1$ when $x \rightarrow -\infty$ 
\end{frame}
\begin{frame}

{\textcolor{red}{Step $5$ and $6$}}:
$f'(x)=\displaystyle{ \frac{-3e^{3x}}{(1+e^{3x})^{2}}}$ and $f''(x)=\displaystyle{ \frac{9(e^{3x}-1)}{(1+e^{3x})^{4}}}$
\begin{center}
			\includegraphics[scale=0.3]{Figures/lec141.pdf}
		\end{center}
\end{frame}

\begin{frame}
\begin{center}
			\includegraphics[scale=0.3]{Figures/lec140.pdf}
		\end{center}
\end{frame}




\end{document}