\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 - Stokes' Theorem , Part I}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{December 2, 2019}
\maketitle

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

\begin{frame}
\frametitle{Reminders}

\begin{itemize}

\item	Homework D3 (Parametric surfaces, areas) is due on Wednesday

\item Quiz \#10 on 16.4-16.5 (Green's theorem, curl, divergence) takes place on Thursday

\item	Homework D4 (Surface integrals, Stokes' Theorem) is due on Friday

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Unit IV: Vector Calculus}
\begin{center}
\begin{itemize}
\item[{}]			Fundamental Theorem for Line Integrals
\item[{}]			Green's Theorem
\item[{}]			Curl and Divergence
\item[{}]			Parametric Surfaces and their Areas
\item[{}]			Surface Integrals
\begingroup
\color{red}
\item[{}]			Stokes' Theorem, I
\endgroup
\item[{}]			Stokes' Theorem, II 
\item[{}]			The Divergence Theorem
\item[{}]			
\item[{}]			Review
\item[{}]			Review
\item[{}]			Review
\end{itemize}
\end{center}
\end{frame}

\section{Learning Goals}

\begin{frame}
\frametitle{Goals of the Day}
This lecture is about Stokes' Theorem, which generalizes Green's Theorem to surfaces in three dimensions. You will learn:

\bigskip

\begin{itemize}
\item	What the \emph{oriented boundary} of a surface $S$ is
\item	How the flux of $\nabla \times F$ through a surface $S$ is related to 
		the line integral of $F$ over the oriented boundary of $S$
