\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 - Double Integrals over General Regions}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{October 14, 2019}
\maketitle

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

\begin{frame}
\frametitle{Reminders}

\begin{itemize}
\item	Homework B7 on 14.8 (Lagrange multipliers) is due tonight!
\item	There is a drop-in review session for Exam II on Monday, October 14, 6:00-8:00 PM in KAS 213
\item	Exam II takes place on Wednesday, 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
\begingroup
\color{red}
\item[{15.2}]	Double Integrals over General Regions
\endgroup
\item[{}]			Exam II Review
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Learning Goals}
\begin{itemize}
\item		Learn how to set up iterated integrals for double integrals over plane regions of Type I and Type II
\item		Learn properties of double integrals
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Integrals Over General Regions}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[black,thick,fill=orange!50]
	plot[domain=0.5:2.0]	
		({\x},{1+0.25*(\x-1.25)*(\x-1.25)})	
	--	(2,1.141)	
	--	(2,1.72)	
	--	plot[domain=2.0:0.5]	({\x},{2-0.5*(\x-1.25)*(\x-1.25)})	-- cycle;
\node[below] at (0.5,0)	{\scriptsize{$a$}};
\node[below]	at	(2.0,0)	{\scriptsize{$b$}};
\draw[dashed]	(0.5,0)	--	(0.5,1.14);
\draw[dashed]	(2,0)	--	(2,1.14);
\node[right] at		(2,1.14)	{\scriptsize{$g_1(x)$}};
\node[right] at		(2,1.86)	{\scriptsize{$g_2(x)$}};
\end{tikzpicture}

\bigskip

\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[black,thick,fill=orange!50]
	plot[domain=0.5:2.0]	
		({1+0.25*(\x-1.25)*(\x-1.25)},{\x})	
	--	(1.141,2)	
	--	(1.72,2)
	--	plot[domain=2.0:0.5]	({2-0.5*(\x-1.25)*(\x-1.25)},{\x})	-- cycle;
\node[left] at (0,0.5)	{\scriptsize{$c$}};
\node[left]	at	(0,2)	{\scriptsize{$d$}};
\draw[dashed]	(0,0.5)	--	(1.14,0.5);
\draw[dashed]	(0,2)		--	(1.14,2);
\node[above] at		(1,2)	{\scriptsize{$h_1(y)$}};
\node[above] at		(2,2)	{\scriptsize{$h_2(y)$}};
\end{tikzpicture}
\end{minipage}
\qquad
\begin{minipage}{0.6\textwidth}
\footnotesize
We'll see how to compute $ \diint_R f(x,y) \, dA$ if $R$ is one of the following kinds of regions:

\bigskip

\textbf{Type I}: $R$ lies between the graphs of two continuous functions of $x$
$$ D = \{(x,y): a \leq x \leq b, \, g_1(x) \leq y \leq g_2(x) \} $$

\bigskip

\textbf{Type II}: $R$ lies between the graphs of two continuous functions of $y$
$$ D = \{(x,y): c \leq y \leq d, \, h_1(y) \leq x \leq h_2(y) \} $$


\end{minipage}
\end{frame}

\section{Type I}

\begin{frame}
\frametitle{Double Integrals Over Type I Regions}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[black,thick,fill=orange!50]
	plot[domain=0.5:2.0]	
		({\x},{1+0.25*(\x-1.25)*(\x-1.25)})	
	--	(2,1.141)	
	--	(2,1.72)	
	--	plot[domain=2.0:0.5]	({\x},{2-0.5*(\x-1.25)*(\x-1.25)})	-- cycle;
\node[below] at (0.5,0)	{\scriptsize{$a$}};
\node[below]	at	(2.0,0)	{\scriptsize{$b$}};
\draw[dashed]	(0.5,0)	--	(0.5,1.14);
\draw[dashed]	(2,0)	--	(2,1.14);
\node[right] at		(2,1.14)	{\scriptsize{$g_1(x)$}};
\node[right] at		(2,1.86)	{\scriptsize{$g_2(x)$}};
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=0.6]
\draw[thick,->,>=stealth]	(-0.5,0)	--	(5.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[help lines,step=0.5]	(0,0)	grid	(5,2);
\draw[black,fill=orange!50,opacity=0.5]	
	plot[domain=0:4,smooth]	({\x},{sqrt(\x)})	
	--	(4,0	--	(0,0);
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.6\textwidth}
\footnotesize
To compute $\diint_D f(x,y) \, dA$ if 
$$ D  =  \{(x,y): a \leq x \leq b, \, g_1(x) \leq y \leq g_2(x) \} $$

\bigskip
$$ \iint_D f(x,y) \, dA = \int_a^b \int_{g_1(x)}^{g_2(x)} f(x,y) \, dy \, dx $$

\bigskip
\textbf{Example}: Find $ \diint_D \dfrac{y}{x^2+1} \, dA$ if
$$ D = \{ (x,y): 0 \leq x \leq 4, 0 \leq y \leq \sqrt{x} \} $$

\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Double Integrals Over Type I Regions}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[black,thick,fill=orange!50]
	plot[domain=0.5:2.0]	
		({\x},{1+0.25*(\x-1.25)*(\x-1.25)})	
	--	(2,1.141)	
	--	(2,1.72)	
	--	plot[domain=2.0:0.5]	({\x},{2-0.5*(\x-1.25)*(\x-1.25)})	-- cycle;
