\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 - Change of Variables, Part II}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{November 4, 2019}
\maketitle

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

\begin{frame}
\frametitle{Reminders}

\begin{itemize}
\item	Homework C5 on 15.9 (change of variables) is due Wednesday Night
\item	Quiz \# 8 on 15.7-15.8 (triple integrals in cylindrical and spherical coordinates) takes place in Thursday's recitation)
\item	Homework C7 on section 16.1 (Vector fields) is due on Friday

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Unit III: Multiple Integrals, Vector Fields}
\begin{itemize}

\item[{}]			Double Integrals in Polar Coordinates
\item[{}]			Triple Integrals (Part I)
\item[{}]			Triple Integrals (Part II)
\item[{}]			Triple Integrals in Cylindrical Coordinates
\item[{}]			Triple Integrals in Spherical Coordinates



\item[{}]			Change of Variables, Part I

\begingroup
\color{red}
\item[{}]			Change of Variables, Part II
\endgroup

\medskip

\item[{}]			Vector Fields
\item[{}]			Line Integrals (Scalar functions)
\item[{}]			Line Integrals (Vector functions)

\medskip

\item[{}]			Exam III Review
\end{itemize}
\end{frame}

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

\section{Learning Goals}

\begin{frame}
\frametitle{Goals of the Day}
\begin{itemize}
\item	Understand what a transformation $T$ between two regions in space is
\item	Understand how to compute the \emph{Jacobian Matrix} and \emph{Jacobian determinant} of a  transformation
		and understand what the Jacobian determinant measures
\item	Understand how to compute triple integrals using the change of variables formula
\end{itemize}
\end{frame}



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

\section{Review and Preview}

\begin{frame}
\frametitle{Change of Variable: $uv \to xy$}
\footnotesize
If $x=g(u,v)$, $y=h(u,v)$, and if the region $S$ in the $uv$ plane is mapped to the region $R$ in the $xy$ plane,
then
$$
\iint_R f(x,y) \, dA = 
\iint_S f(x(u,v),y(u,v)) \, \left| \dfrac{\dee (x,y)}{\dee (u,v)} \right|  \, du \, dv 
$$
The \emph{Jacobian determinant}
$$ \dfrac{\dee (x,y)}{\dee (u,v)}=  	\begin{vmatrix}
						\dfrac{\dee x}{\dee u}	&&	\dfrac{\dee x }{\dee v}	\\
						\\
						\dfrac{\dee y}{\dee u}	&&	\dfrac{\dee y}{\dee v}
					\end{vmatrix}
$$
measures how areas change under the map $(u,v) \mapsto (x,y)$.  

\smallskip
A way to remember the change of variables formula
$$ dA =  \underbrace{\left| \dfrac{\dee (x,y)}{\dee (u,v)} \right|}_{\text{Area change factor}}  \,
			 \underbrace{du \, dv}_{\text{$dA$ in $uv$ plane}} $$

\end{frame}

\begin{frame}
\frametitle{Example: Change of Variable $uv$ to $xy$}

\footnotesize

$$
\iint_R f(x,y) \, dA = 
\iint_S f(x(u,v),y(u,v)) \, \left| \dfrac{\dee (x,y)}{\dee (u,v)} \right|  \, du \, dv 
$$

\bigskip

\textbf{Problem} Find $\iint_R  (x-3y) \, dA$ if $R$ is the triangular region with vertices $(0,0)$, $(2,1)$ and $(1,2)$. Use the transformation
$x=2u+v$, $y=u+2v$.

\medskip

{\scriptsize \emph{Hint}: You'll need to find $u$ and $v$ in terms of $x$ and $y$ to find the region $S$}

\vfill
\begin{center}
\begin{minipage}{0.4\textwidth}

\begin{tikzpicture}[scale=2]
\draw[help lines,step=0.2]	(0,0)	grid	(1.2,1.2);
\draw[thick,->,>=stealth]	(-0.5,0)	--	(1.5,0) 
		node[anchor=west] 	{\scriptsize{$u$}};
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,1.5)
		node[anchor=south]	{\scriptsize{$v$}};