\item	How Stokes' Theorem can be used to compute surface integrals and line integrals
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Sneak Preview - Green versus Stokes}
\adjustbox{valign=t}
{
\begin{minipage}{0.4\textwidth}
\footnotesize
\begin{center}
\textbf{Green's Theorem}
\only<1>
{
\begin{flushleft}
\includegraphics[width=0.35\textwidth]{Images/George-Green-from-Physics-Today.pdf}
\hfill \tiny{George Green (1819-1903) }
\end{flushleft}
}
\end{center}
\only<2>
{
\begin{center}
	\begin{tikzpicture}[scale=0.4]
	\draw[thick,->,>=stealth]	(-2.5,0) 	-- 	(2.5,0)		node[anchor=west]		{\tiny{$x$}};
	\draw[thick,->,>=stealth]	(0,-2.5)	--	(0, 2.5)		node[anchor=south]	{\tiny{$y$}};
	\draw[orange,fill=orange!30,opacity=0.5]
		plot[domain=0:360,variable=\theta]
			(
				{2*cos(\theta)},
				{1.5*sin(\theta)}
			);
	\draw[orange,very thick,->-]
		plot[domain=20:200,variable=\theta]
			(
				{2*cos(\theta)},
				{1.5*sin(\theta)}
			);
	\draw[orange,very thick,->-]
		plot[domain=200:380,variable=\theta]
			(
				{2*cos(\theta)},
				{1.5*sin(\theta)}
			);
	\node at (0.55,0.55)	{\tiny{$D$}};
	\node[anchor=south east] at ({1.9*cos(135)},{1.4*sin(125)})	{\tiny{$C$}};
	\end{tikzpicture}
	\end{center}
}

\medskip

\scriptsize

Suppose $D$ is a plane region bounded by a piecewise smooth, simple closed curve $C$.  If $P$ and $Q$ have continuous partial derivatives in an open region that contains $D$
\begin{multline*}
 \int_C P \, dx + Q \, dy = \\
 \iint_D \left( \frac{\dee Q}{\dee x} - \frac{\dee P}{\dee y} \right) \, dA 
\end{multline*}

\end{minipage}
}
\quad
\adjustbox{valign=t}
{
\begin{minipage}{0.45\textwidth}
\footnotesize
\begin{center}
\textbf{Stokes' Theorem}
\end{center}
\only<1>
{
\begin{flushright}
\tiny{George Stokes (1793-1841)\hfill}
\includegraphics[width=0.30\textwidth]{Images/Stokes_8.jpeg}
\end{flushright}
}
\only<2>
{
%%
	%%		Based on Figure 16.8.4 of the texxt
	%%
	\tdplotsetmaincoords{70}{110}
	\begin{tikzpicture}[scale=0.4,tdplot_main_coords]
	\draw[thick,->,>=stealth]	(0,0,0)	--	(5,0,0)	node[anchor=north east]		{\scriptsize{$x$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,4,0)	node[anchor=west]				{\scriptsize{$y$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,4)	node[anchor=south]			{\scriptsize{$z$}};
	%%
	%%		Draw a spherical cap for the sphere of radius sqrt(8)
	%%
	%%		1. Draw the bounding curve
	%%		2. Draw the cap
	%%
	\draw[very thick,blue,->-]
		plot[domain=-70:110,variable=\theta,samples=50]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{2}
			);
	\draw[blue, dashed]
		plot[domain=110:290,variable=\theta,samples=50]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{2}
			);
	\node[anchor=north west] at 
			(
				{2*cos(45)},
				{2*sin(45)},
				{2}
			)
			{\scriptsize{$C$}};
		
	\foreach \theta in {-70,-60,...,110}
			{
				\draw[blue,opacity=0.5]
					plot[domain=-45:45,variable=\phi]
						(
							{sqrt(8)*sin(\phi)*cos(\theta)},
							{sqrt(8)*sin(\phi)*sin(\theta)},
							{sqrt(8)*cos(\phi)}
						);
			}
	\foreach \phi in {-45,-35,...,45}
			{
				\draw[blue,opacity=0.5]
					plot[domain=-70:110,variable=\theta]
						(
							{sqrt(8)*sin(\phi)*cos(\theta)},
							{sqrt(8)*sin(\phi)*sin(\theta)},
							{sqrt(8)*cos(\phi)}
						);
					
			}
	\end{tikzpicture}
}

\medskip

\scriptsize

Suppose $S$ is an oriented piecewise smooth surface bounded by a simple, closed, piecewise smooth curve $C$ with positive orientation. Suppose $\bfF$ is a vector field with continuous partial derivatives on an open region in $\R^3$ that contains $S$. Then
$$ \int_C \bfF \cdot \, d \bfr = \iint_S \curl \bfF \cdot \bfn \, dS $$
where $\bfn$ is the \emph{outward unit normal}
\scriptsize


\end{minipage}
}
\end{frame}



\begin{frame}
\frametitle{Green versus Stokes, Continued}
\footnotesize
In Green's Theorem,
$\bfF = P(x,y) \ii + Q(x,y) \jj $ is a vector field in the plane

\medskip
In Stokes' Theorem, 
$$ \bfF = P(x,y,z) \ii + Q(x,y,z) \jj + R(x,y,z) \kk $$
is a vector field in space

\medskip
Stokes' Theorem
$$ \int_C \bfF \cdot \, d\bfr = \iint_S \bfF \cdot \bfn \, dS $$
can also be written
\begin{multline*}
 \int_C P \, dx + Q \, dy + R \, dz = \\
 \iint_S 
 	\left( \frac{\dee R}{\dee y} - \frac{\dee Q}{\dee z} \right) 	\, 	dy 	\, dz +
 	\left( \frac{\dee P}{\dee z} - \frac{\dee R}{\dee x} \right)	\, 	dx 	\, dz +
 	\left( \frac{\dee Q}{\dee x} - \frac{\dee P}{\dee y} \right)	\, 	dx		\, 	dy
\end{multline*}
If $S$ lies in the $xy$ plane and $R=0$, Stokes' Theorem reduces to Green's Theorem
\end{frame}

\section{The Oriented Boundary}
\begin{frame}
\frametitle{Surface to the Left!}
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\begin{center}
	\begin{tikzpicture}[scale=0.5]
	\draw[thick,->,>=stealth]	(-2.5,0) 	-- 	(2.5,0)		node[anchor=west]		{\scriptsize{$x$}};
	\draw[thick,->,>=stealth]	(0,-2.5)	--	(0, 2.5)		node[anchor=south]	{\scriptsize{$y$}};
	\draw[orange,fill=orange!30,opacity=0.5]
		plot[domain=0:360,variable=\theta]
			(
				{2*cos(\theta)},
				{1.5*sin(\theta)}
			);
	\draw[orange,very thick,->-]
		plot[domain=20:200,variable=\theta]
			(
				{2*cos(\theta)},
				{1.5*sin(\theta)}
			);
	\draw[orange,very thick,->-]
		plot[domain=200:380,variable=\theta]
			(
				{2*cos(\theta)},
				{1.5*sin(\theta)}
			);
	\node at (0.55,0.55)	{\scriptsize{$D$}};
	\node[anchor=south east] at ({1.9*cos(135)},{1.4*sin(125)})	{\scriptsize{$C$}};
	\end{tikzpicture}
	\end{center}
	\end{minipage}
}
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	%%
	%%		Based on Figure 16.8.4 of the texxt
	%%
	\tdplotsetmaincoords{70}{110}
	\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
	\draw[thick,->,>=stealth]	(0,0,0)	--	(5,0,0)	node[anchor=north east]		{\scriptsize{$x$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,4,0)	node[anchor=west]				{\scriptsize{$y$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,4)	node[anchor=south]			{\scriptsize{$z$}};
	%%
	%%		Draw a spherical cap for the sphere of radius sqrt(8)
	%%
	%%		1. Draw the bounding curve
	%%		2. Draw the cap
	%%
	\draw[very thick,blue,->-]
		plot[domain=-70:110,variable=\theta,samples=50]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{2}
			);
	\draw[blue, dashed]
		plot[domain=110:290,variable=\theta,samples=50]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{2}
			);
	\node[anchor=north west] at 
			(
				{2*cos(45)},
				{2*sin(45)},
				{2}
			)
			{\scriptsize{$C$}};
		
	\foreach \theta in {-70,-60,...,110}
			{
				\draw[blue,opacity=0.5]
					plot[domain=-45:45,variable=\phi]
						(
							{sqrt(8)*sin(\phi)*cos(\theta)},
							{sqrt(8)*sin(\phi)*sin(\theta)},
							{sqrt(8)*cos(\phi)}
						);
			}
	\foreach \phi in {-45,-35,...,45}
			{
				\draw[blue,opacity=0.5]
					plot[domain=-70:110,variable=\theta]
						(
							{sqrt(8)*sin(\phi)*cos(\theta)},
							{sqrt(8)*sin(\phi)*sin(\theta)},
							{sqrt(8)*cos(\phi)}
						);
					
			}
	\end{tikzpicture}
	\end{minipage}
}