\node[below] at (0.5,0)	{\scriptsize{$a$}};
\node[below]	at	(2.0,0)	{\scriptsize{$b$}};
\draw[dashed]	(0.5,0)	--	(0.5,1.14);
\draw[dashed]	(2,0)	--	(2,1.14);
\node[right] at		(2,1.14)	{\scriptsize{$g_1(x)$}};
\node[right] at		(2,1.86)	{\scriptsize{$g_2(x)$}};
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=1.5]
\draw[thick,->,>=stealth]	(-0.5,0)	--	(1.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,1.5);
\draw[help lines,step=0.2]	(0,0)	grid	(1.2,1.2);
\draw[black,fill=orange!50,opacity=0.5]	
	plot[domain=0:1] ({\x},{\x*\x})
		--	++(0,-1)
		--	++(-1,0);
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.6\textwidth}
\footnotesize
To compute $\diint_D f(x,y) \, dA$ if 
$$ D  =  \{(x,y): a \leq x \leq b, \, g_1(x) \leq y \leq g_2(x) \} $$

\bigskip
$$ \iint_D f(x,y) \, dA = \int_a^b \int_{g_1(x)}^{g_2(x)} f(x,y) \, dy \, dx $$

\bigskip
\textbf{Example}: Find $ \diint_R x \cos y\,  dA$ if
$D$ is the region bounded by $y=0$, $y=x^2$, and $x=1$

\end{minipage}
\end{frame}

\section{Type II}

\begin{frame}
\frametitle{Double Integrals Over Type II Regions}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[black,thick,fill=orange!50]
	plot[domain=0.5:2.0]	
		({1+0.25*(\x-1.25)*(\x-1.25)},{\x})	
	--	(1.141,2)	
	--	(1.72,2)
	--	plot[domain=2.0:0.5]	({2-0.5*(\x-1.25)*(\x-1.25)},{\x})	-- cycle;
\node[left] at (0,0.5)	{\scriptsize{$c$}};
\node[left]	at	(0,2)	{\scriptsize{$d$}};
\draw[dashed]	(0,0.5)	--	(1.14,0.5);
\draw[dashed]	(0,2)		--	(1.14,2);
\node[above] at		(1,2)	{\scriptsize{$h_1(y)$}};
\node[above] at		(2,2)	{\scriptsize{$h_2(y)$}};
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=0.75]
\draw[thick,->,>=stealth]	(-0.5,0)	--	(3.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,3.5);
\draw[black,fill=orange!50]
	(0,0)	--	(3,3)	--	(0,3) -- cycle;
\draw[help lines] (0,0) grid (3,3);
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.6\textwidth}
\footnotesize
To compute $\diint_D f(x,y) \, dA$ if
$$ D = \{ (x,y): c \leq y \leq d,\,\, h_1(y) \leq x \leq h_2(y) \} $$

\bigskip
$$ \iint_D f(x,y) \, dA = \int_c^d \int_{h_1(y)}^{h_2(y)} f(x,y) \, dx \, dy $$

\bigskip

{\textbf{Example}}: Find $\diint_D e^{-y^2} \, dA$ if 
$$ D = \{ (x,y) : 0 \leq y \leq 3, \,\, 0\leq x \leq y  \}$$
\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Double Integrals over Type II Regions}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,2.5);
\draw[black,thick,fill=orange!50]
	plot[domain=0.5:2.0]	
		({1+0.25*(\x-1.25)*(\x-1.25)},{\x})	
	--	(1.141,2)	
	--	(1.72,2)
	--	plot[domain=2.0:0.5]	({2-0.5*(\x-1.25)*(\x-1.25)},{\x})	-- cycle;
\node[left] at (0,0.5)	{\scriptsize{$c$}};
\node[left]	at	(0,2)	{\scriptsize{$d$}};
\draw[dashed]	(0,0.5)	--	(1.14,0.5);
\draw[dashed]	(0,2)		--	(1.14,2);
\node[above] at		(1,2)	{\scriptsize{$h_1(x)$}};
\node[above] at		(2,2)	{\scriptsize{$h_2(x)$}};
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=1.5]
\draw[thick,->,>=stealth]	(-0.5,0)	--	(1.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,1.5);
\draw[help lines,step=0.2] (0,0) grid (1.2,1.2);
\draw[black,fill=orange!50,opacity=0.7]
	plot[domain=0:1] 	({\x},{\x*\x})	--
	plot[domain=1:0]	({\x*\x},{\x});
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.6\textwidth}
\footnotesize
To compute $\diint_D f(x,y) \, dA$ if
$$ D = \{ (x,y): c \leq y \leq d, h_1(y) \leq x \leq h_2(y) \} $$

