\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 - Line Integrals, Part I}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{November 8, 2019}
\maketitle

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

\begin{frame}
\frametitle{Reminders}

\begin{itemize}

\item	Homework C6 on 16.1 (vector fields) is due tonight
\item	Exam III is next Wednesday, November 13, 5:00-7:00 PM
\item	The Review Session for Exam III is Monday, November 11, 6:00-8:00 PM in room KAS 213

\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

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

\medskip


\item[{}]			Vector Fields
\begingroup
\color{red}
\item[{}]			Line Integrals (Scalar functions)
\endgroup
\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	Know how to compute line integrals of a scalar function in the plane
\item	Know how to compute line integrals of a scalar function in space
\end{itemize}
\end{frame}


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

\section{Overview}

\begin{frame}
\frametitle{Preview: Line Integrals}
\footnotesize
Our next topic will be integrals of \emph{scalar functions} and \emph{vector functions} 
over curves in the plane and in space. If $C$ is a curve in the plane or in space, we'll learn how to compute:
\begin{itemize}
\item	$\int_C f(x,y) \, ds$, the integral of a scalar function over a plane curve $C$
\item	$\int_C f(x,y,z) \, ds$, the integral of a scalar function over a space curve $C$
\item	$\int_C \bfF \cdot d\bfr$, the integal of a vector function $\bfF(x,y)$ over
a plane curve $C$
\item	$\int_C \bfF \cdot d\bfr$, the integral of a vector function $\bfF(x,y,z)$ over
a space curve $C$
\end{itemize}

\medskip


In all cases, we'll reduce these to Calculus I and II type integrals by parameterizing the curve $C$. We'll also learn how to compute integrals like
\begin{itemize}
\item	$\int_C f(x,y) \, dx$
\item	$\int_C f(x,y) \, dy$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Parameterizing Paths}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.6]
\draw[help lines,step=0.25]	(-2,-2) grid (2,2);
\draw[black,step=1]			(-2,-2) grid (2,2);
\drawxy{2.25}
\draw[red,thick,->,>=stealth]			(1,0) arc(0:90:1);
\draw[red,thick]							(0,1)	arc(90:180:1);
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=0.6]
\draw[help lines,step=0.25]	(-2,-2) grid (2,2);
\draw[black,step=1]			(-2,-2) grid (2,2);
\drawxy{2.25}
\draw[red,thick,->,>=stealth]		(0,0)	--	(1,0);
\draw[red,thick]							(1,0)	--	(2,0);
\draw[red,thick,->,>=stealth]		(2,0)	--	(2,1);
\draw[red,thick]							(2,1)	--	(2,2);
\draw[red,thick,->,>=stealth]		(2,2)	--	(1,2);
\draw[red,thick]							(1,2)	--	(0,2);
\draw[red,thick,->,>=stealth]		(0,2)	--	(0,1);
\draw[red,thick]							(0,1)	--	(0,0);
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
Parameterize the following paths:

\medskip
\begin{enumerate}
\item		The first planar path shown on the left
\item		The second planar path shown on the left
\item		The path connecting $(0,0,0)$ to $(1,0,1)$
\item		The path connecting $(1,0,1)$ to $(1,2,0)$
\end{enumerate}
\end{minipage}
\end{frame}

\section{Scalar functions in the Plane}

\begin{frame}
\frametitle{The Integral of a Scalar Function over a Plane Curve}
\footnotesize
If $C$ is a plane curve, the \textbf{line integral of $f$ along $C$} is
$$ \int_C f(x,y) \, ds = \lim_{n \to \infty} \sum_{i=1}^n f(x_i^*,y_i^*) \, \Delta s_i $$
where we approximate the curve by $n$ line segments of length $\Delta s_i$

\medskip

As a practical matter, if $C$ is parameterized by
$(x(t),y(t))$ for $a \leq t \leq b$,
$$ ds = \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} \, dt $$
so
$$ \int_C f(x,y) \, ds = \int_a^b f(x(t),y(t)) \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} \, dt$$
\end{frame}

\begin{frame}
\frametitle{The  Integral of a Scalar Function over a Plane Curve}
\footnotesize
\fcolorbox{cyan}{white}
{
\begin{minipage}{0.8\textwidth}
if $C$ is parameterized by
$(x(t),y(t))$ for $a \leq t \leq b$, then
$$ \int_C f(x,y) \, ds = \int_a^b f(x(t),y(t)) \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} \, dt$$
\end{minipage}
}