\vfill

\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\footnotesize
	The parameterization
	$$ \bfr(t) = a \cos t + b \sin t$$
	for $0 \leq t \leq 2\pi$ gives bounding
	curve the correct orientation

	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\footnotesize
	The parameterization
	\begin{align*}
	\bfr(u,v)	&=	\sin v \cos u \ii + \sin v \sin u \jj\\
				&\quad + \cos v \jj
	\end{align*}
	for $0 \leq u \leq 2\pi$, $0 \leq v \leq \pi/4$
	gives the bounding curve the correct orientation
	\end{minipage}
}
\end{frame}


\section{Stokes' Theorem}
\begin{frame}
\footnotesize
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	%%
	%%		Based on Figure 16.8.4 of the texxt
	%%
	\tdplotsetmaincoords{70}{110}
	\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
	\draw[thick,->,>=stealth]	(0,0,0)	--	(5,0,0)	node[anchor=north east]		{\scriptsize{$x$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,4,0)	node[anchor=west]				{\scriptsize{$y$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,4)	node[anchor=south]			{\scriptsize{$z$}};
	%%
	%%		Draw a spherical cap for the sphere of radius sqrt(8)
	%%
	%%		1. Draw the bounding curve
	%%		2. Draw the cap
	%%		3. Draw the outline of the spherical cap
	%%		4. Draw the outline of the cylinder 
	%%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%
	%%		Step 1: Draw the bounding curve (dashed line 
	%%					is hidden)
	%%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\draw[very thick,blue,->-]
		plot[domain=-70:110,variable=\theta,samples=50]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{2}
			);
	\draw[blue, dashed]
		plot[domain=110:290,variable=\theta,samples=50]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{2}
			);
	%%
	%%	Step 2: Draw the cap using economical grid 
	%%				generation
	%%	
	\foreach \theta in {-70,-60,...,110}
			{
				\draw[blue,opacity=0.5]
					plot[domain=-45:45,variable=\phi]
						(
							{sqrt(8)*sin(\phi)*cos(\theta)},
							{sqrt(8)*sin(\phi)*sin(\theta)},
							{sqrt(8)*cos(\phi)}
						);
			}
	\foreach \phi in {-45,-35,...,45}
			{
				\draw[blue,opacity=0.5]
					plot[domain=-70:110,variable=\theta]
						(
							{sqrt(8)*sin(\phi)*cos(\theta)},
							{sqrt(8)*sin(\phi)*sin(\theta)},
							{sqrt(8)*cos(\phi)}
						);
					
			}
	%%
	%%	Step 3:	Draw the outline of the spherical cap
	%%
	\draw[dashed,blue!50]
		plot[domain=0:360,variable=\theta]
			(
				{sqrt(8)*cos(\theta)},
				{sqrt(8)*sin(\theta)},
				{0}
			);
	\draw[dashed,blue!50]
		plot[domain=90:45,variable=\phi]
			(
				{sqrt(8)*sin(\phi)*cos(-70)},
				{sqrt(8)*sin(\phi)*sin(-70)},
				{sqrt(8)*(cos(\phi)}
			);
	\draw[dashed,blue!50]
		plot[domain=90:45,variable=\phi]
			(
				{sqrt(8)*sin(\phi)*cos(110)},
				{sqrt(8)*sin(\phi)*sin(110)},
				{sqrt(8)*(cos(\phi)}
			);
	%%
	%%	Step 4: 	Draw the outline of the cylinder
	%%
	\draw[dashed,red!50]
		plot[domain=0:360,variable=\theta]
			(
				{2*cos(\theta)},
				{2*sin(\theta)},
				{0}
			);
	\draw[dashed,red!50]
			(
				{2*cos(-70)},
				{2*sin(-70)},
				0
			)
			--
			++(0,0,2);
	\draw[dashed,red!50]
			(
				{2*cos(110)},
				{2*sin(110)},
				0
			)
			--
			++(0,0,2);
	\end{tikzpicture}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\footnotesize
	Parameterize the surface $S$ which lies on the sphere
	$$ x^2+y^2 + z^2 = 8 $$
	and above the cylinder
	$$ x^2 + y^2 = 4$$
	
	\medskip
	\end{minipage}
}
\vfill
\footnotesize
\uncover<2->
	{
		In spherical coordinates,
		$0 \leq u \leq 2\pi, \, 0 \leq v \leq \pi/4$ so:
		\begin{align*}
		\bfr(u,v)	&=	\sqrt{8} \left( \sin v \cos u \ii + \sin v \sin u \jj + \cos v \kk \right)\\
		\bfr_u	&=	-\sqrt{8} \sin v \sin u \ii + \sqrt{8} \sin v \cos u \jj\\
		\bfr_v	&=	\sqrt{8}\cos v \cos u \ii +\sqrt{8} \cos v \sin u \jj - \sqrt{8} \sin v \kk	\\
		\bfr_u \times \bfr_v &=		8 \sin^2 v \cos u \ii +8  \sin^2 v \sin u +8  \sin v \cos v \kk\\
		\bfN		&=	\sin v \cos u \ii + \sin v \sin u \jj + \cos v \kk
		\end{align*}
		Should we have known the formula for  $\bfN(u,v) $ already? Is it the unit outward normal?
	}
\end{frame}

\begin{frame}
\frametitle{Which Way is Outward? What's Positive Orientation?}
\footnotesize

\begin{center}
\fcolorbox{cyan}{white}
{
\begin{minipage}{0.8\textwidth}
{\color{cyan} \textbf{Theorem} (Stokes)}
Suppose $S$ is an oriented piecewise smooth surface bounded by a simple, closed, piecewise smooth curve $C$ with positive orientation. Suppose $\bfF$ is a vector field with continuous partial derivatives on an open region in $\R^3$ that contains $S$. Then
$$ \int_C \bfF \cdot \, d \bfr = \iint_S \curl \bfF \cdot \bfn \, dS $$
where $\bfn$ is the \emph{outward unit normal}
\end{minipage}
}

\vfill

\begin{minipage}{0.8\textwidth}
	If you walk around $C$ with your head in the direction of the outward normal to the surface, 
	the surface will always be on your left.
\end{minipage}


\end{center}

\end{frame}

\section{Using Stokes' Theorem}
\begin{frame}
\frametitle{Using Stokes' Theorem}

\scriptsize 
\textbf{Theorem} 
Suppose $S$ is an oriented piecewise smooth surface bounded by a simple, closed, piecewise smooth curve $C$ with positive orientation. Suppose $\bfF$ is a vector field with continuous partial derivatives on an open region in $\R^3$ that contains $S$. Then
$$ \int_C \bfF \cdot \, d \bfr = \iint_S \curl \bfF \cdot \bfn \, dS $$
where $\bfn$ is the \emph{outward unit normal}

\vfill

\adjustbox{valign=t}
{
	\begin{minipage}{0.4\textwidth}
	\begin{tikzpicture}[scale=0.5]
	\begin{axis}[xtick=\empty,ytick=\empty,ztick=\empty]
	\addplot3[surf,z buffer=sort,domain=0:1,y domain=0:360,samples=30]
		(
			{x*cos(y)},
			{x*sin(y)},
			{1-x^2}
		);
	\end{axis}
	\end{tikzpicture}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.4\textwidth}
	%	16.8.2
	Use Stokes' Thoerem to find $\iint_S \curl \bfF \cdot \, d \bfS$ if
	$$ \bfF (x,y,z) = x^2 \sin z \ii + y^2 \jj + xy \kk $$
	if $S$ is the part of the paraboloid $z=1-x^2-y^2$ that lies above the 
	$xy$-plane, oriented upward
	
	\medskip
	
	What is the bounding curve $C$? How should $C$ be oriented?
	\end{minipage}
}

\end{frame}


\begin{frame}
\frametitle{Using Stokes' Theorem}

\scriptsize 
\textbf{Stokes' Theorem} 
Suppose $S$ is an oriented piecewise smooth surface bounded by a simple, closed, piecewise smooth curve $C$ with positive orientation. Suppose $\bfF$ is a vector field with continuous partial derivatives on an open region in $\R^3$ that contains $S$. Then
$$ \int_C \bfF \cdot \, d \bfr = \iint_S \curl \bfF \cdot \bfn \, dS $$
where $\bfn$ is the \emph{outward unit normal}

\vfill

\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\tdplotsetmaincoords{70}{110}
	\begin{tikzpicture}[scale=2,tdplot_main_coords]
	
	%% 
	%%	Faces of solid
	%%
	
	\draw[white,fill=red!80]	(1,0,0)	--	(0,0,0)	--	(0,0,1)	--	cycle;
	\draw[white,fill=red!20]	(0,0,0)	--	(0,0,1)	--	(0,1,0)	--	cycle;
	\draw[white,fill=red!50]	(1,0,0)	--	(0,1,0)	--	(0,0,0)	-- 	cycle;
	\draw[white,fill=orange!20,opacity=0.5]	(1,0,0)	--	(0,1,0)	--	(0,0,1)	--	cycle;
	
	%%
	%%	Coordinate axes
	%%
	
	\draw[thick,->,>=stealth]	(0,0,0)	--	(1.5,0,0)	node[anchor=north east] {\scriptsize{$x$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,1.5,0)	node[anchor=west]			{\scriptsize{$y$}};
	\draw[thick,->,>=stealth]	(0,0,0)	--	(0,0,1.5)	node[anchor=south]		{\scriptsize{$z$}};
	
	%%
	%%	the curve C
	%%
	
	\draw[thick,red,->-]	
		(1,0,0)	--	(0,1,0);
	\draw[thick,red,->-]
		(0,1,0)	--	(0,0,1);
	\draw[thick,red,->-]
		(0,0,1)	--	(1,0,0);
		
	%%
	%%	Vertex labels
	%%
	
	\node[left]	at	(0,0,1)							{\scriptsize{$(0,0,1)$}};
	\node[anchor=south east]	at	(1,0,0)	{\scriptsize{$(1,0,0)$}};
	\node[anchor=south west] 	at	(0,1,0)	{\scriptsize{$(0,1,0)$}};
	
	\end{tikzpicture}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	%	16.8.7
	Use Stokes' Theorem to evaluate $$\int_C \bfF \cdot \, d\bfr$$ if $C$ is the triangle 
	shown and 
	$$ \bfF(x,y,z) = (x+y^2) \ii + (y+z^2) \jj + (z+x^2) \kk, $$
	$$ \curl \bfF = -2(z \ii + x \jj + y \kk ).$$
	
	What is a good choice of surface $S$? How should it be oriented?
	\end{minipage}
}

\end{frame}

\section{Review}

\begin{frame}
\frametitle{Review}
\footnotesize

\textbf{Stokes' Theorem} 
Suppose $S$ is an oriented piecewise smooth surface bounded by a simple, closed, piecewise smooth curve $C$ with positive orientation. Suppose $\bfF$ is a vector field with continuous partial derivatives on an open region in $\R^3$ that contains $S$. Then
$$ \int_C \bfF \cdot \, d \bfr = \iint_S \curl \bfF \cdot \bfn \, dS $$
where $\bfn$ is the \emph{outward unit normal}


\vfill

\emph{Remember}:

\bigskip

\begin{minipage}{0.8\textwidth}
	If you walk around $C$ with your head in the direction of the outward normal to the surface, 
	the surface will always be on your left.
\end{minipage}

\end{frame}

\end{document}