\bigskip
$$ \iint_D f(x,y) \, dA = \int_c^d \int_{h_1(y)}^{h_2(y)} f(x,y) \, dx \, dy $$

\bigskip

{\textbf{Example}}: Find the volume under the plane $3x+3y-z=0$ and 
above the region enclosed by the parabolas $y=x^2$ and $x=y^2$
\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Type I or Type II?}
\footnotesize
Find the best way to compute each of the following volumes.

\bigskip
\begin{enumerate}
\item	The tetrahedron enclosed by the coordinate planes
		and the plane $2x+y+z=4$
\item	The volume enclosed by the cylinders $z=x^2$, $y=x^2$ and the planes $z=0$, $y=4$
\end{enumerate}
\end{frame}

\section{Properties}

\begin{frame}
\frametitle{Properties of Double Integrals, Part I}
\footnotesize
\begin{enumerate}
\item	(linearity) $\iint_D \left[ f(x,y) + g(x,y) \right] \, dA = 
			\iint_D f(x,y) \, dA + \iint_D g(x,y) \, dA$
			
		\smallskip
		
\item	(linearity) $\iint_D cf(x,y) \, dA = c \iint f(x,y) \, dA $

		\smallskip
		
\item	(order) If $f(x,y) \geq g(x,y)$ for all $(x,y) \in D$, then
			$$\iint_D f(x,y) \, dA \geq \iint_D g(x,y) \, dA$$
			
\item	 $ \iint_D 1 \, dA = A(D)$ where $A(D)$ is the area of the domain $D$
			
\end{enumerate}

\bigskip


Find the volume of the the solid by subtracting two volumes:

\smallskip

The solid enclosed by the parabolic cylinders $y=1-x^2$, $y=x^2-1$
and the planes $x+y+z=2$ and $2x+2y-z+10=0$

\end{frame}

\begin{frame}
\frametitle{Properties of Double Integrals, II}
\footnotesize
\begin{enumerate}
\item	 (*additivity) If $D = D_1 \cup D_2$, then
		$$ \iint_{D} f(x,y) \, dA = \iint_{D_1} f(x,y) \, dA + \iint_{D_2} f(x,y) \, dA$$
		
\item	(order) If $m \leq f(x,y) \leq M$ then
		$$ m A(D) \leq \iint_D f(x,y) \, dA \leq M A(D)$$

\end{enumerate}

\bigskip

\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.9]
\draw[orange,thick,fill=orange!30]
	(-1,1)		--	(1,1)	--	(1,-1)		--	(-1,-1)	-- cycle;
\draw[orange,thick,fill=white]
	(1,0)	--	(0,1)	--	(-1,0)		--	(0,-1)		--	cycle;
\drawxy{2}
\node[below] at (1.2,0)	{\scriptsize{$1$}};
\node[left] 		at	(0,-1.3)	{\scriptsize{$-1$}};
\node[below]	at	(-1.3,0)	{\scriptsize{$-1$}};
\node[left]		at	(0,1.4)	{\scriptsize{$1$}};
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
Express $\iint_D xy \, dA$ as a union of type I and type II integrals if $D$ is as shown
\end{minipage}


\medskip


\end{frame}

\begin{frame}
\frametitle{Volumes of Solids - Subtracting Two Volumes}
\begin{minipage}{0.4\textwidth}
\footnotesize
We'll use the GeoGebra package at
\href{https://www.geogebra.org/3d}{www.geogebra.org/3d}
to figure out what's going on here!

\bigskip

\begin{tikzpicture}[scale=0.7]
\draw[cyan,thick,fill=cyan!30]	(0,0)	--	(1,3)	--	(0,2)	--	cycle;
\draw[thick,->,>=stealth]	(-0.5,0)	--	(2.5,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,3.5);
\draw[help lines]	(0,0)	grid	(2,3);
\draw[cyan,fill=cyan]	(0,0)	circle(0.05cm);
\draw[cyan,fill=cyan]	(1,3)	circle(0.05cm);
\draw[cyan,fill=cyan]	(0,2)	circle(0.05cm);
\node[above] at (0,3.5)	{\scriptsize{$z$}};
\node[right] at (2.5,0)			{\scriptsize{$y$}};
\end{tikzpicture}

\end{minipage}
\qquad
\begin{minipage}{0.4\textwidth}
\footnotesize
Find the volume of the solid enclosed by the parabolic cylinder $$y=x^2$$ and the planes
$$z=3y$$
and
$$z=2+y$$

\bigskip

\emph{Hint}: It helps to consider the surface as two graphs  $x=\pm\sqrt{y}$ over the $yz$ plane!


\vfill

\vfill

\end{minipage}
\end{frame}




\end{document}