\bigskip
\begin{enumerate}
\item	Find $\int_C (x/y) \, ds$ if $C$ is the curve $x=t^2$, $y=2t$ for $0 \leq t \leq 3$
\item	Find $\int_C xy^4 \, ds$ if $C$ is the right half of the circle $x^2+y^2=16$
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Line Integrals over Piecewise Smooth Curves}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=1.5]
\draw[thick,->,>=stealth]	(-1.5,0)		--	(1.5,0);
\draw[thick,->,>=stealth]	(0,-0.25)	--	(0,1.25);
\draw[help lines,step=0.2]	(-1.5,0)	grid	(1.5,1);
%%
\node[below]	at	(1,0)		{\scriptsize{$1$}};
\node[below]	at	(-1,0)		{\scriptsize{$-1$}};
%%
\draw[red,thick,->,>=stealth]	(1,0)	arc(0:90:1);
\draw[red,thick]						(0,1)	arc(90:180:1);
\draw[red,thick,->,>=stealth]	(-1,0)	--	(0,0);
\draw[red,thick]						(0,0)	--	(1,0);
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[scale=1.5]
\draw[thick,->,>=stealth]	(-1.5,0)	--	(1.5,0);
\draw[thick,->,>=stealth]	(0,-0.25)	--	(0,1.25);
\draw[help lines,step=0.2]	(-1.5,0)	grid	(1.5,1);
%%
\node[below]	at	(1,0)		{\scriptsize{$1$}};
\node[below]	at	(-1,0)		{\scriptsize{$-1$}};
%%
\draw[red,thick,->,>=stealth]	(1,0)	arc(0:90:1);
\draw[red,thick]						(0,1)	arc(90:180:1);
\draw[red,thick,->,>=stealth]	(-1,0)	--	(-0.75,0);
\draw[red,thick]						(-0.75,0)	--	(-0.5,0);
\draw[red,thick,->,>=stealth]	(-0.5,0)	arc(180:90:0.5);
\draw[red,thick]						(0,0.5)	arc(90:0:0.5);
\draw[red,thick,->,>=stealth]	(0.5,0)	--	(0.75,0);
\draw[red,thick]						(0.75,0)	--	(1,0);
\end{tikzpicture}


\end{minipage}
\quad
\begin{minipage}{0.5\textwidth}
\footnotesize
A curve $C$ is \emph{piecewise smooth} if it is a union of smooth curves $C_1,\ldots C_n$.  Some examples are shown at left.

\medskip
If $C$ consists of seveal smooth components, then
$$ \int_C f(x,y) \, ds = \sum_{i=1}^n \int_{C_i} f(x,y) \, ds $$

\bigskip


Notice that each of these curves has an \emph{orientation} that determines how 
the curve is parameterized--the parameterization should ``follow the arrows.''

\bigskip

\begin{enumerate}
\item	Find $\int_C xy \, ds$ if $C$ is the first curve shown at left.
\end{enumerate}


\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Another Kind of Line Integral}
\footnotesize
For later use, we'll also need the line integral of $f$ with respect to $x$ and the 
line integral of $f$ with respect to $y$:

\medskip

\begin{center}
\fcolorbox{cyan}{white}
{
\begin{minipage}{0.6\textwidth}
\begin{align*}
\int_C f(x,y) \, dx		&=	\int_a^b f(x(t),y(t)) x'(t) \, dt\\[10pt]
\int_C f(x,y) \, dy		&=	\int_a^b f(x(t),y(t)) y'(t) \, dt
\end{align*}
\end{minipage}
}
\end{center}

\bigskip
\begin{enumerate}
\item		Find $\int_C e^x \, dx$ if $C$ is the arc of the curve $x=y^3$ from $(-1,-1)$ to $(1,1)$
\item		Find $\int_C x^2 \, dx + y^2 \, dy$ if $C$ is the arc of the circle $x^2+y^2=4$
from $(2,0)$ to $(0,2)$ followed by the line segment from $(0,2)$ to $(4,3)$
\end{enumerate}

\end{frame}