\draw[red,thick,fill=red!20,opacity=0.5]	(0,0)	--	(1,0)	--	(0,1)	--	(0,0);
\node at (0.3,0.3)				{\scriptsize{$S$}};
\node[anchor=north east]	at	(0,0)	{\scriptsize{$(0,0)$}};
\node[anchor=east]				at	(0,1)	{\scriptsize{$(0,1)$}};
\node[anchor=north]			at	(1,0)	{\scriptsize{$(1,0)$}};
\end{tikzpicture}
\end{minipage}
\qquad
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}
\draw[help lines,step=0.5]	(0,0)	grid	(2,2);
\draw[thick,->,>=stealth]		(-0.5,0)	--	(2.5,0) 
		node[anchor=west] 	{\scriptsize{$x$}};
\draw[thick,->,>=stealth]		(0,-0.5)	--	(0,2.5)
		node[anchor=south]	{\scriptsize{$y$}};
\draw[red,thick,fill=red!20,opacity=0.5]	(0,0)	--	(2,1)	--	(1,2)	-- (0,0);
\node at (1,1)						{\scriptsize{$R$}};
\node[anchor=north east]	at	(0,0)	{\scriptsize{$(0,0)$}};
\node[anchor=west]			at	(2,1)	{\scriptsize{$(2,1)$}};
\node[anchor=south]			at	(1,2)	{\scriptsize{$(1,2)$}};
\end{tikzpicture}
\end{minipage}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Example: Change of Variable $uv$ to $xy$}

\footnotesize

$$
\iint_R f(x,y) \, dA = 
\iint_S f(x(u,v),y(u,v)) \, \left| \dfrac{\dee (x,y)}{\dee (u,v)} \right|  \, du \, dv 
$$

\bigskip

\textbf{Problem}: Find $\iint_R (x+y) e^{x^2-y^2} \, dA$ if $R$ is the rectangle enclosed by $x-y=0$, $x-y=2$, $x+y=0$, and
$x+y=3$.

\medskip
\scriptsize{What coordinates $u$ and $v$ are natural in this problem?}

\vfill

\begin{center}
\begin{minipage}{0.4\textwidth}
\uncover<2->
{
\begin{tikzpicture}[scale=0.7]
\draw[help lines]	(0,0)	grid	(3,3);
\draw[thick,->,>=stealth]	(-0.5,0)	--	(3.5,0) 
	node [anchor=west] {\scriptsize{$u=x-y$}};
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,3.5)
	node [anchor=south] {\scriptsize{$v=x+y$}};
\draw[red,thick,fill=red!20,opacity=0.5]
	(0,0)	--	(2,0)	--	(2,3)	--	(0,3)	--	(0,0);
\end{tikzpicture}
}
\end{minipage}
\qquad
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.5]
\draw[help lines]	(-2,-2)	grid	(3,3);
\draw[thick,->,>=stealth]		(-2.5,0)	--	(4,0) 
		node[anchor=west] 	{\scriptsize{$x$}};
\draw[thick,->,>=stealth]		(0,-2.5)	--	(0,4)
		node[anchor=south]	{\scriptsize{$y$}};
%%
\begin{scope}
\clip	(-2,-2) rectangle (3,3);
%% line x+y=0
\draw[red,thick]	plot[domain=-2.5:4]
	({\x},{-\x});
%% line x+y=3
\draw[red,thick]	plot[domain=-2.5:4]
	({\x},{3-\x});
%% line x-y=0
\draw[red,thick]	plot[domain=-2.5:4]
	({\x},{\x});
%% line x-y=2
\draw[red,thick]	plot[domain=-2.5:4]
	({\x},{\x-2});
\end{scope}
\end{tikzpicture}
\end{minipage}
\end{center}
\end{frame}



\begin{frame}
\frametitle{Preview:  Change of Variable: $uvw$ to $xyz$}
\footnotesize
If
$$ x=g(u,v,w), \quad y=h(u,v,w), \quad z=k(u,v,w) $$
and the region $S$ in $uvw$ space is mapped to $R$ in $xyz$ space, then
\begin{multline*}
\iiint_R f(x,y,z) \, dV = \\\iiint_S f(x(u,v,w),y(u,v,w),z(u,v,w)) \, 
	\left| 
		\frac{\dee(x,y,z)}{\dee(u,v,w)} 
	\right| 
