\documentclass[notes=show,10pt]{beamer}
\usepackage{mathpazo}			%% Beamer stuff
\usepackage{amsmath}			%% AMS math packages
\usepackage{amsfonts}			%%	-	special fonts
\usepackage{amssymb}			%%	-	special symbols
\usepackage{graphicx}			%% graphics
\usepackage{tcolorbox}			%% color boxes

\usepackage{hyperref}			%% for web links
\hypersetup{
%    bookmarks=true,         		% show bookmarks bar?
    unicode=false,          		% non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        		% show Acrobat’s toolbar?
    pdfmenubar=true,        	% show Acrobat’s menu?
    pdffitwindow=false,     		% window fit to page when opened
    pdfstartview={FitH},    		% fits the width of the page to the window
    pdfnewwindow=true,      	% links in new PDF window
    colorlinks=true,       			% false: boxed links; true: colored links
    linkcolor=blue,          		% color of internal links (change box color with linkbordercolor)
    citecolor=PineGreen,    		% color of links to bibliography
    filecolor=magenta,      		% color of file links
    urlcolor=cyan           		% color of external links
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		TiKZ Ploting Stuff
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz}				%% TikZ -graphics

\usetikzlibrary{arrows, positioning, calc, intersections}
\usetikzlibrary{decorations.pathreplacing, decorations.markings}

\usepackage{pgfplots}			%% fancy plotting

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	For 3d plotting, using the tikz-3dplot package so
%	that (x,y,z) coordinates are specified in normal order
%	and one can change the perspective for 3-d plots
%
%	To invoke, use
%
%	\begin{tikzpicture}[tdplot_main_coords,{other options}]
%		...
%	\end{tikzpicture}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz-3dplot}		%% Enhanced 3d plotting

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Package forest to draw tree diagrams for chain rule
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{forest}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	adjustbox package to force minipage alignment
%
%	Two-column structure is
%
%	\adjustbox{valign=t}
%		{
%			\begin{minipage}{0.45\textwidth}
%			...
%			\end{minipage}
%		}
%	\adjustbox{valign=t}
%		{
%		
%			\begin{minipage}{0.45\textwidth}
%			...
%			\end{minipage}
%		}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{adjustbox}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Set Beamer theme
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usetheme{Dresden}
\usecolortheme{dolphin}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Hack to remove subsection bar from our
%		friends at Tex.StackExchange.Com
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\beamer@theme@subsectionfalse

\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%
%		
%		Hack to make the nice little circles appear
%		from Tex.stackexchange.com
%
%		Reference: 
%
%		https://tex.stackexchange.com/questions/2072/beamer-navigation-circles-without-subsections
%
%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{remreset}
\makeatletter
\@removefromreset{subsection}{section}
\makeatother
\setcounter{subsection}{1}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Get rid of triangles, put in circles for 
%		itemize items
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{items}[circle]

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Clean up fonts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%

\usefonttheme{professionalfonts}
\usefonttheme{serif}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		tikz plotting options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pgfplotsset{my style/.append style={axis x line=middle, axis y line=
           middle, xlabel={}, ylabel={}, axis equal }}
           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Math Operators
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareMathOperator{\comp}{comp}
\DeclareMathOperator{\proj}{proj}
\DeclareMathOperator{\Hess}{Hess}

\DeclareMathOperator{\curl}{curl}
\DeclareMathOperator{\diver}{div}
\DeclareMathOperator{\grad}{grad}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Document begins here...
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           
\begin{document}

\input{213-Lecture-Macros}		%% 	macros, settings, et.c


\title{Math 213 - Exam II Review}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{October 16, 2019}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	
%	Due Date Reminders
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Reminders}

\begin{itemize}
\item	Exam II takes place Tonight, October 16, 5:00-7:00 PM
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Unit Outline
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Unit II: Functions of Several Variables}
\begin{itemize}

\item[{13.3-4}] 	Lecture 11: Velocity and Acceleration

\medskip

\item[{14.1}] Lecture 12: Functions of Several Variables

\item[{14.3}] Lecture 13: Partial Derivatives
\item[{14.4}] Lecture 14: Linear Approximation
\item[{14.5}] Lecture 15: Chain Rule, Implicit Differentiation

\item[{14.6}] Lecture 16: Directional Derivatives and the Gradient


\medskip

\item[{14.7}] Lecture 17: Maximum and Minimum Values, I
\item[{14.7}] Lecture 18: Maximum and Minimum Values, II
\item[{14.8}] Lecture 19: Lagrange Multipliers
\

\medskip


\item[{15.1}]	Double Integrals
\item[{15.2}]	Double Integrals over General Regions
\begingroup
\color{red}
\item[{}]			Exam II Review
\endgroup
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Learning Goals
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Learning Goals}
\begin{itemize}
\item		Find out how to ace Exam II
\end{itemize}