\begin{frame}
\frametitle{Summary of Line Integrals in the Plane}
If $C$ is a parameterized curve $(x(t),y(t))$ where $a \leq t \leq b$:

\bigskip

\begin{center}
\begin{align*}
\int_C f(x,y) \, dx		&=	\int_a^b f(x(t),y(t)) x'(t) \, dt\\[10pt]
\int_C f(x,y) \, dy		&=	\int_a^b f(x(t),y(t)) y'(t) \, dt\\[10pt]
\int_C f(x,y) \, ds		&=	\int_a^b f(x(t),y(t)) \sqrt{(x'(t)^2 + y'(t)^2} \, dt
\end{align*}
\end{center}

\end{frame}

\begin{frame}
\frametitle{Applications - Center of Mass}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick,->,>=stealth]	(-0.25,0)	--	(2,0);
\draw[thick,->,>=stealth]	(0,-0.25)	--	(0,2);
\node[left]	at	(0,1)			{\scriptsize{$a$}};
\node[below] at (1,0)		{\scriptsize{$a$}};
\draw[red]						(1,0) 	arc(0:90:1);
\draw[red]						(0.95,0)	arc(0:90:0.95);
\end{tikzpicture}
\end{minipage}
\quad
\begin{minipage}{0.6\textwidth}
\footnotesize
A wire of mass $m$ and density $\rho(x,y)$ along a curve $C$ has center of mass
\begin{align*}
\overline{x}	&=	\frac{1}{m} \int_C x \rho(x,y) \, ds\\
\overline{y}	&=	\frac{1}{m} \int_C y \rho(x,y) \, ds
\end{align*}

\bigskip

A thin wire has the shape of the first quadrant part of a circle with center at the origin and radius $a$. If the density of the wire is $$\rho(x,y)= kxy,$$ find the mass and center of mass of the wire.
\end{minipage}
\end{frame}

\section{Scalar Functions in Space}

\begin{frame}
\frametitle{Line Integrals in Space}
\footnotesize
If $C$ is a space curve $(x(t),y(t),z(t))$ where $a \leq t \leq b$, then
\begin{multline*}
 \int_C f(x,y,z) \, ds = \\
	\int_a^b f(x(t),y(t),z(t)) \, \sqrt{(x'(t))^2 + (y'(t))^2 + (z'(t))^2 } \, dt
\end{multline*}

\bigskip

\begin{enumerate}
\item		Find $\int_C (x^2+y^2+z^2) \, ds $ if $C$ is the space curve
			$(x(t),y(t),z(t)) = (t, \cos 2t, \sin 2t)$ for $0 \leq t \leq 2\pi$
\end{enumerate}

\end{frame}

\begin{frame}
\frametitle{More Line Integrals in Space}
\footnotesize
Can you guess how to define $\int_C f(x,y,z) \, dx$, $\int_C f(x,y,z) \, dy$, and
$\int_C f(x,y,z) \, dz$?

\bigskip

\begin{enumerate}
\item		Find $\int_C (x+z) \, dx + \int_C (x+z) \, dy + \int_C (x+y) \, dz$
			if $C$ consists of the line segments from $(0,0,0)$ to $(1,0,1)$ and
			from $(1,0,1)$ to $(0,1,2)$
\end{enumerate}

\bigskip

\begin{tikzpicture}
\drawxyz{2}
%%
\draw[black,fill=black]	(0,1,1)	circle(0.05cm);
\draw[black,fill=black]	(1,2,0)	circle(0.05cm);
\draw[black,fill=black]	(0,0,0)	circle(0.05cm);
%%
\node[left]		at	(0,1,1)	{\tiny{$(1,0,1)$}};
\node[right]	at	(1,2,0)	{\tiny{$(1,2,0)$}};
\node[below]	at	(0.25,0,0)	{\tiny{$(0,0,0)$}};
%%
\draw[red,thick,->,>=stealth]	(0,0,0)			--	(0,0.5,0.5);
\draw[red,thick]						(0,0.5,0.5)		--	(0,1,1);
\draw[red,thick,->,>=stealth]	(0,1,1)			--	(0.5,1.5,0.5);
\draw[red,thick]						(0.5,1.5,0.5)	--	(1,2,0);
\end{tikzpicture}
\end{frame}




\end{document}