\, du \, dv \, dw
\end{multline*}
where
$$ 
\frac{\dee(x,y,z) }{\dee (u,v,w)} = 
\begin{vmatrix}
\dfrac{\dee x}{\dee u} && \dfrac{\dee x}{\dee v}	&&	\dfrac{\dee x}{\dee w}	\\[12pt]
\dfrac{\dee y}{\dee u} && \dfrac{\dee y}{\dee v}	&&	\dfrac{\dee y}{\dee w}	\\[12pt]
\dfrac{\dee z}{\dee u} && \dfrac{\dee z}{\dee v}	&&	\dfrac{\dee z}{\dee w}	
\end{vmatrix}
$$

\end{frame}

\section{Polar, Cylindrical, Spherical Coordinates}


\begin{frame}
\frametitle{Cylindrical and Spherical Coordinates}
\footnotesize
Recall that the \emph{Jacobian determinant} is
$$ 
\frac{\dee(x,y,z) }{\dee (u,v,w)} = 
\begin{vmatrix}
\dfrac{\dee x}{\dee u} && \dfrac{\dee x}{\dee v}	&&	\dfrac{\dee x}{\dee w}	\\
\\
\dfrac{\dee y}{\dee u} && \dfrac{\dee y}{\dee v}	&&	\dfrac{\dee y}{\dee w}	\\
\\
\dfrac{\dee z}{\dee u} && \dfrac{\dee z}{\dee v}	&&	\dfrac{\dee z}{\dee w}	
\end{vmatrix}
$$

\medskip

Find the  Jacobian determinant if:

\smallskip

(1) $x=u \cos v, \quad y = u \sin v, \quad z= w$ (cylindrical)

\smallskip

(2) $x=u \sin w \cos v, \quad y= u \sin w \sin v, \quad z= u \cos w$ (spherical)

\bigskip

What's the connection with these formulas and  formulas for integration in cylindrical and spherical coordinates?

\end{frame}

\begin{frame}
\frametitle{Polar Coordinates}
\footnotesize
\begin{minipage}{0.4\textwidth}

\begin{tikzpicture}[scale=1]
\draw[thick,->,>=stealth]	(-0.5,0)	--(3,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--(0,3);
\node[below]	at	(3,0)		{\scriptsize{$u$}};
\node[left]		at	(0,3)		{\scriptsize{$v$}};
\draw[thick,cyan,fill=cyan!30]
		(0.5,1)	--	(2.5,1)	--	(2.5,2.5)	--	(0.5,2.5)	--	cycle;
\node at	(1.5,1.75)			{\scriptsize{$S$}};
%%
\node[below]	at	(0.5,0)	{\scriptsize{$a$}};
\node[below]	at	(2.5,0)	{\scriptsize{$b$}};
\node[left]		at	(0,1)		{\scriptsize{$\alpha$}};
\node[left]		at	(0,2.5)	{\scriptsize{$\beta$}};
%%
\draw[densely dashed]	(0.5,0)	--	(0.5,1);
\draw[densely dashed]	(2.5,0)	--	(2.5,1);
\draw[densely dashed]	(0,1)		--	(0.5,1);
\draw[densely dashed]	(0,2.5)	--	(0.5,2.5);
\only<2>
{
\draw[cyan,very thick,->-]		(0.5,1)	--	(2.5,1);
}
\only<3>
{
\draw[cyan,very thick,->-]		(2.5,1)	--	(2.5,2.5);
}
\only<4>
{
\draw[cyan,very thick,->-]		(2.5,2.5)	--	(0.5,2.5);
}
\only<5>
{
\draw[cyan,very thick,->-]			(0.5,2.5)	--	(0.5,1);
}
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=1]
\draw[thick,->,>=stealth]	(-0.5,0)	--(3,0);
\draw[thick,->,>=stealth]	(0,-0.5)	--(0,3);
\node[below]	at	(3,0)		{\scriptsize{$x$}};
\node[left]		at	(0,3)		{\scriptsize{$y$}};
\draw[dashed]	(0,0)	--	(30:1);
\draw[dashed]	(0,0)	--	(75:1);
\draw[orange,thick,fill=orange!30]
	(30:1)	--	(30:3) --
	(30:3) arc(30:75:3)	--	(75:1)	--
	(75:1) arc(75:30:1) -- cycle;