\vfill

\footnotesize
\textbf{Acknowledgement}: 

\medskip

Most of the sample problems in this lecture were taken from 
\href{http://tutorial.math.lamar.edu}{Paul's Online Notes} at Lamar University. You can find 
solutions to these problems in the \href{http://tutorial.math.lamar.edu/Classes/CalcIII/CalcIII.aspx}{Calculus III notes} there.
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		New material begins here...
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Overview}
\footnotesize
\begin{itemize}
\item	Arc length, velocity, acceleration
\item	Partial derivatives, chain rule
\item	Linear Approximation
\item	Directional derivatives, gradient
\item	Second derivative test for local extrema
\item	Closed interval method for global maxima and minima on a closed, bounded set
\item	Lagrange Multiplier Method
\item	Double integrals and Iterated Integrals (Section 15.1 \emph{only})
\end{itemize}
\end{frame}

\section{$\bfr'(t), \, \bfr''(t)$}

\begin{frame}
\frametitle{Arc Length, Velocity, Acceleration}
If $\bfr(t)$ is a vector function:
\medskip
\begin{itemize}
\item	$\bfr'(t)$ is the tangent vector to the space curve at the point $\bfr(t)$
\smallskip

\item	$\bfr''(t)$ is the acceleration of the particle at time $t$
\smallskip

\item	$|\bfr'(t)|$ is the speed of a particle moving along the space curve at time $t$
\end{itemize}

\medskip
The \emph{arc length} of a space curve $\bfr(t)$, $a \leq t \leq b$ is
$$ L = \int_a^b \left| \bfr'(t) \right| \, dt. $$
\end{frame}

\begin{frame}
\frametitle{By Popular Demand}
\footnotesize
A ball is thrown at $60^\circ$ with a velocity of $20$m/sec to clear a wall $2$m high. How far away is the wall?

\bigskip

\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(4.5,0)	node[anchor=west]		{$x$};
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,3)	node[anchor=south] 	{$y$};
\draw[thick,red] plot[domain=0:4] ({\x},{-(sqrt(3)/4)*(\x-2)*(\x-2)+sqrt(3)});
\draw[black,fill=black]	(1.95,0) rectangle (2.05,{sqrt(3)-0.05});
\end{tikzpicture}
\end{frame}

\section{Chain}
\begin{frame}
\frametitle{The Chain Rule}
\footnotesize

\begin{enumerate}
\item		Find $dz/dt$ if $z = 4x^2+3y^2$, $x(t) = \sin(t)$, $y(t) = \cos(t)$.

\vfill

\item		Suppose that $z=f(x,y) = 3x^2-2xy+y^2$, $x = 3u+2v$, $y=4u-v$. Find $\dee z/\dee u$ and $\dee z /\dee v$. 

\vfill

\item		The equation $x^2+y^3 +xyz=1$ defines $z$ implicitly as a function of $x$ and $y$. Find $\dee z/\dee y$ in terms of $x$, $y$, and $z$. 

\vfill


\end{enumerate}

\end{frame}

\section{Linear}

\begin{frame}
\frametitle{Tangent Planes, Linear Approximation}
\footnotesize
Find the tangent plane to the graph of $f(x,y) = x^2 + 4y^2$ at the point $(2,1,8)$.

\vfill

Using the linear approximation, estimate $f(0.1,1.9)$ if $f(x,y) = \sqrt{8-x^2 - y^2}$.

\vfill

\end{frame}

\section{Gradient}

\begin{frame}
\frametitle{The Gradient}
\footnotesize
\textbf{How to Compute It}

\medskip

If $f$ is a function of \emph{two variables},
$ \nabla f(x,y)  = \left\langle \dfrac{\dee f}{\dee x}, \dfrac{\dee f}{\dee y} \right\rangle$

\medskip

If $f$ ia function of \emph{three variables},
$ \nabla f(x,y,z) = \left\langle \dfrac{\dee f}{\dee x}, \dfrac{\dee f}{\dee y}, \dfrac{\dee f}{\dee z} \right\rangle $

\bigskip

\textbf{What it Means}

\medskip
The magnitude of $\nabla f(a,b)$ (or $\nabla f(a,b,c)$) is the maximum rate of change of $f$ at $(a,b)$ (or $(a,b,c)$)

\medskip

The direction of $\nabla f(a,b)$ (or $\nabla f(a,b,c)$) is the direction of the maximum rate of change of $f$ at $(a,b)$ (or $(a,b,c)$)

\medskip


\end{frame}

\begin{frame}
\frametitle{The Gradient}

\footnotesize

\textbf{What it Does}

\medskip

The directional derivative of $f(x,y)$ at $(a,b)$ in the direction $\bfu$ (where $\bfu$ is a \emph{unit vector} is
$$ D_\bfu f (a,b) = \nabla f (a,b) \cdot \bfu. $$

\medskip
The gradient of a function of two variables is perpendicular to level curves of $f$

\medskip
The gradient of a function of three variables is perpendicular to level surfaces of $f$

\bigskip

\begin{enumerate}
\item	Find the maximum rate of change of $f(x,y) = 3x^2 + 4y^2$ at $(1,2)$, and find the direction $\bfu$ of that maximum rate of change

\item	Find the directional derivative of $f(x,y) = e^{xy}$ at the point $(1,2)$ in the direction $\bfu = \left\langle \dfrac{1}{\sqrt{2}}, \dfrac{1}{\sqrt{2}} \right\rangle$

\item	Find the equation of the tangent plane to the level surface of $x^2 + 4y^2 + 9z^2 = 17$ at the point $(2,1,1)$. 
\end{enumerate}

\end{frame}

\section{Max/Min/Lagrange}

\begin{frame}
\frametitle{Second Derivative Test}
\footnotesize
\begin{itemize}
\item		Local extrema occur at critical points, i.e., points $(a,b)$ where $f_x(a,b) = f_y(a,b) = 0$
\smallskip
\item		A critical point corresponds to a local maximum or minimum if $$D=f_{xx}(a,b) f_{yy}(a,b) - f_{xy}(a,b)^2$$ is positive
\smallskip
\item		A critical point with $D>0$ is a local minimum if $f_{xx}(a,b)>0$, and a local maximum if $f_{xx}(a,b) < 0$
\end{itemize}

\bigskip

\begin{enumerate}
\item Find the local maxima and minima for the function $f(x,y) = 3x^2y + y^3 -3x^2 - 3y^2 +2$
\item	Find the point on the plane $4x-2y+z=1$ closest to the point $(-2,-1,5)$
\end{enumerate}
\end{frame}


\begin{frame}
\frametitle{Closed Set Method}
\footnotesize
To find the maximum and minimum of a function $f$ on a bounded closed set $D$:
\begin{enumerate}
\item	Find all local maxima and minima of $f$ in $D$ using the second derivative test
\item	Find the maximum and minimum of $f$ on the boundary of $D$ using the Closed Interval Method from Calculus I
\end{enumerate}

\bigskip

Find the absolute maximum and minimum of $f(x,y) = 2x^2 -y^2 + 6y$ in the region $D$ with $x^2+y^2 \leq 16$. 
\end{frame}


\begin{frame}
\frametitle{Lagrange Multipliers}
\footnotesize
A constrained optimization problem consists of:
\begin{itemize}
\item	An \emph{objective function} $f$ to be maximized or minimized
\item	One or more \emph{constraint equations} which must also be satisfied
\end{itemize}

\medskip
For a constrained optimization problem with one constraint,  two variables, solve:
\begin{align*}
\nabla f 	&=	\lam \nabla g	&& 	\text{(two equations)}\\
g(x,y)	&=	c					&&	\text{(one equation)}
\end{align*}

\medskip
For two constraints, three variables, solve:
\begin{align*}
\nabla f &=	\lam \nabla g_1 + \mu \nabla g_2		&&	\text{(three equations)}\\
g_1(x,y,z)	&= 	c_1										&&	\text{(one equation)}\\
g_2(x,y,z)	&=	c_2										&&	\text{(one equation)}\\
\end{align*}
\end{frame}

\begin{frame}
\frametitle{Lagrange Multipliers}
\footnotesize 
\begin{enumerate}
\item	Find the maximum and minimum of the function $f(x,y) = 5x-3y$ on the circle $x^2+y^2 = 136$

\vfill

\item	Find the maximum of $f(x,y,z) = 4y-2z$ subject to the constraints $2x-y-z=2$ and $x^2+y^2 =1$

\vfill

\end{enumerate}
\end{frame}

\section{Iterate}

\begin{frame}
\frametitle{Double Integrals}
\footnotesize
The \emph{double integral} of a function $f$ over a rectangle $R = [a,b] \times [c,d]$ is denoted
$$ \iint_R f(x,y) \, dA. $$

\medskip
To compute it, we can compute the iterated integral
$$ \int_a^b \, \left( \int_c^d f(x,y) \, dy \right) \, dx $$
or the iterated integral
$$ \int_c^d \left( \int_a^b f(x,y) \, dx \right) \, dy. $$

\bigskip

\begin{enumerate}
\item		Find $ \iint_R 6xy^2 \, dA $ if $R = [2,4] \times [1,2] $

\vfill

\item		Find $\iint_R xe^{xy} \, dA$ if $R = [-1,2] \times [0,1]$

\vfill

\end{enumerate}
\end{frame}



\end{document}