%\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 12 ]{\large{ Lecture 12} 
\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}{The second derivative}

The derivative of the derivative is called the second derivative. \\
For a function $y=f(x)$, we write the second derivative as $$\frac{d^{2}y}{dx^{2}} \quad or \quad f''(x) \quad or \quad f^{(2)}(x)$$ 

The basic idea is that the optimal value of a differentiable function $f(x)$ (its maximum and minimum value) generally occurs when $f'(x)=0$ 
\end{frame}
\begin{frame}
\begin{center}
			\includegraphics[scale=0.4]{Figures/lec90.pdf}
		\end{center} 
\end{frame}
\begin{frame}
\begin{definition}
An interior point of the domain of a function $f$ where $f'$ is zero or undefined is a \textit{critical point} of $f$.
\end{definition}
{\textcolor {red} {\textit{Note:}}} One needs to check if points where the derivative does not exist is a maximum or minimum. For example $f(x)=x^{1/3}$ has a local minimum at $x=0$ although $f'(0)$ does not exist
\begin{center}
			\includegraphics[scale=0.25]{Figures/lec91.pdf}
		\end{center} 
\end{frame}
\begin{frame}

{\textcolor {red} {\textit{Note:}}} Some values of $x$ satisfying $f'(x)=0$ are not maximum or minimum. \\
for example $x=0$ is a critical point of $f(x)=x^{3}$, because $$f'(x)=3x^{2}=0 \Rightarrow x=0$$ But $x=0$ is neither a maximum or minimum.    
 \begin{center}
			\includegraphics[scale=0.25]{Figures/lec92.pdf}
		\end{center} 
\end{frame}
\begin{frame}{The First Derivative Test}
We will show how to test the critical points of a function for the presence of local maximums and minimums.
\begin{definition}
Let $f$ be a function defined on an interval $I$ and let $x_{1}$ and $x_{2}$ be any two points in $I$.
\begin{itemize}
\item If $f(x_{1})<f(x_{2})$ whenever $x_{1}<x_{2}$, then $f$ is said to be \textit{increasing} on $I$.
\item If $f(x_{1})>f(x_{2})$ whenever $x_{1}<x_{2}$, then $f$ is said to be \textit{decreasing} on $I$.
\end{itemize}
\end{definition}
\begin{example}
The function $f(x)=x^{2}$ decreases on $(-\infty , 0]$ and increases on $[0,\infty)$
\end{example}
\end{frame}
\begin{frame}
\begin{theorem}
Suppose that $f$ is differentiable on $(a,b)$
\begin{itemize}
\item If $f'(x)>0$ at each point $x \in (a,b)$, then $f$ is increasing 
\item If $f'(x)<0$ at each point $x \in (a,b)$, then $f$ is decreasing   
\end{itemize}
\end{theorem}
 \begin{center}
			\includegraphics[scale=0.25]{Figures/lec93.pdf}
		\end{center} 
\end{frame}
\begin{frame}
\begin{example}
Find the critical points of $f(x)=x^{3}-12x-5$ and identify the intervals on which $f$ is increasing and decreasing 
\end{example}
The function $f$ is everywhere continuous and differentiable. The first derivative 
$$f'(x)=3x^{2}-12=3(x^{2}-4)=3(x+2)(x-2)$$
is zero at $x=-2$ and $x=2$. These critical points subdivided the domain of $f$ into intervals $(-\infty , -2), (-2,2)$ and $(2,\infty)$ on which $f'$ is either positive or negative. We determine the sign of $f'$ by evaluating $f$ at a convenient point in each subinterval.
\end{frame}
\begin{frame}
 \begin{center}
			\includegraphics[scale=0.2]{Figures/lec94.pdf}
		\end{center}
		\begin{center}
			\includegraphics[scale=0.2]{Figures/lec95.pdf}
		\end{center} 
\end{frame}
\begin{frame}

{\textcolor {red} {\textit{Note:}}} At the points where $f$ has a minimum value, $f'<0$ immediately to the left and $f'>0$ immediately to the right. Thus the function is decreasing on the left of the minimum value and it is increasing on its right. Similarly, at the points where $f$ has a maximum value, $f'>0$ immediately to the left and $f'<0$ immediately to the right. Thus the function is increasing on the left of the maximum value and decreasing on its right.
\begin{theorem}{\textcolor{red} {First Derivative test for local maximums and minimums:}}
Suppose that $c$ is a critical point of $f$,
\begin{itemize}
\item if $f'$ changes from negative to positive at $c$, then $f$ has a local minimum.
\item if $f'$ changes from positive to negative at $c$, then $f$ has a local maximum.
\item if $f'$ does not change sign at $c$ (that is, $f'$ is positive on both sides of $c$ or negative on both sides), then $f$ has no maximum or minimum at $c$.
\end{itemize}

\end{theorem}
\end{frame}
\begin{frame}
\begin{example}
Find the critical points of $$f(x)=x^{1/3}(x-4)$$
Identify the local maximums and minimums. 
\end{example}
We can write $f(x)=x^{1/3}(x-4)=x^{4/3}-4x^{1/3}$.\\
The first derivative $$f'(x)=\frac{d}{dx}(x^{4/3}-4x^{1/3})=\frac{4}{3}x^{1/3}-\frac{4}{3}x^{-2/3}=\frac{4}{3}x^{-2/3}(x-1)=\frac{4(x-1)}{3x^{2/3}}$$
is zero at $x=1$ and undefined at $x=0$. So these are the critical points.
\end{frame}
\begin{frame}
 \begin{center}
			\includegraphics[scale=0.2]{Figures/lec97.pdf}
		\end{center}
		\begin{center}
			\includegraphics[scale=0.2]{Figures/lec98.pdf}
		\end{center} 
\end{frame}










\end{document}