\node at (52.5:2)			{\tiny{$R$}};
%%
\node at (52.5:0.75)	{\tiny{$u=a$}};
\node at (52.5:3.3)	{\tiny{$u=b$}};
%%
\only<2>
{
\draw[orange,very thick,->-]		(30:1)	--	(30:3);
}
\only<3>
{
\draw[orange,very thick,->-]		(30:3)	arc	(30:75:3);
}
\only<4>
{
\draw[orange,very thick,->-]		(75:3)	--	(75:1);
}
\only<5>
{
\draw[orange,very thick,->-]		(75:1)	arc	(75:30:1);
}
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
The transformation $$x=u \cos v, y = u \sin v$$ maps a rectangle $S$ in the $uv$ plane to a \emph{polar rectangle} $R$ in the $xy$ plane

\vfill


The Jacobian of this transformation is
$$
\begin{vmatrix}
\cos v	&	-u \sin v	\\
\sin v		&	u	\cos v
\end{vmatrix}
=
{\color{red} u}
$$
\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Cylindrical Coordinates}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.5]
\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,4);
\draw[thick,->,>=stealth]	(0,0,0)	--	(4,0,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	(0,4,0);
\node[below]	at	(0,0,4)		{\scriptsize{$u$}};
\node[right]	at	(4,0,0)		{\scriptsize{$v$}};
\node[above]	at	(0,4,0)		{\scriptsize{$w$}};
%%
%% front
\draw[cyan,left color=cyan!20,right color=cyan!80]	
	(1,1,2)	--	++(1,0,0)	--	++(0,3,0)	--	++(-1,0,0)	--	++(0,-3,0);
\draw[cyan,left color=cyan!30,right color=cyan!80]	
	(1,4,2)	--	++(1,0,0)	--	++(0,0,-1)	--	++(-1,0,0)	--	++(0,0,1);
\draw[cyan,fill=cyan!80]	
	(2,4,2)	--	++(0,0,-1)	--	++(0,-3,0)	--	++(0,0,1)	--	++(0,3,0);
%% label it
\node at (1.25,2,1)				{\scriptsize{$S$}};
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=0.5]
\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,4);
\draw[thick,->,>=stealth]	(0,0,0)	--	(4,0,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	(0,4,0);
\node[below]	at	(0,0,4)		{\scriptsize{$x$}};
\node[right]	at	(4,0,0)		{\scriptsize{$y$}};
\node[above]	at	(0,4,0)		{\scriptsize{$z$}};
%%
%% top
\draw[orange,left color=orange!80,right color=orange!20]			
	plot[domain=1:2.5,variable=\r]	
			({\r*sin(30)},{3},{\r*cos(30)})	--
	plot[domain=30:60,variable=\theta]
			({2.5*sin(\theta)},{3},{2.5*cos(\theta)})	--
	plot[domain=2.5:1,variable=\r]
			({\r*sin(60)},{3},{\r*cos(60)})	--
	plot[domain=60:30,variable=\theta]
			({1*sin(\theta)},{3},{1*cos(\theta)});
%% side
\draw[orange,fill=orange!90]
	({sin(30)},1,{cos(30)})	
		--	++(0,2,0)	
		--	({2.5*sin(30)},3,{2.5*cos(30)})	
		--	++(0,-2,0)
		--	({sin(30)},1,{cos(30)});
%% front
\draw[orange,left color=orange!80,right color=orange!10]
		({2.5*sin(30)},1,{2.5*cos(30)})
		--	plot[domain=30:60,variable=\theta]	 
				({2.5*sin(\theta)},{3},{2.5*cos(\theta)})
		--	++(0,-2,0)
		--	plot[domain=60:30,variable=\theta]
				({2.5*sin(\theta)},{1},{2.5*cos(\theta)});
%% label it
\node	at	({2.5*sin(45)},2,{2.5*cos(45)})	{\scriptsize{$R$}};
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
The transformation
$$
x= u \cos v, \quad y = u \sin v, \quad z = w
$$
maps a box in the $uvw$ plane to a `cylindrical wedge' in $xyz$ space

\bigskip

The Jacobian of this transformation is
$$ 
\begin{vmatrix}
\cos v	&	-u \sin v		&	0	\\
\sin v		&	u	\cos v	&	0	\\
0			&	0				&	1
\end{vmatrix}= 
{\color{red} u}
$$
\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Spherical Coordinates}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.5]
\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,4);
\draw[thick,->,>=stealth]	(0,0,0)	--	(4,0,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	(0,4,0);
\node[below]	at	(0,0,4)		{\scriptsize{$u$}};
\node[right]	at	(4,0,0)		{\scriptsize{$v$}};
\node[above]	at	(0,4,0)		{\scriptsize{$w$}};
%%
%% front
\draw[cyan,left color=cyan!20,right color=cyan!80]	
	(1,1,2)	--	++(1,0,0)	--	++(0,3,0)	--	++(-1,0,0)	--	++(0,-3,0);
\draw[cyan,left color=cyan!30,right color=cyan!80]	
	(1,4,2)	--	++(1,0,0)	--	++(0,0,-1)	--	++(-1,0,0)	--	++(0,0,1);
\draw[cyan,fill=cyan!80]	
	(2,4,2)	--	++(0,0,-1)	--	++(0,-3,0)	--	++(0,0,1)	--	++(0,3,0);
%% label it
\node at (1.25,2,1)				{\scriptsize{$S$}};
\end{tikzpicture}

\bigskip


\begin{tikzpicture}[scale=0.4]
\draw[thick,->,>=stealth]	(0,0,0)	--	++(5,0,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	++(0,5,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	++(0,0,7);
%%
\node[below] at	(0,0,7)		{\scriptsize{$x$}};
\node[right] at		(5,0,0)		{\scriptsize{$y$}};
\node[above] at	(0,5,0)		{\scriptsize{$z$}};
%% wedge from phi=70 to phi=15 with theta=45:90
%% segment between spheres of radius 2 and 3.5 and theta=45
\draw[orange,fill=orange!50]
			plot[domain=70:15,variable=\phi]
				(
					{2*sin(\phi)*sin(45)},
					{2*cos(\phi)},
					{2*sin(\phi)*cos(45)}
				)
		--	plot[domain=2:3.5,variable=\rho]
				(
					{\rho*sin(15)*sin(45)},
					{\rho*cos(15)},
					{\rho*sin(15)*sin(45)}
				)
		--	plot[domain=15:70,variable=\phi]
				(
					{3.5*sin(\phi)*sin(45)},
					{3.5*cos(\phi)},
					{3.5*sin(\phi)*sin(45)}
				)
		--	plot[domain=3.5:2,variable=\rho]
				(
					{\rho*sin(70)*sin(45)},
					{\rho*cos(70)},
					{\rho*sin(70)*cos(45)}
				);
%% front part of segment at rho = 3.5
\draw[orange,left color=orange!50,right color=orange!20]
			plot[domain=45:90,variable=\theta]
				(
					{3.5*sin(70)*sin(\theta)},
					{3.5*cos(70)},
					{3.5*sin(70)*cos(\theta)}
				)
		--	plot[domain=70:15,variable=\phi]	
				(
					{3.5*sin(\phi)},
					{3.5*cos(\phi)},
					{0}
				)
		--	plot[domain=90:45,variable=\theta]
				(
					{3.5*sin(15)*sin(\theta)},
					{3.5*cos(15)},
					{3.5*sin(15)*cos(\theta)}
				)
		--	plot[domain=15:70,variable=\phi]
				(
					{3.5*sin(\phi)*sin(45)},
					{3.5*cos(\phi)},
					{3.5*sin(\phi)*cos(45)}
				);
%% label it
\node at ({3.5*sin(45)*sin(67.5)}, {3.5*cos(45)},{3.5*sin(45)*cos(67.5)})	{\scriptsize{$R$}};
\end{tikzpicture}


\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
The transformation
\begin{align*}
x &= u \sin(w) cos(v)\\ 
y &= u \sin(w) \sin(v)\\ 
z &= u \cos(w)
\end{align*}
maps a box in the $uvw$ plane to a `spherical wedge' in $xyz$ space

\bigskip

The Jacobian of this transformation is
$$
{\color{red} u^2 sin(w) }
$$
\end{minipage}
\end{frame}

\section{Application}

\begin{frame}
\frametitle{Volume of an Ellipsoid}
\footnotesize
Find the volume enclosed by the ellipsoid
$$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1 $$
using the transformation 
$$ x = au, \quad y=bv, \quad z=cw $$
\end{frame}


\end{document}
