\documentclass[12pt]{amsart}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb}
\pagestyle{headings}
\setlength{\textwidth}{36true pc}
\setlength{\headheight}{8true pt} % needed for 12pt documents
\setlength{\oddsidemargin}{15 truept}
\setlength{\evensidemargin}{15 truept}
\setlength{\textheight}{572true pt}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lm}[thm]{Lemma}
\newtheorem{prp}[thm]{Proposition}
\newtheorem{clm}[thm]{Claim}
%
\theoremstyle{definition}
\newtheorem{df}[thm]{Definition}
\newtheorem{exmp}[thm]{Example}
\newtheorem{prb}[thm]{Problem}
%
\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}
%
\numberwithin{equation}{section}
%
\newcommand{\thref}[1]{Theorem~\ref{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}
\newcommand{\lmref}[1]{Lemma~\ref{#1}}
%
\DeclareMathOperator{\satf}{\models}
\DeclareMathOperator{\miff}{\Longleftrightarrow} 
                                           % math `if and only if'
\DeclareMathOperator{\mimplies}{\Longrightarrow} 
                                           % math `implies'
\DeclareMathOperator{\mimplied}{\Longleftarrow}  
                                           % math `implied by'
\newcommand{\set}[2]{\{#1\,:\,\text{#2}\}} % { x : ... }
\DeclareMathOperator{\id}{\textsl{id}}     % The identity map
\DeclareMathOperator{\miffdef}{\stackrel{def}{\miff}}
                                           % defining iff
\DeclareMathOperator{\eqdef}{\stackrel{def}{=}}
                                           % defining equation

\DeclareMathOperator{\neareq}{\stackrel{\ae}{=}}
\DeclareMathOperator{\aeqv}{\stackrel{ae}{\equiv}}
\DeclareMathOperator{\aeq}{\stackrel{ae}{=}}
%
\DeclareMathOperator{\BZ}{\mathbb{Z}} % integers
\DeclareMathOperator{\BQ}{\mathbb{Q}} % rationals
\DeclareMathOperator{\BR}{\mathbb{R}} % reals
\DeclareMathOperator{\BC}{\mathbb{C}} % complex numbers
\DeclareMathOperator{\BF}{\mathbb{F}} % 
\DeclareMathOperator{\BK}{\mathbb{K}} % 
\DeclareMathOperator{\BL}{\mathbb{L}} % 
\DeclareMathOperator{\re}{Re}         % real part
\DeclareMathOperator{\im}{Im}         % imaginary part
\DeclareMathOperator{\Ker}{Ker}
%
\DeclareMathOperator{\meet}{\wedge}
\DeclareMathOperator{\join}{\vee}
\DeclareMathOperator{\union}{\cup}
\DeclareMathOperator{\inter}{\cap}  % intersection
\DeclareMathOperator{\iso}{\cong}   % isomorphic
\DeclareMathOperator{\piso}{\simeq} % polynomially isomorphic
\newcommand{\Star}{^ *}
\DeclareMathOperator{\compose}{{\scriptstyle \circ}} % f o g
%
\newcommand{\wec}[1]{{\mathbf{#1}}}  % notation for vectors in algebras
%\newcommand{\wec}[1]{{\bar{#1}}} % which one do you prefer?
\newcommand{\wrel}[1]{\;#1\;}     % a\wrel{\alpha}b = a \alpha b
%              % this provides a flexible way to change the spacing
%
\newcommand{\m}[1]{{\mathbf{\uppercase{#1}}}}
\newcommand{\vr}[1]{{\mathcal{\uppercase {#1}}}}
%
\DeclareMathOperator{\Var}{\mathbf{V}}
\DeclareMathOperator{\Ho}{\mathbf{H}}
\DeclareMathOperator{\Su}{\mathbf{S}}
\DeclareMathOperator{\Pd}{\mathbf{P}}
\DeclareMathOperator{\Iso}{\mathbf{I}}
\DeclareMathOperator{\Ps}{\mathbf{P}_s}
\newcommand{\fin}[1]{{\mathbf{#1}}_{\text{\upshape fin}}}
%
\DeclareMathOperator{\Pol}{Pol}
\DeclareMathOperator{\Clo}{Clo}
\DeclareMathOperator{\Con}{Con}
\DeclareMathOperator{\Conb}{\mathbf{Con}} % Con(A) as a lattice
\DeclareMathOperator{\cg}{Cg}
\DeclareMathOperator{\sg}{Sg}
\newcommand{\Cg}[1]{{\cg}^{\m{#1}}}
\newcommand{\Sg}[1]{{\sg}^{\m{#1}}}
%
\newcommand{\M}[3]{\text{\upshape M}_{\m{#1}} (#2, #3)}
\newcommand{\minl}[1]{\text{\upshape Min}_{\m{#1}}}
%
\DeclareMathOperator{\typ}{typ}
\DeclareMathOperator{\ann}{ann}
\DeclareMathOperator{\Sep}{Sep}
\DeclareMathOperator{\ssb}{ssb}
\DeclareMathOperator{\sst}{sst}
%
\DeclareMathOperator{\utyp}{\mathbf{1}}% unary      
\DeclareMathOperator{\atyp}{\mathbf{2}}% affine     
\DeclareMathOperator{\btyp}{\mathbf{3}}% boolean    
\DeclareMathOperator{\ltyp}{\mathbf{4}}% lattice    
\DeclareMathOperator{\styp}{\mathbf{5}}% semilattice
\DeclareMathOperator{\ityp}{\mathbf{i}}
\DeclareMathOperator{\jtyp}{\mathbf{j}}
%
\DeclareMathOperator{\solv}{\stackrel{s}{\sim}}
\DeclareMathOperator{\ssolv}{\stackrel{ss}{\sim}}
%
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}
%
\newcommand{\lb}{\langle} % <...>
\newcommand{\rb}{\rangle}
\newcommand{\lv}{{[\![}}  % [[...]]
\newcommand{\rv}{{]\!]}}
%
\newcommand{\ul}{\underline}
\newcommand{\ol}{\overline}
%
\newcommand{\vep}{\varepsilon}
\newcommand{\di}{\diamond}
%


\begin{document}

\noindent
{\bf  Additional Notes \#4:
Tips for Parametrizing Contours}

\medskip

Our method for computing the value of a contour
integral $\int_C f(z)\;dz$ is to parametrize 
$C$ with a function $z = z(t), t\in [a,b]$,
and then evaluate $\int_a^b f(z(t))z'(t)\;dt$.
Alternatively, if $f = u+iv$, then we can rewrite 
$\int_C f(z)\;dz$ as the combination
$\left(\int_C udx-vdy\right) + i\left(\int_C vdx+udy\right)$ 
of two real line integrals.
We still have to parametrize $C$, but now the parametrization
of $C$ takes the form of a pair of functions
$(x(t), y(t)), t\in [a,b]$. Here $z(t) = x(t) + iy(t)$
is a parametrization we might use in the
first method. These two methods are essentially
the same, and both rely on parametrizing a curve
$C$ in the plane.

\medskip

\noindent
{\bf Tip 1.} (Line Segments)

If you need to parametrize the line segment from 
$(a,b)$ to $(c,d)$, then recall from 
Calculus 3 that to parametrize the 
line in ${\BR}^2$ through $(a,b)$ and $(c,d)$
you find a direction vector 
${\bf d} = (c,d)-(a,b) = (c-a,d-b)$. Then the line 
in vector form is 
$(x(t),y(t)) = (a,b) + t{\bf d} = (a+t(c-a),b+t(d-b))$.
When $t=0$ you are at point $(a,b)$, and when $t = 1$
you are at point $(c,d)$. Thus, 
$x(t) = a+t(c-a), y(t) = b+t(d-b), t\in [0,1]$
parametrizes the segment from 
$(a,b)$ to $(c,d)$.

If you want to work with $z\in {\BC}$ instead
of $(x,y)\in {\BR}^2$, then do the following.
To parametrize the segment 
from $p = a+bi$ to $q = c+di$ use 
$z(t) = p + t(q-p), t\in [0,1]$.
This is the same as what we did in the preceding paragraph.

\medskip

\noindent
{\bf Tip 2.} (Circular Arcs)

An arc of a circle in ${\BR}^2$ centered at $(0,0)$
with radius $r$ could be parametrized by 
$(x(t),y(t)) = (r\cos(t), r\sin(t)), t\in [\theta_0,\theta_1]$
where the angles $\theta_0$ and $\theta_1$ determine 
the arc. This is a counterclockwise parametrization.
If the arc is centered at $(a,b)$ instead
of $(0,0)$, we can translate our parametrization 
to $(x(t),y(t)) = (a+r\cos(t), b+ r\sin(t)), t\in
[\theta_0,\theta_1]$.
This is a counterclockwise parametrization.

If you want to work with $z\in {\BC}$ instead
of $(x,y)\in {\BR}^2$, then do the following.
To parametrize an arc of the circle
$|z| = r$ in the counterclockwise direction use 
$z(t) = re^{it}, t\in [\theta_0,\theta_1]$.
To parametrize an arc of the circle
$|z - z_0| = r$ in the counterclockwise direction use 
$z(t) = z_0 + re^{it}, t\in [\theta_0,\theta_1]$.
This is the same as what we did in the preceding paragraph
if $z_0 = a+bi$.

How would the answer be different
if we wanted $C$ directed the other way?

\medskip


\noindent
{\bf Tip 3.} (Parabolas, Hyperbolas, Squigulas,
Snoodoids, \ldots)

If you are faced with a strange curve, be comforted 
by the thought that nobody else knows much more 
about parametrizing it than you do. So begin by studying
the description of the curve. There is a good
chance that if you understand the description, then you
understand it because you know (or are given) 
an equation for it. If you know that a curve $C$
in ${\BR}^2$ is the graph of a function $y = f(x)$,
then $(x(t),y(t)) = (t,f(t))$ can be used to parametrize
$C$. If it is the graph of $x = g(y)$, then 
$(x(t),y(t)) = (g(t),t)$ can be used to parametrize $C$.

Let's consider what one might do if $C$ is
not in either of these cases.

\medskip

\noindent
{\bf Problem.} {\em Parametrize the contour $C$
that is defined to be the right branch 
of the hyperbola $x^2 - y^2 = 1$, directed upward.}

\medskip

Before doing anything else, sketch this curve.

\medskip

\noindent
{\bf First attempt:} This is not in the form 
$y=f(x)$ or $x = g(y)$, but we could put 
it in that form. After looking at the graph
it seems best to put it in the form $x = g(y)$
rather than $y = f(x)$.
(If this is not clear,
then look back at your sketch.)
Solving for $x$ in $x^2 - y^2 = 1$ we find that 
$x = \sqrt{y^2+1}$. The positive square root
gives the right branch, and the negative square
root gives the left branch. (If this is not clear,
then look back at your sketch.)

The parametrization we seek is
$(x(t),y(t)) = (\sqrt{t^2+1},t), t\in (-\infty,\infty)$.
(If it is not clear why $t\in (-\infty,\infty)$,
then you know what to do!)

How would the answer be different
if we wanted $C$ directed the other way?

\medskip

\noindent
{\bf Second attempt:} We want to find a parametrization
$(x(t),y(t))$ of a branch of $x^2-y^2 = 1$, so we need
a pair of functions $x(t)$ and $y(t)$ satisfying
\[[x(t)]^2 - [y(t)]^2 = 1.\]
Do we know a pair of functions related in this way?
If we are lucky, then we will remember the identity
$\sec^2(t) - \tan^2(t) = 1$. We then realize that
we could take $(x(t),y(t)) = (\sec(t),\tan(t))$.
After some thought we decide that we should use
$t\in (-\pi/2,\pi/2)$.


\medskip

\noindent
{\bf Third attempt:} What if we didn't know that trig
identity? We might have remembered instead that 
${\rm cosh}^2(t) - {\rm sinh}^2(t) =1.$
If so, then we would pick
$(x(t),y(t)) = ({\rm cosh}(t),{\rm sinh}(t)),
t\in (-\infty,\infty)$.

\bigskip

If the last two approaches seem like guessing, 
it is because
they are. But this works a lot of the time.
To parametrize the {\bf ellipse}, 
$\displaystyle 
\frac{x^2}{a^2} + \frac{y^2}{b^2} =
1$, we might recognize the similarity of this equation
with $\cos^2(t)+\sin^2(t)=1$
and set $\displaystyle \frac{x}{a} = \cos(t), \frac{y}{b} = \sin(t)$, or
$(x(t),y(t)) = (a\cos(t), b\sin(t))$.
The equation of the {\bf astroid}, 
$\displaystyle x^{\frac{2}{3}} + y^{\frac{2}{3}} =
1$, looks different but it isn't. We can set
$\displaystyle x^{\frac{1}{3}} = \cos(t), 
y^{\frac{1}{3}} =\sin(t)$, or 
$(x(t),y(t)) = (\cos^3(t),\sin^3(t))$.
A more complicated equation like
$x^2 + xy + y^2 = 1$ can be handled by completing the
square, $(x+(y/2))^2 + (3/4)y^2 = 1$, and again recognizing
the similarity with $\cos^2(t) + \sin^2(t) = 1$.
Setting $x + (y/2) = \cos(t)$ and $(\sqrt{3}/2)y =
\sin(t)$ we find that 
$\displaystyle (x(t),y(t)) = 
\left(cos(t) - \frac{\sin(t)}{\sqrt{3}},\frac{2\sin(t)}{\sqrt{3}}\right)$
is a reasonable choice.
How would you parametrize the {\bf witch of Agnesi}:
$y(x^2+1)=1$?

\end{document}
