\documentclass[letter,10pt, openany]{book}
\usepackage{amsmath,etex}
\usepackage{dropping}
%\usepackage{here}
\usepackage{graphicx}
%\usepackage{flafter}

\usepackage{longtable}





%%%%%%%%%

\usepackage{hangcaption}
\usepackage[amsmath,thmmarks,standard,thref]{ntheorem}
\usepackage[pdftitle={Vector Calculus and Multivariable Geometry}, pdfauthor={david santos}, bookmarksopen, dvips]{hyperref}
\usepackage{pdflscape}
\usepackage{thumbpdf}

%%%%%                  FONTS
% Fourier for math | Utopia (scaled) for rm | Helvetica for ss | Latin Modern for tt
\usepackage{bookman} % math & rm
\usepackage{marvosym,maplestd2e}
\usepackage{pifont}
\usepackage{mathrsfs}
\usepackage{stmaryrd}
\usepackage{amssymb,amsmath,amsfonts}
\usepackage[tiling]{pst-fill}      % PSTricks package for filling/tiling
\usepackage{multicol}
\usepackage{answers}
\usepackage{makeidx}
\usepackage{sqrcaps}
%\input wasyfont
\usepackage{fancyhdr} %%%%for page headers and footers
\fontencoding{T1}
    \fontfamily{fmv}
    \selectfont
%\DeclareFixedFont{\bigghv}{T1}{phv}{b}{n}{1.2cm}
%\DeclareFixedFont{\bighv}{T1}{phv}{b}{n}{0.6cm}
\DeclareFixedFont{\bigithv}{T1}{phv}{b}{sl}{0.6cm}
%\DeclareFixedFont{\smallit}{T1}{phv}{b}{it}{9pt}
\DeclareSymbolFont{largesymbols}{OMX}{yhex}{m}{n}
\DeclareMathAccent{\wideparen}{\mathord}{largesymbols}{"F3}

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\magenta\bigithv}}
\makeatother
\Newassociation{answer}{Answer}{multicaca}



 \mathversion{bold}
\everymath{\displaystyle}
\newcommand{\WriteBig}[5] {%
  \DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{#2}%
  \DeclareFixedFont{\smallrm}{T1}{ptm}{(m)}{n}{#3}%
  \psboxfill{\smallrm  #1} %
      \centerline{%
         \pscharpath[fillstyle=gradient,%
        gradangle=-45,%
        gradmidpoint=0.5,%
        addfillstyle=boxfill,%
        gradbegin=#4,%
        gradend=#5,%
        fillangle=45,%
        fillsep=0.7mm]{\rput[b](0,0){\bigsf#1}}}
}





%%%%%FLOAT PLACEMENT
\renewcommand{\textfraction}{0.05}
\renewcommand{\topfraction}{0.95}
\renewcommand{\bottomfraction}{0.95}
\renewcommand{\floatpagefraction}{0.35}
\setcounter{totalnumber}{5}

\usepackage[margin=2cm]{geometry}


\widowpenalty=1000 \clubpenalty=1000










%%%%%                   Postscript drawing packages
%\usepackage{pst-IIID}
\usepackage{pst-math}
\usepackage{pst-eucl}
\usepackage{pst-grad}              % PSTricks package for gradient filling
\usepackage{pstricks}
\usepackage{pst-eps,pst-func,pstricks-add}
\usepackage{pst-solides3d}
\usepackage{pst-3dplot}




\usepackage{graphicx}
%\DeclareGraphicsRule{*}{png}{*}{}
%\DeclareGraphicsRule{*}{eps}{*}{}
%\DeclareGraphicsExtensions{,.eps}


%%%%%                    THEOREM-LIKE ENVIRONMENTS
\newcommand{\proofsymbol}{\Pisymbol{pzd}{113}}
\theorembodyfont{\small}
\newtheorem{pro}{Problem}[section]

\theorempreskipamount .5cm \theorempostskipamount .5cm
\theoremstyle{change} \theoremheaderfont{\sffamily\bfseries}
\theorembodyfont{\normalfont}
\newtheorem{thm}{Theorem}
\newtheorem{prop}[thm]{Definition-Proposition}
 \newtheorem{cor}[thm]{Corollary}
\newtheorem{df}[thm]{Definition}
\newtheorem{axi}[thm]{Axiom}
\newtheorem{nota}[thm]{Notation}
\newtheorem{exa}[thm]{Example}
\newtheorem{lem}[thm]{Lemma}
\newenvironment{pf}[0]{\itshape\begin{quote}{\bf Proof: \ }}{\proofsymbol\end{quote}}

\newenvironment{solu}[0]{\begin{quote}{\bf Solution:  \ }$\blacktriangleright$ \itshape }{$\blacktriangleleft$\end{quote}}
\newenvironment{rem}[0]{\begin{quote}{\Huge\textcolor{red}{\Pisymbol{pzd}{43}}}\small\itshape }{\end{quote}}
\newcommand{\QUOTEME}[2]{\begin{quote}{\it\textbf{#1}} \\ \begin{flushright}{\blue -\textsl{#2}}\end{flushright}\end{quote}}
\newenvironment{conv}[0]{\begin{quote}{\Stopsign }}{\end{quote}}


%%%%%Chapter Heads
\makeatletter
\def\vertiline{\psline[linewidth=2pt,linecolor=magenta](0,2)(0,-1)\hspace{0.1cm}\relax}
\def\vertilines{%
  \let\LV\vertiline\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
  \psframebox[fillstyle=gradient,gradbegin=yellow,gradend=magenta]{%
 \hspace{2mm} \red #1 \hspace{2mm}}
}

\def\@makechapterhead#1{\hbox{%
    \huge
    \vertilines
    \hspace{-0.5cm}%
    \GrosCarreAvecUnChiffre{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
}\par\vskip 2cm}
\def\@makeschapterhead#1{\hbox{%
    \huge
    \vertilines
    %\hspace{0.5cm}%
    \hbox{#1}%
}\par\vskip 2cm}
 \makeatother







%%%%Title Page

\makeatletter
\def\La{%
  L\kern-.36em{%
  \setbox0\hbox{T}%
  \vbox to\ht0{%
    \hbox{$\m@th$%
      \csname S@\f@size\endcsname
      \fontsize\sf@size\z@
      \math@fontsfalse\selectfont A}%
      \vss%
    }%
  }%
} \makeatother


%%%%%%%




%%%%%%%%%%%%%%%%%%%%Two Column Table of Contents
\makeatletter
\newcommand{\twocoltoc}{%
  \begin{multicols}{2}
    \@starttoc{toc}%
  \end{multicols}}
\makeatother
%%%%%%%%%%%%
\makeindex


%%%%%%%%%

%%%%%%%%%%%%%%




\renewcommand{\arraystretch}{1.3}


\makeatletter
\newenvironment{tablehere}
  {\def\@captype{table}}
  {}

\newenvironment{figurehere}
  {\def\@captype{figure}}
  {}
\makeatother

\allowdisplaybreaks[1]




%%%%%                Non-standard commands and symbols
\newcommand{\BBZ}{\mathbb{Z}}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\BBN}{\mathbb{N}}
\newcommand{\BBC}{\mathbb{C}}
\newcommand{\BBQ}{\mathbb{Q}}
\def\floor#1{\llfloor #1 \rrfloor}
\def\ang#1{\angle\left(#1\right)}
\newcommand{\dint}{\displaystyle \int}

\def\binom#1#2{{#1\choose#2}}
\def\T#1#2{\mathscr{T}_{#1}{#2}}
\newcommand{\dis}{\displaystyle}
\def\fun#1#2#3#4#5{\everymath{\displaystyle}{{#1} : \vspace*{1cm}
\begin{array}{lll}{#4} & \rightarrow &
{#5}\\
{#2} &  \mapsto & {#3} \\
\end{array}}}
\def\im#1{{\mathbf{Im}}\left(#1\right)}
\def\arc#1{\wideparen{#1}}
\def\dom#1{{\mathbf{Dom}}\left(#1\right)}
\def\supp#1{{\mathbf{supp}}\left(#1\right)}
\def\target#1{{\mathbf{Target}}\left(#1\right)}
\def\area#1{{\mathscr{A}}\left(#1\right)}

\def\sgn#1{{\mathrm{signum}}\left(#1\right)}
\def\distance#1#2{{\mathbf d}{\langle {#1}, {#2}\rangle}}
\newcommand{\idefun}{{\bf Id\ }}
\def\tends#1#2{{#1 \rightarrow #2}}
\def\diff#1#2{\dfrac{\mathrm{d}}{\mathrm{d} #2}\ #1}


\def\bipoint#1#2{[\point{#1}, \point{#2}]}
\newcommand{\stackunder}[2]{\underset{\scriptstyle #1}{#2}}

\def\gl#1#2{{\bf GL}_{#1}(#2)}
\def\mat#1#2{{\bf M}_{#1}(#2)}
\def\norm#1{{\left|\left|#1\right|\right|}}
\def\absval#1{{\left|#1\right|}}

\def\d#1{{\rm d}#1}
\newcommand{\bp}{{\scriptscriptstyle \stackrel{\bullet}{{}}}}
\def\dotprod#1#2{\vector{#1} \bp \vector{#2}}
\newcommand{\cross}{\boldsymbol\times}
\def\line#1{\overleftrightarrow{\point{#1}}}
\def\dd#1{\overline{#1}}
\def\seg#1{\left[ #1\right]}
\def\crossprod#1#2{\vector{#1}\cross\vector{#2}}
\def\anglebetween#1#2{\widehat{(\vector{#1}, \vector{#2})}}
\def\sgn#1{{\rm sgn}(#1)}
\def\conv#1{{\rm conv}(#1)}
\def\tr#1{{\rm tr}\left(#1\right)}
\def\adj#1{{\rm adj}\left(#1\right)}
\def\proj#1#2{{\rm proj} _{\point{#2}} ^{\point{#1}} }
\def\vol#1{{\rm volume}(#1)}
\def\ball#1#2{B_{#2}({\bf #1})}
\def\point#1{{\bf #1}}
\def\vector#1{\overrightarrow{\bf #1}}
\def\deriv#1#2{{\mathscr D}_{\point{#1}}(#2)}
\def\partialderiv#1#2{\dfrac{\partial #2}{\partial #1}}
\def\hderiv#1#2#3{\dfrac{\partial ^2 #3}{\partial x_{#1} \partial
x_{#2}}}
\def\div#1#2{{\rm div} #1{\left(\point{#2}\right)} }
\def\curl#1#2{{\rm curl} #1{\left(\point{#2}\right)} }
\def\distance#1#2{{\rm d}{\left(\vector{#1},\vector{#2}\right)} }
\def\rn#1#2#3{\langle \reals^#1,#2, #3\rangle}
\def\Span#1{{\rm Span}\left(#1\right)}
\def\rank#1{{\rm rank}\left(#1\right)}
\newcommand{\TM}{\Pisymbol{psy}{228}\ }
\newcommand{\Surd}[1]{\left\delimiter"4270370 #1\right.}
\makeatletter
\def\clap#1{\hb@xt@\z@{\hss#1\hss}}
\makeatother
\def\partiald#1#2#3{\dfrac{\partial #2}{\partial x_{#1}}\left({\point{#3}}\right)}

\def\partialdd#1#2#3#4{{\mathscr  D}_{#1}{\mathscr  D}_{#2}#3\left({\point{#4}}\right)}

\def\smallo#1#2{\begin{array}{l}{\bf o} \\ #1  \end{array}\left(#2\right)}
\def\smallosans#1{{\bf o}\left(#1\right)}
\def\jacobi#1#2{{\mathscr  J}_{#1}#2}
\def\hessian#1#2{{\mathscr  H}_{#1}#2}
%%%%%%%%%%%%%%%%%INTERVALS
%%%%%%%% lo= left open, rc = right closed, etc.
\def\lcrc#1#2{\left[#1 \ ; #2 \right]}
\def\loro#1#2{ \left]#1 \ ; #2 \right[}
\def\lcro#1#2{\left[#1 \ ; #2 \right. \left[ \right.}
\def\lorc#1#2{\left. \right[#1 \ ; #2 \left.\right]}

\def\es#1{\ensuremath{\olessthan  #1  \ogreaterthan}}
\defineTColor{tRot}{red}
\defineTColor{tCyanl}{cyan!60}
\defineTColor{tCyan}{cyan}
\defineTColor{tGelb}{yellow!60}

%%%%Jim Hefferon's Linear Algebra macros.
%--------grstep
% For denoting a Gauss' reduction step.
% Use as: \grstep{\rho_1+\rho_3} or \grstep[2\rho_5 \\ 3\rho_6]{\rho_1+\rho_3}
\newcommand{\grstep}[2][\relax]{%
   \ensuremath{\mathrel{
       \mathop{\longrightarrow}\limits^{#2\mathstrut}_{
                                     \begin{subarray}{l} #1 \end{subarray}}}}}
\newcommand{\swap}{\leftrightarrow}


%-------------amatrix
% Augmented matrix.  Usage (note the argument does not count the aug col):
% \begin{amatrix}{2}
%   1  2  3 \\  4  5  6
% \end{amatrix}
\newenvironment{amatrix}[1]{%
  \left(\begin{array}{@{}*{#1}{c}|c@{}}
}{%
  \end{array}\right)
}



%-------------pmat
% For matrices with arguments.
% Usage: \begin{pmat}{c|c|c} 1 &2 &3 \end{pmat}
\newenvironment{pmat}[1]{
  \left(\begin{array}{@{}#1@{}}
}{\end{array}\right) }



%-------------misc matrices
\newenvironment{matri}{\left(\begin{array}}{\end{array}\right)}
\newenvironment{detmat}{\left|\begin{array}}{\end{array}\right|}
\newcommand{\deter}[1]{ \mathchoice{\left|#1\right|}{|#1|}{|#1|}{|#1|} }
\newcommand{\generalmatrix}[3]{ %arg1: low-case letter, arg2: rows, arg3: cols
               \left(
                  \begin{array}{cccc}
                    #1_{1,1}  &#1_{1,2}  &\ldots  &#1_{1,#2}  \\
                    #1_{2,1}  &#1_{2,2}  &\ldots  &#1_{2,#2}  \\
                              &\vdots                         \\
                    #1_{#3,1} &#1_{#3,2} &\ldots  &#1_{#3,#2}
                  \end{array}
               \right)  }


%------------colvec and rowvec
% Column vector and row vector.  Usage:
%  \colvec{1  \\ 2 \\ 3 \\ 4} and \rowvec{1  &2  &3}
\newcommand{\colvec}[1]{\begin{bmatrix} #1 \end{bmatrix}}
\newcommand{\rowvec}[1]{\begin{bmatrix} #1 \end{bmatrix}}
\newcommand{\colpoint}[1]{\begin{pmatrix} #1 \end{pmatrix}}


%-------------making aligned columns
% Usage: \begin{aligncolondecimal}{2} 1.2 \\ .33 \end{aligncolondecimal}
% (negative argument centers decimal pt in column).  Also Usage:
% \begin{aligncolondecimal}[0em]{2} 1.2 \\ .33 \end{aligncolondecimal}
% to make the left and right LaTeX-array padding disappear.
\RequirePackage{array}\RequirePackage{dcolumn}
\newenvironment{aligncolondecimal}[2][.1111em]{%
\setlength{\arraycolsep}{#1}
\newcolumntype{.}{D{.}{.}{#2}}\begin{array}{.}}{%
\end{array}}




\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}






\begin{document}
\Opensolutionfile{multicaca}[multicaca1]
\pagenumbering{roman}
\begin{titlepage}
\psset{unit=1in,linewidth=2pt} \psline(-0.75,2)(-0.75,-\paperheight)
\psline(-0.25,2)(-0.25,-\paperheight)
\rput[lb]{90}(-0.3,-0.85\paperheight){\Huge\textcolor{darkgray}{Free
to photocopy and distribute}}
\rput[lb]{90}(-0.4,-0.32\paperheight){\red\Large\textbf{\today\quad
Version}}

\vspace*{3cm} \centerline{\huge\textsqrc{Multivariable and Vector
Calculus}}

\vspace*{2cm} \centerline{\Large \textcolor{red}{David A. SANTOS}
\\ \href{mailto:dsantos@ccp.edu}{dsantos@ccp.edu}}
\vfill

\centerline{\em Mathesis iuvenes tentare rerum quaelibet ardua
semitasque non usitatas pandere docet.}

\vfill

\end{titlepage}



 \clearpage



\begin{quote}
    Copyright \copyright{}  2007  David Anthony SANTOS.
    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 1.2
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    A copy of the license is included in the section entitled ``GNU
    Free Documentation License''.
\end{quote}

\clearpage







\clearpage

{\small \twocoltoc{}}

\chapter*{Preface}
\markboth{}{} \addcontentsline{toc}{chapter}{Preface}
\markright{Preface}


These notes started during the Spring of 2003. They are meant to be
a gentle introduction to multivariable and vector calculus.

\bigskip

Throughout these notes I use Maple\TM version 10 commands in order
to illustrate some points of the theory.

\bigskip


I would appreciate any comments, suggestions, corrections, etc.,
which can be addressed to the email below. \\

\bigskip

\hfill \begin{tabular}{l}David A. SANTOS \\
\url{dsantos@ccp.edu} \end{tabular}





\renewcommand{\headrulewidth}{1pt}
\renewcommand\footrulewidth{1pt}
\lhead[\rm\thepage]{\it\rightmark} \rhead[]{\rm\thepage}
\lfoot{\textcolor{darkgray}{Free to photocopy and
distribute}}\cfoot{}


\cfoot{}\rfoot{\psovalbox{\thepage}} \pagestyle{fancy} \fancyhead{}
\renewcommand{\chaptermark}{\markboth{\chaptername\ \thechapter}}
\renewcommand{\sectionmark}{\markright}
\fancyhead[RO]{\itshape\leftmark} \fancyhead[RE]{\itshape\rightmark}








\chapter{Vectors and Parametric Curves}
\pagenumbering{arabic}\pagestyle{fancy} \setcounter{page}{1}
\section{Points and Vectors on the Plane}
\dropping{2}{W}e start with a na\"{\i}ve introduction to some linear
algebra necessary for the course. Those interested  in more formal
treatments can profit by reading \cite{BlRo} or \cite{Lan}.
\begin{df}[Scalar, Point, Bi-point, Vector]\index{scalar}
\index{point}\index{vector}\index{bi-point} A {\em scalar}
$\alpha\in\reals$ is simply a real number. A {\em point}
$\point{r}\in \reals^2$ is an ordered pair of real numbers,
$\point{r}=(x,y)$ with $x\in\reals$ and $y\in \reals$.  Here the
first coordinate $x$ stipulates the location on the horizontal axis
and the second coordinate $y$ stipulates the location on the
vertical axis. See figure \ref{fig:pointinr2}. We will always denote
the origin, that is, the point $(0,0)$ by $\point{O}=(0,0)$. Given
two points $\point{r}$ and $\point{r'}$ in $\reals^2$ the directed
line segment with departure point $\point{r}$ and arrival point
$\point{r'}$ is called the {\em bi-point} $\point{r}$,
$\point{r'}$\footnote{Some authors use the terminology ``{\em fixed
vector}'' instead of ``bi-point.''} and is denoted by
$\bipoint{r}{r'}$. See figure \ref{fig:vectorinr2} for an example.
The bi-point $\bipoint{r}{r'}$ can be thus interpreted as an arrow
starting at $\point{r}$ and finishing, with the arrow tip, at
$\point{r'}$. We say that $\point{r}$ is the {\em tail} of the
bi-point $\bipoint{r}{r'}$ and that $\point{r'}$ is its {\em head}.
 A {\em vector} $\vector{a}\in\reals^2$ is a
codification of movement of a bi-point: given the bi-point $\bipoint{r}{r'}$, we associate to it the vector $\vector{rr'}=\colvec{x'-x\\
y'-y}$ stipulating a movement of $x'-x$ units from $(x,y)$ in the
horizontal axis and of $y'-y$ units from the current position in the
vertical axis. The {\em zero vector} $\vector{0}=\colvec{0\\ 0}$
indicates no movement in either direction.
\end{df}
\vspace*{3cm}
\begin{figure}[htpb]
\begin{minipage}{5cm}$$\psset{unit=.8pc}\psline[linewidth=2pt,
linecolor=red]{->}(-9,0)(9, 0) \psline[linewidth=2pt,
linecolor=blue]{->}(0,-9)(0, 9) \uput[d](7,0){x \
\mathrm{axis}}\uput[r](0,9){y \ \mathrm{axis}}
\psdots[dotstyle=*,dotscale=1.5](0,0)(4.5,4.5)\uput[r](4.5,
4.5){\tiny{\point{r}  = (x,y)}}
\psline[linestyle=dashed](0,4.5)(4.5,
4.5)\psline[linestyle=dashed](4.5, 0)(4.5, 1.5)
$$\vspace*{3cm}\footnotesize\hangcaption{A point in $\reals^2$.}
 \label{fig:pointinr2}
 \end{minipage} \hfill
  \begin{minipage}{5cm}$$\psset{unit=.8pc}\psline[linewidth=2pt,
linecolor=red]{->}(-9,0)(9, 0) \psline[linewidth=2pt,
linecolor=blue]{->}(0,-9)(0, 9) \psline[linewidth=2pt,
linecolor=magenta]{->}(3,3)(7.5, 7.5)
\psdots[dotstyle=*,dotscale=.7](3,3)(7.5,7.5)
\uput[d](3,3){\point{r}} \uput[r](7.5,7.5){\point{r'}}
$$\vspace*{3cm}\footnotesize\hangcaption{A bi-point in $\reals^2$.}
 \label{fig:vectorinr2}
 \end{minipage}
\hfill
\begin{minipage}{5cm}
$$
\psset{unit=.8pc} \psline[linewidth=2pt, linecolor=red]{->}(-9,0)(9,
0) \psline[linewidth=2pt, linecolor=blue]{->}(0,-9)(0, 9)
\psline[linewidth=2pt, linecolor=magenta]{->}(1,2)(3,-4)
\psline[linewidth=2pt, linecolor=magenta]{->}(3,5)(5,-1)
\psline[linewidth=2pt, linecolor=magenta]{->}(0,0)(2,-6)
\psdots[dotstyle=*,dotscale=.7](1,2)(3,-4)(3,5)(5,-1)(0,0)(2,-6)
\uput[r](1,2){\point{a}_1} \uput[r](3,-4){\point{b}_1}
\uput[r](3,5){\point{a}_2} \uput[r](5,-1){\point{b}_2}
\uput[ul](0,0){\point{O}} \uput[r](2,-6){\point{b}}
$$\vspace*{3cm}\footnotesize\hangcaption{Example \ref{exa:one-vector-under-many-bipoints}.}
\label{fig:one-vector-under-many-bipoints}
\end{minipage}
 \end{figure}


Notice that infinitely many different choices of departure and
arrival points may give the same vector.
\begin{exa}\label{exa:one-vector-under-many-bipoints}
Consider the points $$ \point{a}_1 = (1, 2), \quad \point{b}_1 = (3,
-4),\quad  \point{a}_2 = (3, 5),\quad  \point{b}_2 = (5, -1), \quad
\point{O} = (0, 0) \quad \point{b}=(2, -6).
$$Though the bi-points $\bipoint{a_1}{b_1}$,
$\bipoint{a_2}{b_2}$ and $\bipoint{O}{b}$ are in different locations
on the
plane, they represent the same vector, as $$ \colvec{3 - 1\\
-4-2} = \colvec{5-3 \\ -1-5} = \colvec{2- 0 \\ -6-0} = \colvec{2\\
-6}.
$$The instructions given by the vector are all the same: start at the point, go two units right and six units down.
See figure \ref{fig:one-vector-under-many-bipoints}.\end{exa}


In more technical language, a vector is an {\em equivalence class}
of bi-points, that is, all bi-points that have the same length, have
the same direction, and point in the same sense are equivalent, and
the name of this equivalence is a {\em vector}.  As an simple
example of an equivalence class, consider the set of integers
$\BBZ$. According to their remainder upon division by $3$, each
integer belongs to one of the three sets
$$3\BBZ = \{\ldots, -6,-3,0,3,6, \ldots \}, \quad 3\BBZ +1 = \{\ldots, -5,-2,1,4,7, \ldots \}, \quad 3\BBZ +2 = \{\ldots, -4,-1,2,5,8, \ldots \}.  $$
The equivalence class $3\BBZ$ comprises the integers divisible by
$3$, and for example, $-18\in 3\BBZ$. Analogously, in example
\ref{exa:one-vector-under-many-bipoints}, the bi-point
$\bipoint{a_1}{b_1}$ belongs to the equivalence class $\colvec{2\\
-6}$, that is, $\bipoint{a_1}{b_1}\in \colvec{2\\
-6}$.
\begin{df}
The vector $\vector{Oa}$ that corresponds to the point
$\point{a}\in\reals^2$ is called the {\em position vector} of the
point $\point{a}$.
\end{df}
\begin{df}
Let $\point{a} \neq \point{b}$ be points on the plane and let
$\line{ab}$ be the line passing through $\point{a}$ and $\point{b}$.
The {\em direction} of the bi-point $\bipoint{a}{b}$ is the
direction of the line $L$, that is, the angle $\theta \in \left[0;
\pi\right[$ that the line $\line{ab}$ makes with the positive
$x$-axis (horizontal axis), when measured counterclockwise. The
direction of a vector $\vector{v}\neq \vector{0}$ is the direction
of any of its bi-point representatives. See figure
\ref{fig:bipointdirection}.
\end{df}
\begin{df}We say that
$\bipoint{a}{b}$ has the same direction as $\bipoint{z}{w}$ if
$\line{ab}=\line{zw}$.  We say that the bi-points $\bipoint{a}{b}$
and $\bipoint{z}{w}$ have the {\em same sense} if they have the same
direction and if when translating one so as to its tail is over the
other's tail, both their heads lie on the same half-plane made by
the line perpendicular to then at their tails. They have {\em
opposite sense } if they have the same direction and  if when
translating one so as to its tail is over the other's tail,  their
heads lie on different  half-planes made by the line perpendicular
to them at their tails. . See figures \ref{fig:bipointsense1} and
\ref{fig:bipointsense2} . The {\em sense} of a vector is the sense
of any of its bi-point representatives. Two bi-points are {\em
parallel} if the lines containing them are parallel. Two vectors are
parallel, if bi-point representatives of them are parallel.\end{df}
\vspace*{2cm}
\begin{figure}[htpb]
\hfill
\begin{minipage}{3cm}$$\psset{unit=.7pc} \psline(-5, -5)(5, 5)\psline(-6, -3)(6,
-3) \psdots[dotstyle=*, dotscale=1.5](-3, -3) \psarc{->}(-3,
-3){2}{0}{45}\uput[r](-2.5,-2.5){\theta} \psline[linewidth=2pt,
linecolor=red]{*->}(-1, -1)(2, 2) \uput[r](-1,-1){A}\uput[r](2, 2
){B}$$\vspace*{2cm}\scriptsize\hangcaption{Direction of a
bi-point}\label{fig:bipointdirection} \end{minipage} \hfill
\begin{minipage}{3cm}$$\psset{unit=.7pc}  \psline[linewidth=2pt,
linecolor=red]{*->}(-1, -1)(2, 2) \psline[linewidth=2pt,
linecolor=blue]{*->}(2, -3)(5, 0) \uput[r](-.7,-1){A}\uput[r](2, 2
){B}\uput[r](2,-3){C}\uput[r](5, 0 ){D}\psline(-1,
-1)(2,-3)$$\vspace*{2cm}\scriptsize\hangcaption{Bi-points with the
same sense. }\label{fig:bipointsense1}\end{minipage} \hfill
\begin{minipage}{3cm}$$\psset{unit=.7pc} \psline[linewidth=2pt,
linecolor=red]{*->}(-1, -1)(2, 2)\psline[linewidth=2pt,
linecolor=blue]{*->}(2, -3)(-1, -6) \uput[r](-.7,-1){A}\uput[r](2, 2
){B}\uput[r](2,-3){C}\uput[r](-1, -6 ){D}\psline(2, -3)(-1,
-1)$$\vspace*{2cm}\scriptsize\hangcaption{Bi-points with opposite
sense. }\label{fig:bipointsense2}\end{minipage}\hfill
\end{figure}


\begin{rem}
Bi-point $\bipoint{b}{a}$ has the opposite sense of $\bipoint{a}{b}$
and so we write
$$\bipoint{b}{a} = -\bipoint{a}{b}.$$ Similarly we write,
$\vector{ab}=-\vector{ba}$.
\end{rem}

\begin{df}\index{norm!of a bi-point}\index{norm!unit}
 The {\em Euclidean length or norm}
of bi-point $\bipoint{a}{b}$ is simply the distance between
$\point{a}$ and $\point{b}$ and it is denoted by
$$\norm{\bipoint{a}{b}} = \sqrt{(a_1 - b_1)^2 + (a_2 - b_2)^2.}$$ A bi-point is
said to have {\em unit length} if it has norm $1$. The {\em norm of
a vector} is the norm of any of its bi-point representatives.
\end{df}
\begin{rem}
A vector  is completely determined by three things: (i) its norm,
(ii) its direction, and (iii) its sense. It is clear that the norm
of a vector satisfies the following properties:
\begin{enumerate}
\item $\norm{\vector{a}}\geq 0$.
\item $\norm{\vector{a}}= 0\iff \vector{a}=\vector{0}$.
\end{enumerate}

\end{rem}

\begin{exa}
The vector $\vector{v}=\colvec{1 \\ \sqrt{2}}$ has norm
$\norm{\vector{v}} = \sqrt{1^2+(\sqrt{2})^2}=\sqrt{3}$.
\end{exa}
\begin{df}
If $\vector{u}$ and $\vector{v}$ are two vectors in $\reals^2$ their
{\em vector sum} $\vector{u} + \vector{v}$ is defined by the
coordinatewise addition \begin{equation}\vector{u} + \vector{v} =
\colvec{u_1 \\ u_2}+\colvec{ v_1 \\ v_2 }= \colvec{u_1 + v_1 \\ u_2
+ v_2 }. \label{eq:vector_addition}\end{equation}

\end{df}

\vspace*{2cm}
\begin{figure}[htpb]\begin{minipage}{6cm}
$$\psset{unit=.5pc} \rput(-2,0){\psline[linewidth=2pt,
linecolor=red]{->}(-3,3)(3, 5) \psline[linewidth=2pt,
linecolor=blue]{->}(3,5)(9, 2) \uput[l](-3,
3){A}\uput[u](3,5){B}\uput[r](9, 2 ){C}\uput[u](5.5,
3.5){\vector{v}} \uput[l](0,4.5){\vector{u}}
\uput[l](3.5,1){\vector{u} + \vector{v}}\psline[linewidth=2pt,
linecolor=magenta]{->}(-3,3)(9, 2)}
$$\vspace*{1cm}\footnotesize\hangcaption{Addition of Vectors.}\label{fig:addvectors}
\end{minipage}\hfill\begin{minipage}{6cm}$$\psset{unit=.5pc}
\psline[linewidth=2pt, linecolor=red]{->}(-3,3)(3, 5)\uput[r](3,
5.5){\vector{u}} \psline[linewidth=2pt,
linecolor=magenta]{->}(0,0)(3, 1)\uput[d](5,
.5){\frac{1}{2}\vector{u}} \psline[linewidth=2pt,
linecolor=blue]{->}(6, 10)(-6,6)\uput[u](6, 10){-2\vector{u}}
$$\vspace*{1cm}\footnotesize\hangcaption{Scalar multiplication of vectors.}\label{fig:scalarmultvectors}
\end{minipage}
\end{figure}


It is easy to see that vector addition is commutative and
associative, that the vector $\vector{0}$ acts as an additive
identity, and that the additive inverse of $\vector{a}$ is
$-\vector{a}$. To add two vectors geometrically, proceed as follows.
Draw a bi-point representative of $\vector{u}$. Find a bi-point
representative of $\vector{v}$ having its tail at the tip of
$\vector{u}$. The sum $\vector{u}+\vector{v}$ is the vector whose
tail is that of the bi-point for $\vector{u}$ and whose tip is that
of the bi-point for $\vector{v}$. In particular, if
$\vector{u}=\vector{AB}$ and $\vector{v}=\vector{BC}$, then we have
{\em Chasles' Rule}:
\begin{equation} \vector{AB}+\vector{BC}=\vector{AC}. \label{eq:chasles-rule}\end{equation}
See figures \ref{fig:addvectors}, \ref{fig:comm-vector}, \ref{fig:ass-vector}, and \ref{fig:diffe-vector}.
\begin{df}
If $\alpha\in\reals$ and $\vector{a}\in\reals^2$ we define {\em
scalar multiplication} of a vector and a scalar by   the
coordinatewise multiplication \begin{equation}\alpha\vector{a} =
\alpha \colvec{a_1
\\  a_2 }=
\colvec{\alpha a_1
\\ \alpha  a_2 }. \label{eq:scalar_multiplication}\end{equation}
\end{df}






It is easy to see that vector addition and scalar multiplication
satisfies the following properties.
\begin{dingautolist}{202}
\item $ \alpha(\vector{a} +
\vector{b}) = \alpha\vector{a} + \alpha\vector{b}
\label{axiom:distributive_law_1}$ \item $ (\alpha + \beta)\vector{a}
= \alpha \vector{a} + \beta\vector{a}
\label{axiom:distributive_law_2} $\item$ 1\vector{a} = \vector{a}
\label{axiom:1v_is_v}$ \item $(\alpha \beta) \vector{a} = \alpha
(\beta \vector{a}) \label{axiom:associative_scalar_product}$
\end{dingautolist}
\vspace*{4cm}

\begin{figure}[htpb]
\begin{minipage}{4cm}
\psset{unit=2pc}
\pstGeonode[PointName=none,PointSymbol=none](0,0){A}(3,1){B}(1,4){C}(4,5){D}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{A}{B} \bput{:U}{$\vector{v}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{A}{C} \aput{:U}{$\vector{w}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{B}{D} \bput{:U}{$\vector{w}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{C}{D} \aput{:U}{$\vector{v}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=red,arrowscale=2]{A}{D} \aput{:U}{$\vector{w}+\vector{v}$}\bput{:U}{$\vector{v}+\vector{w}$}
\vspace*{1cm}
\footnotesize\hangcaption{Commutativity}\label{fig:comm-vector}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\psset{unit=3pc}
\pstGeonode[PointName=none,PointSymbol=none](0,0){A}(1,2){B}(3,3){C}(4,1){D}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{A}{B}
\aput{:U}{$\vector{u}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{B}{C}
\aput{:U}{$\vector{v}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{C}{D}
\aput{:U}{$\vector{w}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{A}{D}
\aput{:U}{$(\vector{u}+\vector{v})+\vector{w}$}
\bput{:U}{$\vector{u}+(\vector{v}+\vector{w})$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=magenta,arrowscale=2]{B}{D}
\aput{:U}{$\vector{v}+\vector{w}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=red,arrowscale=2]{A}{C}
\aput{:U}{$\vector{u}+\vector{v}$}

\vspace*{1cm}
\footnotesize\hangcaption{Associativity}\label{fig:ass-vector}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\psset{unit=2pc}
\pstGeonode[PointName=none,PointSymbol=none](0,0){A}(3,1){B}(1,4){C}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{A}{B} \bput{:U}{$\vector{w}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=black,arrowscale=2]{A}{C} \aput{:U}{$\vector{v}$}
\pstLineAB[linewidth=2pt,arrows={->},linecolor=red,arrowscale=2]{B}{C} \bput{:U}{$\vector{v}-\vector{w}$}
\vspace*{1cm}
\footnotesize\hangcaption{Difference}\label{fig:diffe-vector}
\end{minipage}
\end{figure}















\begin{df}
Let $\vector{u}\neq \vector{0}$. Put $\reals\vector{u}
=\{\lambda\vector{u}:\lambda\in\reals\}$ and let
$\point{a}\in\reals^2$,
 The {\em affine line with direction vector
$\vector{u}=\colvec{u_1\\u_2}$ and passing through $\point{a}$} is
the set of points on the plane
$$\point{a}+\reals\vector{u}=\left\{\colpoint{x\\ y}\in\reals^2: x=a_1+tu_1, \quad y = a_2+tu_2, \quad t\in \reals\right\}.   $$
\end{df}
See figure \ref{fig:line-on-plane}.

\bigskip

If $u_1 = 0$, the affine line defined above is vertical, as  $x$ is
constant. If  $u_1\neq 0$,  then
$$ \dfrac{x-a_1}{u_1}=t \implies y = a_2 + \dfrac{(x-a_1)}{u_1}u_2=\dfrac{u_2}{u_1}x+a_2-a_1\dfrac{u_2}{u_1} , $$
that is, the affine line is the Cartesian line with slope
$\dfrac{u_2}{u_1}$. Conversely, if  $y=mx+k$ is the equation of a
Cartesian line, then
$$ \colpoint{x\\ y } = \colvec{1 \\ m}t + \colpoint{0\\ k}, $$ that is, every Cartesian line is also an affine line and one may take the vector
 $\colvec{1 \\ m}$ as its direction vector.
It also  follows that two vectors  $\vector{u}$ and $\vector{v}$ are
parallel if and only if the affine lines $\reals\vector{u}$ and
$\reals\vector{v}$ are parallel. Hence, $\vector{u}\parallel
\vector{v}$  if there exists a scalar
 $\lambda\in\reals$ such that $\vector{u}=\lambda\vector{v}$.

\begin{rem}
Because $\vector{0}=0\vector{v}$ for any vector $\vector{v}$, the
$\vector{0}$ is parallel to every vector.
\end{rem}
\vspace*{3cm}
\begin{figure}[htpb]
\centering \psset{unit=.75pc} \psline[linewidth=2pt,
linecolor=red]{->}(-9,0)(9,0) \psline[linewidth=2pt,
linecolor=blue]{->}(0,-9)(0, 9)
\psline[linewidth=2pt,linecolor=magenta]{*->}(1,1)(5,5)\uput[ur]{45}(5,5){$\vector{u}$}
\psline[linewidth=2pt,linecolor=magenta]{<->}(-6,-8)(6,4)
\psdots(1,-1)(4,2) \uput[r](1,-1){$\point{a}$}
\uput[r](4,2){$\point{r}=\point{a}+t\vector{u}$}
\vspace*{3cm}\footnotesize\hangcaption{Parametric equation of a line
on the plane.}\label{fig:line-on-plane}
\end{figure}

\begin{exa}
Find a vector of length $3$, parallel to  $\vector{v}=\colvec{1 \\
\sqrt{2}}$ but in the opposite sense.
\end{exa}
\begin{solu}
Since $\norm{\vector{v}} =\sqrt{3}$, the vector $
\dfrac{\vector{v}}{\norm{\vector{v}}}$ has unit norm and has the
same direction and sense as $\vector{v}$, and so the vector sought
is
$$ -3\dfrac{\vector{v}}{\norm{\vector{v}}} = -\dfrac{3}{\sqrt{3}}\colvec{1 \\ \sqrt{2}} = \colvec{-\sqrt{3}\\ -\sqrt{6}}.$$
\end{solu}
\begin{exa}
Find the parametric equation of the line passing through
$\colpoint{1\\ -1}$ and in the direction of the vector $\colvec{2\\
-3}$.
\end{exa}
\begin{solu}
The desired equation is plainly
$$\colpoint{x\\ y} = \colpoint{1\\ -1}+t\colvec{2\\ 3} \implies x = 1+2t, \quad y =-1+3t, \quad t\in\reals.  $$
\end{solu}

Some plane geometry results can be easily proved by means of
vectors. Here are some examples.

\begin{exa}
Given a pentagon $ABCDE$, determine the vector sum $\vector{AB} +
\vector{BC}+\vector{CD}+\vector{DE}+\vector{EA}$.
\end{exa}
\begin{solu}
Utilising Chasles' Rule several times:
$$\vector{0} = \vector{AA} = \vector{AB} +
\vector{BC}+\vector{CD}+\vector{DE}+\vector{EA}.$$.
\end{solu}
\begin{exa}\label{exa:recta-media-triangulo} Consider a  $\triangle
\point{ABC}$. Demonstrate that the line segment joining the
midpoints of two sides is parallel to the third side and it is in
fact, half its length.
\end{exa}
\begin{solu} Let the midpoints of   $\bipoint{A}{B}$  and
$\bipoint{C}{A}$, be $\point{M_C}$ and $\point{M_B}$, respectively.
We will demonstrate that  $\vector{BC} = 2\vector{M_CM_B}$. We have,
$2\vector{AM_C} = \vector{AB}$ and $2\vector{AM_B} = \vector{AC}$.
Therefore,
$$\begin{array}{lll}\vector{BC} & = &
\vector{BA} + \vector{AC}  \\
& = & -\vector{AB} + \vector{AC}  \\
& = &  -2\vector{AM_C} + 2\vector{AM_B} \\
& = & 2\vector{M_CA} + 2\vector{AM_B} \\
& = & 2(\vector{M_CA} + \vector{AM_B}) \\
& = & 2\vector{M_CM_B}, \end{array}$$ as we were to shew.
\end{solu}

\begin{exa}\label{exa:mediana-es-promedio-lados}
In $\triangle {ABC}$, let $\point{M_C}$ be the midpoint of
$\bipoint{A}{B}$. Demonstrate that
$$\vector{CM_C} = \frac{1}{2}\left(\vector{CA} + \vector{CB}\right).$$
\end{exa}
\begin{solu} As $\vector{AM_C} = \vector{M_CB}$, we have,
$$\begin{array}{lll}
\vector{CA} + \vector{CB}  & = & \vector{CM_C} + \vector{M_CA} + \vector{CM_C} + \vector{M_CB} \\
& = & 2\vector{CM_C} - \vector{AM_C} + \vector{M_CB}\\
& = & 2\vector{CM_C},
\end{array}
$$from where the result follows.
\end{solu}
\begin{exa}\label{exa:razon-medianas}If the medians $\bipoint{A}{M_A}$ and  $\bipoint{B}{M_B}$ of the non-degenerate
 $\triangle \point{ABC}$ intersect at the point  $\point{G}$, demonstrate that
 $$\vector{AG} =2\vector{GM_A}; \qquad \vector{BG} =2\vector{GM_B}.
$$ See figure
 \ref{fig:medianas-concurren1}.
\end{exa}
\begin{solu}
Since the triangle is non-degenerate, the lines  $\line{AM_A}$ and
$\line{BM_B}$ are not parallel, and hence meet at a point
$\point{G}$. Therefore,  $\vector{AG}$ and  $\vector{GM_A}$ are
parallel and hence there is a scalar  $a$ such that
$\vector{AG}=a\vector{GM_A}$. In the same fashion, there is a scalar
 $b$ such that $\vector{BG}=b\vector{GM_B}$. From example
\ref{exa:recta-media-triangulo},
$$\begin{array}{lll}
2\vector{M_AM_B} &  = &  \vector{BA}\\
& = & \vector{BG} + \vector{GA}\\
& = & b\vector{GM_B} - a\vector{GM_A}\\
& = & b\vector{GM_A}+ b\vector{M_AM_B}- a\vector{GM_A},
\end{array}$$
and thus
$$ (2-b)\vector{M_AM_B} = (b-a)\vector{GM_A}. $$Since
$\triangle\point{ ABC}$ is non-degenerate,  $\vector{M_AM_B}$ and
$\vector{GM_A}$ are not parallel, whence
$$ 2-b=0, \quad b-a=0, \quad \implies a=b=2. $$
\end{solu}

\vspace*{3cm}
\begin{figure}[htpb]
\centering\psset{unit=1pc}
\pstTriangle[linecolor=red](-2,-2){A}(8,-2){B}(0,6){C}
\pstMiddleAB[PosAngle=-90]{A}{B}{M_C}\pstMiddleAB{A}{C}{M_B}
\pstMiddleAB[PosAngle=0]{C}{B}{M_A}
\pstLineAB[linewidth=2pt,linestyle=dotted,linecolor=magenta]{M_B}{B}\pstLineAB[linewidth=2pt,linestyle=dotted,linecolor=magenta]{C}{M_C}
\pstLineAB[linewidth=2pt,linestyle=dotted,linecolor=magenta]{A}{M_A}
\pstInterLL[PosAngle=-90]{A}{M_A}{B}{M_B}{G}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:medianas-concurren1}.}\label{fig:medianas-concurren1}
\end{figure}

\begin{exa}\label{exa:medianas-concurren1}The medians of a non-degenerate triangle  $\triangle ABC$ are concurrent. The point of concurrency  $\point{G}$ is called the
 {\em barycentre} or {\em centroid} of the triangle. See figure
 \ref{fig:medianas-concurren1}.
\end{exa}

\begin{solu}Let  $\point{G}$ be as in example \ref{exa:razon-medianas}.
We must shew that the line  $\line{CM_C}$ also passes through
$\point{G}$. Let the line  $\line{CM_C}$ and  $\line{BM_B}$ meet in
$\point{G'}$. By the aforementioned example,
$$\vector{AG} =2\vector{GM_A}; \qquad \vector{BG}
=2\vector{GM_B}; \quad \vector{BG'} =2\vector{G'M_B}; \qquad
\vector{CG'} =2\vector{G'M_C}.  $$
 It follows that
$$\begin{array}{lll} \vector{GG'} & = &
\vector{GB} + \vector{BG'}\\
& = & -2\vector{GM_B} +2\vector{G'M_B}\\
& = & 2(\vector{M_BG}+\vector{G'M_B})\\
& = & 2\vector{G'G}.
\end{array}$$
Therefore
$$ \vector{GG'}  = -2 \vector{GG'}  \implies 3 \vector{GG'} =\vector{0}\implies  \vector{GG'} =\vector{0} \implies G=G', $$
demonstrating the result.
\end{solu}


\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Is there is any truth to the statement ``a vector is that which has magnitude and direction''?
\begin{answer}No. The zero vector $\vector{0}$, has magnitude but no direction.
\end{answer}
\end{pro}

\begin{pro}
${ABCD}$ is a parallelogram. ${E}$ is the midpoint of
$\bipoint{B}{C}$ and ${F}$ is the midpoint of $\bipoint{D}{C}$.
Prove that $$\vector{AC} + \vector{BD} = 2\vector{BC}.$$
\begin{answer} We have $2\vector{BC} = \vector{BE} + \vector{EC}$. By
Chasles' Rule $\vector{AC} = \vector{AE} + \vector{EC}$, and
$\vector{BD} = \vector{BE} + \vector{ED}$. We deduce that
$$  \vector{AC} + \vector{BD} =  \vector{AE} + \vector{EC} + \vector{BE} + \vector{ED} =
\vector{AD} + \vector{BC}.$$ But since ${ABCD}$ is a parallelogram,
$\vector{AD} = \vector{BC}$. Hence
$$  \vector{AC} + \vector{BD} = \vector{AD} + \vector{BC} = 2\vector{BC}.$$
\end{answer}
\end{pro}
\begin{pro}[Varignon's Theorem] Use vector algebra in order to prove
that in any quadrilateral $\point{ABCD}$, whose sides do not
intersect, the quadrilateral formed by the midpoints of the sides is
a parallelogram.
\end{pro}
\begin{pro}
Let $\point{A}, \point{B}$ be two points on the plane. Construct two
points $\point{I}$ and $\point{J}$ such that
$$\vector{IA} = -3\vector{IB}, \ \ \ \vector{JA} = -\frac{1}{3}\vector{JB},
$$and then demonstrate that for any arbitrary point $\point{M}$ on
the plane
$$\vector{MA} + 3\vector{MB} = 4\vector{MI}   $$ and $$3\vector{MA} + \vector{MB} = 4\vector{MJ}.
$$
\begin{answer} We have $\vector{IA} = -3\vector{IB} \iff \vector{IA} =
-3(\vector{IA} + \vector{AB}) = -3\vector{IA} - 3\vector{AB}$. Thus
we deduce $$\begin{array}{lll} \vector{IA} + 3\vector{IA}  =
 -3\vector{AB}  & \iff & 4\vector{IA} = -3\vector{AB} \\
 & \iff & 4\vector{AI} = 3\vector{AB} \\
 & \iff & \vector{AI} = \frac{3}{4}\vector{AB}.
\end{array}
$$Similarly
$$\begin{array}{lll} \vector{JA}  =
 -\frac{1}{3}\vector{JB}  & \iff & 3\vector{JA} = -\vector{JB} \\
 & \iff & 3\vector{JA} = -\vector{JA} - \vector{AB} \\
 & \iff & 4\vector{JA} = -\vector{AB} \\
  & \iff & \vector{AJ} = \frac{1}{4}\vector{AB} \\
 .
\end{array}
$$
Thus we take $\point{I}$ such that $\vector{AI} =
\frac{3}{4}\vector{AB}$ and $\point{J}$ such that $\vector{AJ} =
\frac{1}{4}\vector{AB}$.


\bigskip

Now
$$\begin{array}{lll} \vector{MA} + 3\vector{MB}  & = & \vector{MI} + \vector{IA} + 3\vector{IB} \\
& = &  4\vector{MI} + \vector{IA} + 3\vector{IB} \\
& = & 4\vector{MI},
 \end{array}     $$
and
$$\begin{array}{lll} 3\vector{MA} + \vector{MB}  & = & 3\vector{MJ} + 3\vector{JA} + \vector{MJ} + \vector{JB} \\
& = &  4\vector{MJ} + 3\vector{JA} + \vector{JB} \\
& = & 4\vector{MJ}.
 \end{array}     $$
\end{answer}
\end{pro}
\begin{pro}
Find the Cartesian equation corresponding to the line with parametric equation
$$x=-1+t, \qquad y=2-t. $$
\begin{answer}
$$ x+1=t = 2-y \implies y=-x+1.  $$
\end{answer}
\end{pro}
\begin{pro}
Let $\point{x}, \point{y}, \point{z}$ be points on the plane with $\point{x}\neq \point{y}$ and consider  $\triangle \point{xyz}$. Let $\point{Q}$ be a point on side
$\bipoint{x}{z}$ such that $\norm{\bipoint{x}{Q}}:\norm{\bipoint{Q}{z}} = 3:4$ and let $\point{P}$ be a point on
$\bipoint{y}{z}$ such that $\norm{\bipoint{y}{P}}:\norm{\bipoint{P}{Q}} = 7:2$. Let $\point{T}$ be an arbitrary point on the plane.
\begin{enumerate}
\item Find rational numbers $\alpha$ and $\beta$ such that $\vector{TQ} = \alpha \vector{Tx} + \beta\vector{Tz}$.
\item Find rational numbers $l, m, n$ such that $\vector{TP} = l\vector{Tx} + m\vector{Ty} + n\vector{Tz}$.
\end{enumerate}
\begin{answer}
$\alpha = \dfrac{4}{7}, \beta=\dfrac{3}{7}$, $l =\dfrac{4}{9}, m=\dfrac{2}{9}, n=\dfrac{1}{3}$.
\end{answer}
\end{pro}

\begin{pro}
Let $\point{x}, \point{y}, \point{z}$ be points on the plane with $\point{x}\neq \point{y}$. Demonstrate that
\begin{enumerate}
\item The point $\point{a}$ belongs to the line $\line{xy}$
if and only if there exists scalars $\alpha , \beta$ with $\alpha + \beta = 1$ such that
$$\vector{za} = \alpha \vector{zx} + \beta \vector{zy}.  $$
\item The point $\point{a}$ belongs to the line segment  $[\point{x};\point{y}]$
if and only if there exists scalars $\alpha \geq 0, \beta \geq 0$ with $\alpha + \beta = 1$ such that
$$\vector{za} = \alpha \vector{zx} + \beta \vector{zy}.  $$
\item The point $\point{a}$ belongs to the interior of the triangle  $\triangle \point{xyz}$
if and only if there exists scalars \mbox{$\alpha >0, \beta >0$} with $\alpha + \beta < 1$ such that
$$\vector{za} = \alpha \vector{zx} + \beta \vector{zy}.  $$


\end{enumerate}


\end{pro}
\begin{pro} \label{pro:sum_of_vectors1}
A circle is divided into three,  four equal, or six equal parts
(figures \ref{fig:sum_of_vectors4} through
\ref{fig:sum_of_vectors6}). Find the sum of the vectors. Assume that
the divisions start or stop at the centre of the circle, as
suggested in the figures.
  \begin{answer} [A]. $\vector{0}$, [B]. $\vector{0}$, [C]. $\vector{0}$,
 [D]. $\vector{0}$, [E]. $2\vector{c} (=2\vector{d})$
\end{answer}
\end{pro}


\end{multicols}

\vspace*{1cm}
\begin{figure}[htpb]
\begin{minipage}{4cm}
$$\psset{unit=2pc}
\pscircle[linewidth=1pt](0,0){1}
\psline[linewidth=1.5pt]{o->}(0,0)(0,1)
\psline[linewidth=1.5pt]{o->}(0,0)(0.866, -0.5)
\psline[linewidth=1.5pt]{o->}(0,0)(-0.866,-0.5)
\uput[u](0,1){\vector{a}} \uput[dl](-0.866, -0.5){\vector{b}}
\uput[dr](0.866, -0.5){\vector{c}}
  $$\vspace*{1cm}\footnotesize\hangcaption{[A]. Problem \ref{pro:sum_of_vectors1}.} \label{fig:sum_of_vectors1}
\end{minipage}
\hfill
\begin{minipage}{4cm}
$$\psset{unit=2pc}
\pscircle[linewidth=1pt](0,0){1}
\psline[linewidth=1.5pt]{<-o}(0,0)(0,1)
\psline[linewidth=1.5pt]{<-o}(0,0)(0.866, -0.5)
\psline[linewidth=1.5pt]{<-o}(0,0)(-0.866, -0.5)
\uput[u](0,1){\vector{a}} \uput[dr](0.866, -0.5){\vector{b}}
\uput[dl](-0.866, -0.5){\vector{c}}
  $$\vspace*{1cm}\footnotesize\hangcaption{[B]. Problem \ref{pro:sum_of_vectors1}.} \label{fig:sum_of_vectors2}
\end{minipage}\hfill
\begin{minipage}{4cm}
$$\psset{unit=2pc}
\pscircle[linewidth=1pt](0,0){1}
\psline[linewidth=1.5pt]{o->}(0,0)(1,0)
\psline[linewidth=1.5pt]{o->}(0,0)(-1,0)
\psline[linewidth=1.5pt]{o->}(0,0)(0,1)
\psline[linewidth=1.5pt]{o->}(0,0)(0,-1) \uput[u](0,1){\vector{a}}
\uput[d](0, -1){\vector{b}} \uput[l](-1, 0){\vector{c}} \uput[r](1,
0){\vector{d}}
  $$\vspace*{1cm}\footnotesize\hangcaption{[C]. Problem \ref{pro:sum_of_vectors1}.} \label{fig:sum_of_vectors3}
\end{minipage}
\end{figure}

\vspace*{1cm}

\begin{figure}[htpb]\begin{minipage}{4cm}
$$\psset{unit=2pc}
\pscircle[linewidth=1pt](0,0){1}
\psline[linewidth=1.5pt]{<-o}(0,0)(1,0)
\psline[linewidth=1.5pt]{<-o}(0,0)(-1,0)
\psline[linewidth=1.5pt]{<-o}(0,0)(0,1)
\psline[linewidth=1.5pt]{<-o}(0,0)(0,-1) \uput[u](0,1){\vector{a}}
\uput[d](0, -1){\vector{b}} \uput[l](-1, 0){\vector{c}} \uput[r](1,
0){\vector{d}}
  $$\vspace*{1cm}\footnotesize\hangcaption{[D]. Problem \ref{pro:sum_of_vectors1}.} \label{fig:sum_of_vectors4}
\end{minipage}\hfill
\begin{minipage}{4cm}
$$\psset{unit=2pc}
\pscircle[linewidth=1pt](0,0){1}
\psline[linewidth=1.5pt]{o->}(0,0)(1,0)
\psline[linewidth=1.5pt]{<-o}(0,0)(-1,0)
\psline[linewidth=1.5pt]{o->}(0,0)(0,1)
\psline[linewidth=1.5pt]{o->}(0,0)(0,-1) \uput[u](0,1){\vector{a}}
\uput[d](0, -1){\vector{b}} \uput[l](-1, 0){\vector{c}} \uput[r](1,
0){\vector{d}}
  $$\vspace*{1cm}\footnotesize\hangcaption{[E]. Problem \ref{pro:sum_of_vectors1}.} \label{fig:sum_of_vectors5}
\end{minipage}\hfill
\begin{minipage}{4cm}
$$\psset{unit=2pc}
\pscircle[linewidth=1pt](0,0){1}
\psline[linewidth=1.5pt]{o->}(0,0)(0.5,-0.866)
\psline[linewidth=1.5pt]{<-o}(0,0)(-0.5,-0.866)
\psline[linewidth=1.5pt]{o->}(0,0)(0.5,0.866)
\psline[linewidth=1.5pt]{<-o}(0,0)(-0.5,0.866)
\psline[linewidth=1.5pt]{<-o}(0,0)(1,0)
\psline[linewidth=1.5pt]{o->}(0,0)(-1,0) \uput[l](-1,0){\vector{a}}
\uput[r](1, 0){ \vector{d}} \uput[ul](-0.5, 0.866){\vector{b}}
\uput[ur](0.5, 0.866){\vector{c}} \uput[dl](-0.5,
-0.866){\vector{f}} \uput[dr](0.5, -0.866){\vector{e}}
  $$ \vspace*{1cm}
\footnotesize\hangcaption{[F]. Problem \ref{pro:sum_of_vectors1}.}
\label{fig:sum_of_vectors6}
\end{minipage}
 \end{figure}



\vspace*{1cm}


\section{Scalar Product on the Plane}
We will now define an operation between two plane vectors that will
provide a further tool to examine the geometry on the plane.

\begin{df}
Let $\vector{x}\in\reals^2$ and $\vector{y}\in\reals^2$. Their {\em
scalar product} ({\em dot product}, {\em inner product}) is defined
and denoted by
$$\dotprod{x}{y} = x_1y_1+x_2y_2.  $$
\end{df}
\begin{exa}
If $\vector{a}=\colvec{1\\ 2}$ and $\vector{b}=\colvec{3\\ 4}$, then
$\dotprod{a}{b}=1\cdot 3 + 2\cdot 4 =11$.
\end{exa}
The following properties of the scalar product are easy to deduce
from the definition.
\begin{enumerate}
\item[SP1]  {\bf Bilinearity} \begin{equation}(\vector{x} +
\vector{y})\bp \vector{z} = \dotprod{x}{z} + \dotprod{y}{z}, \ \ \
\vector{x}\bp (\vector{y} + \vector{z}) = \dotprod{x}{y} +
\dotprod{x}{z}\label{dp:bilinearity}\end{equation}
\item[SP2] {\bf Scalar Homogeneity}
\begin{equation}(\alpha\vector{ x})\bp \vector{ y} = \vector{
x}\bp (\alpha\vector{ y}) = \alpha(\dotprod{\bf x}{\bf y}), \ \alpha
\in \reals. \label{dp:scalar_homogeneity}\end{equation}
\item[SP3] {\bf Commutativity}
\begin{equation}\dotprod{x}{y} = \dotprod{\bf y}{\bf x}\label{dp:commutativity}\end{equation} \item[SP4]
\begin{equation}\dotprod{x}{x} \ \ \geq \ \ 0
\label{dp:dot_itself_is_positive}\end{equation} \item[SP5]
\begin{equation}\dotprod{x}{x} = 0 \iff  \vector{ x} = \vector{{\bf
0}}\label{dp:when_zero_is_zero}\end{equation} \item[SP6]
\begin{equation}\norm{\vector{x}} =
 \sqrt{\dotprod{x}{x}} \label{dp:dot_and_norm}\end{equation}
\end{enumerate}


\vspace*{2cm}
\begin{figure}[htpb]
$$\psset{unit=1pc} \psline[linewidth=2pt,
linecolor=red]{->}(-3,3)(3, 5) \psline[linewidth=2pt,
linecolor=blue]{->}(3,5)(9, 2) \uput[l](-2.5, 4
){\vector{a}}\uput[u](6.5,4){\vector{b} -\vector{a}}\uput[r](4, 1
){\vector{b}}\psline[linewidth=2pt, linecolor=magenta]{->}(-3,3)(9,
2)\
$$\footnotesize\hangcaption{Theorem \ref{thm:cosanglebetween}.}\label{fig:dotproduct}
\end{figure}

\begin{df}\index{vectors!angle between}
Given vectors $\vector{a}$ and $\vector{b}$, we define the (convex)
angle between them, denoted by $\anglebetween{a}{b} \in [0;\pi]$, as
the angle between the affine lines  $\reals\vector{a}$ and
$\reals\vector{b}$.
\end{df}

 \begin{thm} Let $\vector{a}$ and $\vector{b}$ be vectors in $\reals^2$. Then $$\vector{{\bf a}}\bp\vector{ b} = ||\vector{
a}||||\vector{ b}||\cos\anglebetween{a}{b}.$$
\label{thm:cosanglebetween}\end{thm}
\begin{pf}From figure \ref{fig:dotproduct},
using Al-Kashi's Law of Cosines on the length of the vectors, and
(\ref{dp:bilinearity}) through (\ref{dp:dot_and_norm}) we have
$$\begin{array}{l}||\vector{ b} - \vector{ a}||^2 = ||\vector{ a}||^2 + ||\vector{ b}||^2
- 2||\vector{ a}||||\vector{ b}||\cos\anglebetween{a}{b}\\
\iff  (\vector{ b} - \vector{ a})\bp (\vector{ b} -\vector{ a}) =
||\vector{ a}||^2 + ||\vector{ b}||^2
- 2||\vector{ a}||||\vector{ b}||\cos\anglebetween{a}{b}\\
\iff  \vector{ b}\bp\vector{ b} - 2\vector{ a}\bp\vector{ b} +
\vector{ a}\bp\vector{ a} = ||\vector{ a}||^2
+ ||\vector{ b}||^2 - 2||\vector{ a}||||\vector{ b}||\cos\anglebetween{a}{b}\\
\iff  ||\vector{{\bf b}}||^2 - 2\vector{{\bf a}}\bp\vector{{\bf b}}
+ ||\vector{{\bf a}}||^2 = ||\vector{ a}||^2 + ||\vector{ b}||^2 -
2||\vector{ a}||||\vector{ b}||\cos\anglebetween{a}{b}\\
\iff  \vector{ a}\bp\vector{ b} = ||\vector{ a}||||\vector{
b}||\cos\anglebetween{a}{b} ,
\end{array}$$as we wanted to shew.
\end{pf}





Putting $\anglebetween{a}{b} = \frac{\pi}{2}$ in Theorem
\ref{thm:cosanglebetween} we obtain the following corollary.


\begin{cor}\label{cor:condi-perp-vect}
Two vectors in $\reals^2$ are perpendicular  if and only if their
dot product is $0$.
\end{cor}

\begin{rem}
It follows that the vector $\vector{0}$ is simultaneously parallel
and perpendicular to any vector!
\end{rem}

\begin{df}
Two vectors are said to be {\em orthogonal} if they are
perpendicular. If $\vector{a}$ is orthogonal to $\vector{b}$, we
write $\vector{a} \perp \vector{b}.$ \index{orthogonal}
\end{df}
\begin{df}
If $\vector{a} \perp \vector{b}$  and $\norm{\vector{a}}=
\norm{\vector{b}} = 1$ we say that $\vector{a}$ and $\vector{b}$ are
{\em orthonormal}. \index{orthonormal}
\end{df}
Since $|\cos \theta| \leq\ 1$ we also have
\begin{cor}[Cauchy-Bunyakovsky-Schwarz Inequality]\index{inequality!Cauchy-Bunyakovsky-Schwarz!in R2}
$$\left|\dotprod{a}{b}\right| \leq \norm{\vector{a}}\norm{\vector{b}}.$$
Equality occurs if and only if $\vector{a}\parallel \vector{b}$.
\end{cor}
If $\vector{a}=\colvec{a_1\\ a_2}$ and $\vector{b} = \colvec{b_1\\
b_2}$, the CBS Inequality takes the form
\begin{equation}\label{eq:alternate-CBS} |a_1b_1+a_2b_2|\leq (a_1 ^2+a_2 ^2)^{1/2}(b_1 ^2+b_2 ^2)^{1/2}.\end{equation}
\begin{exa}
Let $a, b$ be positive real numbers. Minimise $a^2+b^2$ subject to the
constraint  $a+b=1$.
\end{exa}
\begin{solu}
By the CBS Inequality,
$$  1=|a\cdot 1 + b\cdot 1|\leq (a^2+b^2)^{1/2}(1^2+1^2)^{1/2} \implies a^2+b^2 \geq \dfrac{1}{2}.  $$
Equality occurs if and only if $\colvec{a\\ b}=\lambda \colvec{1\\ 1}$. In such case, $a=b=\lambda$, and so equality is achieved for $a=b=\dfrac{1}{2}$.
\end{solu}
\begin{cor}[Triangle Inequality] \index{inequality!triangle!in R2}
$$\norm{\vector{a} + \vector{b}} \leq \norm{\vector{a}} + \norm{\vector{b}}.$$
\end{cor}
\begin{pf}
$$\begin{array}{lll}
||\vector{a} + \vector{b}||^2 & = & (\vector{a} + \vector{b})\bp (\vector{a} + \vector{b}) \\
& = & \vector{a}\bp\vector{a} + 2\vector{a}\bp\vector{b} +
\vector{b}\bp\vector{b} \\
& \leq & ||\vector{a}||^2  + 2||\vector{a}||||\vector{b}|| +
||\vector{b}||^2 \\
& = & (||\vector{a}|| + ||\vector{b}||)^2,
\end{array}$$from where the desired result follows.  \end{pf}

\begin{exa}
Let $x, y, z$ be positive real numbers. Prove that
$$ \sqrt{2}(x+y+z)\leq \sqrt{x^2+y^2}+ \sqrt{y^2+z^2}+\sqrt{z^2+x^2}. $$
\end{exa}
\begin{solu}
Put $\vector{a} = \colvec{x\\ y}$, $\vector{b} = \colvec{y\\ z}$,
$\vector{c} = \colvec{z\\ x}$. Then
$$\norm{\vector{a}+\vector{b}+\vector{c}} = \norm{\colvec{x+y+z\\ x + y + z}} = \sqrt{2}(x+y+z).  $$
Also,
$$ \norm{\vector{a}}+ \norm{\vector{b}}+ \norm{\vector{c}}= \sqrt{x^2+y^2}+ \sqrt{y^2+z^2}+\sqrt{z^2+x^2}, $$
and the assertion follows by the triangle inequality
$$ \norm{\vector{a}+\vector{b}+\vector{c}}\leq \norm{\vector{a}}+ \norm{\vector{b}}+ \norm{\vector{c}}. $$
\end{solu}

We now use vectors to prove a classical theorem of Euclidean
geometry.

\begin{df}
Let $\point{A}$  and $\point{B}$ be points on the plane and let
$\vector{u}$ be a unit vector. If $\vector{AB}= \lambda \vector{u}$,
then  $\lambda$ is the    {\em directed distance or algebraic
measure of the line segment  $\seg{AB}$ with respect to the  vector
$\vector{u}$}. We will denote this distance by
$\dd{AB}_{\vector{u}}$, or more routinely, if the vector
$\vector{u}$ is patent, by $\dd{AB}$. Observe that
$\dd{AB}=-\dd{BA}$.
\end{df}

\begin{thm}[Thales' Theorem]\label{thm:thales}
Let $\line{D}$ y $\line{D'}$ be two distinct lines on the plane. Let
$\point{A}, \point{B}, \point{C}$ be distinct points of $\line{D}$,
and $\point{A'}, \point{B'}, \point{C'}$ be distinct points of
$\line{D'}$, $\point{A}\neq \point{A'}$,
 $\point{B}\neq \point{B'}$, $\point{C}\neq \point{C'}$, $\point{A}\neq\point{ B}$, $\point{A'}\neq \point{B'}$. Let $\line{AA}' \parallel
 \line{BB'}$. Then
 $$\line{AA'} \parallel \line{CC'} \iff \dfrac{\dd{AC}}{\dd{AB}}=\dfrac{\dd{A'C'}}{\dd{A'B'}}.  $$
\end{thm}

\vspace{2cm} \begin{figure}[!h] \hfill\begin{minipage}[c]{6cm}
\centering\psset{unit=1.2pc}
\pstGeonode[PointSymbol=none,PosAngle={90,90}](-1,4){D}(1,4){D'}
\pstGeonode[PointName=none,PointSymbol=none](-4,-4){E}(4,-4){E'}
\pstLineAB{D}{E} \pstLineAB{D'}{E'}
\pstTranslation[DistCoef=.25,PosAngle=180]{D}{E}{D}[A]
\pstTranslation[DistCoef=.25]{D'}{E'}{D'}[A']
\pstTranslation[DistCoef=.5,PosAngle=180]{D}{E}{D}[B]
\pstTranslation[DistCoef=.5]{D'}{E'}{D'}[B']
\pstTranslation[DistCoef=.75,PosAngle=180]{D}{E}{D}[C]
\pstTranslation[DistCoef=.75]{D'}{E'}{D'}[C'] \pstLineAB{A}{A'}
 \pstLineAB{B}{B'} \pstLineAB{C}{C'}\label{fig:thales1}
 \vspace{2cm}\footnotesize\hangcaption{Thales' Theorem.}
\end{minipage}\hfill
\begin{minipage}[c]{6cm}
 \centering\psset{unit=1.2pc}
\pstGeonode[PointSymbol=none,PosAngle={90,90}](1,4){D}(-1,4){D'}
\pstGeonode[PointName=none,PointSymbol=none](-4,-4){E}(4,-4){E'}
\pstLineAB{D}{E} \pstLineAB{D'}{E'} \pstInterLL{D}{E}{D'}{E'}{C}
\pstTranslation[DistCoef=.5,PosAngle=180]{D}{E}{D}[A]
\pstTranslation[DistCoef=.5]{D'}{E'}{D'}[A']
\pstTranslation[DistCoef=.75,PosAngle=180]{D}{E}{D}[B]
\pstTranslation[DistCoef=.75]{D'}{E'}{D'}[B']\pstLineAB{A}{A'}
 \pstLineAB{B}{B'}\label{fig:thales2}
 \vspace{2cm}\footnotesize\hangcaption{Corollary to Thales' Theorem.}
\end{minipage} \hfill
\end{figure}


\begin{pf}Refer to figure \ref{fig:thales1}. On the one hand, because they are unit vectors in the same direction,
$$ \dfrac{\vector{AB}}{\dd{AB}}=\dfrac{\vector{AC}}{\dd{AC}}; \qquad  \dfrac{\vector{A'B'}}{\dd{A'B'}}=\dfrac{\vector{A'C'}}{\dd{A'C'}}.  $$
On the other hand, by Chasles' Rule,
$$\vector{BB'} = \vector{BA}+\vector{AA'} + \vector{A'B'} = (\vector{A'B'}-\vector{AB})+ \vector{AA'}.   $$
Since $\line{AA'}\parallel \line{BB'}$, there is a scalar
$\lambda\in\reals$ such that
$$\vector{A'B'}=\vector{AB} + \lambda \vector{AA'}.  $$
Assembling these results,
$$\begin{array}{lll}
\vector{CC'} & = & \vector{CA} + \vector{AA'} + \vector{A'C'}\\
& = & -\dfrac{\dd{AC}}{\dd{AB}}\cdot \vector{AB} + \vector{AA'} +
\dfrac{\dd{A'C'}}{\dd{A'B'}}\left(\vector{AB}+\lambda
\vector{AA'}\right)\\
& = &
\left(\dfrac{\dd{A'C'}}{\dd{A'B'}}-\dfrac{\dd{AC}}{\dd{AB}}\right)\vector{AB}+\left(1+\lambda
\dfrac{\dd{A'C'}}{\dd{A'B'}}\right)\vector{AA'}.
\end{array}$$
As the line $\line{AA'}$ is not parallel to the line  $\line{AB}$,
the equality above reveals that
$$ \line{AA'} \parallel \line{CC'} \iff \dfrac{\dd{AC}}{\dd{AB}}-\dfrac{\dd{A'C'}}{\dd{A'B'}}=0,
$$proving the theorem.\end{pf}
From the preceding theorem, we immediately gather the following
corollary. (See figure \ref{fig:thales2}.)
\begin{cor}\label{cor:thales}
Let  $\line{D}$ and  $\line{D'}$ are distinct lines, intersecting in
the unique point  $\point{C}$. Let   $\point{A}, \point{B},$ be
points on line   $\line{D}$, and $A', B',$ points on line
$\line{D'}$. Then
$$\line{AA'} \parallel \line{BB'} \iff \dfrac{\dd{CB}}{\dd{CA}}=\dfrac{\dd{CB'}}{\dd{CA'}}.  $$
\end{cor}



\section{Linear Independence}
\dropping{2}{C}onsider now two arbitrary vectors in $\reals^2$,
$\vector{x}$ and $\vector{y}$, say. Under which conditions can we
write an arbitrary vector $\vector{v}$ on the plane as a linear
combination of $\vector{x}$ and $\vector{y}$, that is, when can we
find scalars $a, b$ such that
$$\vector{v}=a\vector{x}+b\vector{y} \ ? $$
The answer can be promptly obtained algebraically. Operating
formally,
$$\begin{array}{lll}\vector{v}=a\vector{x}+b\vector{y}  & \iff & v_1 = ax_1 + by_1, \qquad  v_2 = ax_2 + by_2\\
& \iff & a = \dfrac{v_1y_2-v_2y_1}{x_1y_2-x_2y_1}, \qquad b =
\dfrac{x_1v_2-x_2v_1}{x_1y_2-x_2y_1}.
\end{array}$$
The above expressions for $a$ and $b$ make sense only if $x_1y_2\neq
x_2y_1$. But, what does it mean  $x_1y_2= x_2y_1$? If none of these
are zero then $\dfrac{x_1}{y_1} = \dfrac{x_2}{y_2}=\lambda$, say,
and to $$\colvec{x_1\\ x_2} = \lambda \colvec{y_1\\ y_2} \iff
\vector{x}\parallel \vector{y}.
$$
If $x_1=0$, then either $x_2=0$ or $y_1=0$. In the first case,
$\vector{x}=\vector{0}$, and {\em a fortiori} $\vector{x}\parallel
\vector{y}$, since all vectors are parallel to the zero vector. In
the second case we have $$\vector{x} = x_2\vector{j}, \qquad
\vector{y}=y_2\vector{j},$$and so both vectors are parallel to
$\vector{j}$ and hence $\vector{x}\parallel \vector{y}$. We have
demonstrated the following theorem.
\begin{thm}Given two vectors in $\reals^2$,
$\vector{x}$ and $\vector{y}$, an arbitrary vector $ \vector{v}$ can
be written as the linear combination
$$\vector{v}=a\vector{x}+b\vector{y}, \quad a\in\reals, \quad b\in\reals $$
if and only if $\vector{x}$ is not parallel to $\vector{y}$. In this
last case we say that $\vector{x}$ is {\em linearly independent}
from vector $\vector{y}$. If two vectors are not linearly
independent, then we say that they are {\em linearly dependent}.
\end{thm}
\begin{exa}
The vectors  $\colvec{1\\ 0 }$ and $\colvec{1\\ 1}$ are clearly
linearly independent, since one is not a scalar multiple of the
other. Given an arbitrary vector $\colvec{a\\ b}$ we can express it
as a linear combination of these vectors as follows:
$$ \colvec{a\\ b} = (a-b)\colvec{1\\ 0} + b\colvec{1\\ 1}. $$
\end{exa}

Consider now two linearly independent vectors $\vector{x}$ and
$\vector{y}$. For $a\in [0;1]$, $a\vector{x}$ is parallel to
$\vector{x}$ and traverses the whole length of $\vector{x}$: from
its tip (when $a=1$) to its tail (when $a=0$). In the same manner,
for $b\in [0;1]$, $b\vector{y}$ is parallel to $\vector{y}$ and
traverses the whole length of $\vector{y}$. The linear combination
$a\vector{x}+b\vector{y}$ is also a vector on the plane.


\begin{df}Given two linearly
independent vectors  $\vector{x}$ and $\vector{y}$ consider bi-point
representatives of them with the tails at the origin. The {\em
fundamental parallelogram} of the the vectors  $\vector{x}$ and
$\vector{y}$ is the set
$$\{a\vector{x}+b\vector{y}: a\in [0;1],
b\in [0;1]\}.$$
\end{df}

Figure \ref{fig:fundie-parallelo} shews the
fundamental parallelogram of $\left\{\colvec{1\\ 0}, \colvec{1\\
1}\right\}$, coloured in brown, and the respective tiling of the
plane by various translations of it. Observe that the vertices of
this parallelogram are
$\left\{\colpoint{0\\ 0}, \colpoint{1\\ 0}, \colpoint{1\\
1}, \colpoint{2\\ 1}\right\}$. In essence then, linear independence
of two vectors on the plane means that we may obtain every vector on
the plane as a linear combination of these two vectors and hence
cover the whole plane by all these linear combinations.





\vspace*{4cm}
\begin{figure}[h]
\psset{unit=3pc}
$$\psset{unit=1pc}
\multido{\ny=-7+1}{14}{\multido{\nx=-7+1}{14}{\rput(\nx,\ny){\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(0,0)(1,1)(2,1)(1,0)}}}}
\multido{\nx=-7+1,\ny=-7+1}{14}{\rput(\nx,\ny){\pscustom[fillstyle=solid,fillcolor=magenta]{\pspolygon(0,0)(1,1)(2,1)(1,0)}}}
\multido{\ny=-7+2}{7}{\rput(0,\ny){\pscustom[fillstyle=solid,fillcolor=cyan]{\pspolygon(0,0)(1,1)(2,1)(1,0)}}}
\pscustom[fillstyle=solid,fillcolor=brown]{\pspolygon(0,0)(1,1)(2,1)(1,0)}
\psline[linewidth=2pt,arrows={*->}](0,0)(1,
1)\psline[linewidth=2pt,arrows={*->}](0, 0)(1, 0)
\psline[linewidth=2pt, linecolor=red]{->}(-8.5,0)(8.5, 0)
\psline[linewidth=2pt, linecolor=blue]{->}(0,-8.5)(0, 8.5)
 \psline[linewidth=2pt,arrows={*->}](0,0)(1,
1)\psline[linewidth=2pt,arrows={*->}](0, 0)(1, 0)
$$\vspace*{3cm}\footnotesize\hangcaption{Tiling and the fundamental
parallelogram.}
 \label{fig:fundie-parallelo}
\end{figure}






\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Prove that $\colvec{1\\ 1}$ and $\colvec{-1\\ 1}$ are linearly
independent, and draw their fundamental parallelogram.
\end{pro}
\begin{pro}
Write an arbitrary vector $\colvec{a\\ b}$ on the plane, as a linear combination of the vectors $\colvec{1\\ 1}$ and $\colvec{-1\\
1}$.
\begin{answer}
Plainly,
$$\colvec{a\\ b} = \dfrac{b-a}{2}\colvec{-1\\ 1} + \dfrac{a+b}{2}\colvec{1\\ 1}. $$
\end{answer}
\end{pro}
\begin{pro}
Consider the line with Cartesian equation $L: ax+by =c$, where not
both of $a, b$ are zero. Let $\point{t}$ be a point not on $L$.
 Find a formula for the distance from $\point{t}$ to $L$.
 \end{pro}
\begin{pro}
Prove that two non-zero perpendicular vectors in $\reals^2$ must be
linearly independent.
\end{pro}


\end{multicols}

\section{Geometric Transformations in two dimensions}
\dropping{2}{W}e now  are interested in the following fundamental
functions of sets (figures) on the plane: translations, scalings
(stretching or shrinking)  reflexions about the axes, and rotations
about the origin. It will turn out that a handy tool for
investigating all of these (with the exception of translations),
will be certain construct called {\em matrices} which we will study
in the next section.

\bigskip

First observe what is meant by a function $F:\reals^2 \rightarrow
\reals^2$. This means that the input of the function is a point of
the plane, and the output is also a point on the plane.

A rather uninteresting example, but nevertheless an important one is
the following.
\begin{exa}
The function ${\bf I}:\reals^2 \rightarrow \reals^2$, ${\bf
I}(\point{x})=\point{x}$ is called the {\em identity
transformation}. Observe that the identity transformation leaves a
point untouched.
\end{exa}

\bigskip

We start with the simplest of these functions.

\begin{df}
A function $T_{\vector{v}}:\reals^2 \rightarrow \reals^2$ is said to
be a {\em translation} if it is of the form
$T_{\vector{v}}(\point{x}) = \point{x}+\vector{v}$, where
$\vector{v}$ is a fixed vector on the plane.
\end{df}A translation simply shifts an object on the plane rigidly
(that is, it does not distort it shape or re-orient it), to a copy
of itself a given amount of units  from where it was. See figure
\ref{fig:tranny} for an example.



\vspace*{2cm}
\begin{figure}[h]
\begin{minipage}{7cm}
\psset{unit=1.5pc}
$$
\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(0,0)(1,1)(2,1)(1,0)}
\psline[linewidth=2pt]{->}(2,1)(6,2)
\rput(6,2){\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(0,0)(1,1)(2,1)(1,0)}}
\uput[d](4,1.5){\vector{v}}
$$\footnotesize\hangcaption{A translation.}
 \label{fig:tranny}
\end{minipage}
\begin{minipage}{7cm}
\psset{unit=1.5pc}
$$
\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(0,0)(1,1)(2,1)(1,0)}
\psline[linewidth=2pt]{->}(2,.5)(4.5,.5)
\rput(5,0){\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(0,0)(2,.5)(4,.5)(2,0)}}
$$\footnotesize\hangcaption{A scaling.}
 \label{fig:scaling}
\end{minipage}

\end{figure}
It is clear that the composition of any two translations commutes,
that is, if $T_{\vector{v}_1}, T_{\vector{v}_2}:\reals^2 \rightarrow
\reals^2$ are translations, then $T_{\vector{v}_1}\circ
T_{\vector{v}_2} = T_{\vector{v}_2}\circ T_{\vector{v}_1}$. For let
$T_1(\point{a}) = \point{a}+\vector{v}_1$ and
$T_{\vector{v}_2}(\point{a}) = \point{a}+\vector{v}_2$. Then
$$ (T_{\vector{v}_1}\circ T_{\vector{v}_2})(\point{a}) = T_{\vector{v}_1}(T_{\vector{v}_2}(\point{a}))=T_{\vector{v}_2}(\point{a})+\vector{v}_1 = \point{a}+\vector{v}_2+\vector{v}_1,  $$
and
$$ (T_{\vector{v}_2}\circ T_{\vector{v}_1})(\point{a}) = T_{\vector{v}_2}(T_{\vector{v}_1}(\point{a}))=T_{\vector{v}_1}(\point{a})+\vector{v}_2 = \point{a}+\vector{v}_1+\vector{v}_2,  $$
from where the commutativity claim is deduced.




\begin{df}
A function $S_{a, b}:\reals^2 \rightarrow \reals^2$ is said to be a
{\em
 scaling} if it is of the form $S_{a, b}(\point{r}) = \colpoint{ax
\\ by}$, where $a>0$, $b>0$  are real numbers.
\end{df}

Figure \ref{fig:scaling} shews the scaling $S_{2, 0.5}\left(\colpoint{x\\
y}\right)=\colpoint{2x\\ 0.5y}$.

\bigskip

It is clear that the composition of any two scalings commutes, that
is, if $S_{a, b}, S_{a', b'}:\reals^2 \rightarrow \reals^2$ are
scalings, then $S_{a, b}\circ S_{a', b'} = S_{a', b'}\circ S_{a,
b}$. For $$ (S_{a, b}\circ S_{a', b'})(\point{r}) = S_{a, b}(S_{a',
b'}(\point{r}))=S_{a, b}\left(\colpoint{a'x\\ b'y}\right)
=\colpoint{a(a'x)\\ b(b'y)} ,  $$ and
$$ (S_{a', b'}\circ S_{a, b})(\point{r}) = S_{a', b'}(S_{a, b}(\point{r}))=S_{a', b'}\left(\colpoint{ax\\ by}\right) =
\colpoint{a'(ax)\\ b'(by)} ,  $$ from where the commutativity claim
is deduced.


\bigskip

Translations and scalings do not necessarily commute, however. For
consider the translation $T_{\vector{i}}(\point{a}) =
\point{a}+\vector{i}$ and the scaling $S_{2,1}(\point{a}) =
\colpoint{2a_1
\\ a_2}$. Then
$$ (T_{\vector{i}}\circ S_{2,1})\left(\colpoint{-1\\ 0}\right) = T_{\vector{i}}\left(S\left(\colpoint{-1\\ 0}\right)\right) = T_{\vector{i}}\left(\colpoint{-2\\ 0}\right) = \colpoint{-1\\ 0}, $$
but
$$ (S_{2,1}\circ T_{\vector{i}})\left(\colpoint{-1\\ 0}\right) = S_{2,1}\left(T_{\vector{i}}\left(\colpoint{-1\\ 0}\right)\right) = S_{2,1}\left(\colpoint{0\\ 0}\right) = \colpoint{0\\ 0}. $$


\vspace*{2cm}
\begin{figure}[h]
\psset{unit=1.5pc}
$$
\psline[linewidth=2pt, linecolor=red]{->}(-3,0)(3, 0)
\psline[linewidth=2pt, linecolor=blue]{->}(0,-3)(0, 3)
\uput[r](3,0){x \ \mathrm{axis}}\uput[u](0,3){y \ \mathrm{axis}}
\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(0,0)(1,1)(2,1)(1,0)}
\pscustom[fillstyle=solid,fillcolor=magenta]{\pspolygon(0,0)(-1,1)(-2,1)(-1,0)}
\pscustom[fillstyle=solid,fillcolor=cyan]{\pspolygon(0,0)(1,-1)(2,-1)(1,0)}
\pscustom[fillstyle=solid,fillcolor=blue]{\pspolygon(0,0)(-1,-1)(-2,-1)(-1,0)}
$$\vspace*{2cm}\footnotesize
\hangcaption{Reflexions. The original object (in the first quadrant)
is yellow.
 Its reflexion about the $y$-axis is magenta (on the second
 quadrant).
Its reflexion about the $x$-axis is cyan (on the fourth quadrant).
Its reflexion  about the origin is blue (on the third quadrant).}
 \label{fig:refle}
 \end{figure}

\begin{df}
A function $R_{H}:\reals^2 \rightarrow \reals^2$ is said to be a
{\em reflexion about the  $y$-axis or horizontal reflexion}  if it
is of the form $R_{H}(\point{r}) = \colpoint{-x \\ y}$. A function
$R_{V}:\reals^2 \rightarrow \reals^2$ is said to be a {\em reflexion
about the  $x$-axis or vertical reflexion} if it is of the form
$R_{V}(\point{r}) = \colpoint{x\\ -y}$. A function $R_{O}:\reals^2
\rightarrow \reals^2$ is said to be a {\em reflexion about origin}
if it is of the form $R_{H}(\point{r}) = \colpoint{-x \\ -y}$.
\end{df}
Some reflexions appear in figure \ref{fig:refle}.



A few short computations establish various commutativity properties
among reflexions, translations, and scalings. See problem
\ref{pro:commu-refl-trans-scal}.


We now define rotations. This definition will be somewhat harder
than the others, so let us develop some ancillary results.

\bigskip

Consider a point $\point{r}$ with polar coordinates $x=\rho\cos
\alpha$,  $y=\rho\sin \alpha$ as in figure \ref{fig:rot1}. Here
$\rho=\sqrt{x ^2+y ^2}$ and $\alpha \in [0;2\pi[$. If we rotate it,
in the levogyrate sense, by an angle $\theta$, we land on the new
point $\point{x}'$ with $x ' = \rho\cos  (\alpha + \theta)$ and $y '
= \rho\sin (\alpha + \theta)$. But
$$\rho\cos  (\alpha + \theta) = \rho\cos \theta\cos\alpha - \rho\sin\theta\sin\alpha = x\cos\theta - y \sin\theta,  $$
and
$$\rho\sin (\alpha + \theta) = \rho\sin\alpha\cos\theta + \rho\sin\theta\cos\alpha = y\cos\theta + x \sin\theta.  $$
Hence the point $\colpoint{x\\ y}$ is mapped to the point
$\colpoint{x\cos\theta - y \sin\theta\\ x\sin\theta + y\cos\theta}$.




\vspace*{3cm}
\begin{figure}[h] \centering \psset{unit=1.5pc}
\psline[linewidth=2pt, linecolor=red]{->}(-3.5,0)(3.5, 0)
\psline[linewidth=2pt, linecolor=blue]{->}(0,-3.5)(0, 3.5)
\uput[r](3.5,0){$x$-axis}\uput[u](0,4){$y$-axis}
\pstGeonode[PointName=none](0,0){O}(3;35){A}(3;120){B}(3;0){C}
 \pstMarkAngle[linecolor=magenta]{C}{O}{A}{\tiny{$\alpha$}}
  \pstMarkAngle[linecolor=gray]{A}{O}{B}{\tiny{$\theta$}}
  \uput[r](3;35){\tiny{$\colpoint{\rho\cos  \alpha \\ \rho\sin \alpha}$}}
  \uput[ul](3;120){\tiny{$\colpoint{\rho\cos  (\alpha+\theta) \\ \rho\sin (\alpha + \theta)}$}}
   \pstLineAB[linestyle=dotted]{O}{A}\pstLineAB[linestyle=dotted]{O}{B}
\vspace*{2cm}\footnotesize\hangcaption{Rotation by an angle $\theta$
in the levogyrate
 (counterclockwise) sense from the $x$-axis.}
 \label{fig:rot1}
\end{figure}


\bigskip

We may now formulate the definition of a rotation.
\begin{df}
A function $R_\theta:\reals^2 \rightarrow \reals^2$ is said to be a
{\em levogyrate rotation about the origin by the angle $\theta$
measured from the positive $x$-axis} if $R_\theta
\left(\point{r}\right)=\colpoint{x\cos\theta - y \sin\theta\\
x\sin\theta + y \cos\theta}$. Here $\rho=\sqrt{x ^2+y ^2}$.\end{df}





Various properties of the composition of rotations with other plane
transformations are explored in problems  \ref{pro:compo-rot} and
\ref{pro:commu-refl-trans-scal-rot}.

We now codify some properties shared by scalings, reflexions, and
rotations.

\begin{df}
A function $L:\reals^2 \rightarrow \reals^2$ is said to be a {\em
linear transformation} from $\reals^2$ to $\reals^2$ if for all
points $\point{a}, \point{b}$ on the plane and every scalar
$\lambda$, it is verified that
$$ L(\point{a}+\point{b}) = L(\point{a})+L(\point{b}), \qquad L(\lambda \point{a})=\lambda L(\point{a}).  $$
\end{df}

It is easy to prove that  scalings, reflexions, and rotations are
linear transformations  from $\reals^2$ to $\reals^2$, but not so
translations.

\begin{df}
A function $A:\reals^2 \rightarrow \reals^2$ is said to be an {\em
affine transformation} from $\reals^2$ to $\reals^2$ if there exists
a linear transformation $L:\reals^2 \rightarrow \reals^2$ and a
fixed vector $\vector{v}\in\reals^2$ such that for all points
$\point{x}\in \reals^2$ it is verified that $$A(\point{x})=
L(\point{x})+\vector{v}.$$
\end{df}


It is easy to see  that translations are then affine
transformations, where for the linear transformation $L$ in the
definition we may take $I:\reals^2\rightarrow \reals^2$, the
identity transformation $I(\point{x})=\point{x}$.



We have seen   that scalings, reflexions and rotations are linear
transformations. If $L:\reals^2\rightarrow \reals^2$ is a linear
transformation, then
$$L(\point{r}) = L(x\vector{i}+y\vector{j})= xL(\vector{i})+yL(\vector{j}),  $$
and thus a linear transformation from $\reals^2$ to $\reals^2$ is
solely determined by the values $L(\vector{i})$ and $L(\vector{j})$.
We will now introduce a way to  codify these values.
\begin{df}
Let $L:\reals^2\rightarrow \reals^2$ be a linear transformation. The
 {\em matrix $A_L$ associated to $L$} is the  $2\times 2$, ($2$
 rows, $2$ columns) array whose columns are (in this order)
 $L\left(\colpoint{1\\ 0}\right)$ and $L\left(\colpoint{0\\ 1}\right)$.
\end{df}
\begin{exa}[Scaling Matrices] Let $a>0, b>0$ be a real numbers. The matrix of the scaling transformation $S_{a, b}$ is
 $\begin{bmatrix} a & 0 \cr 0 & b \cr
\end{bmatrix}$. For $$S_{a, b}\left(\colpoint{1\\ 0}\right) = \colpoint{a\cdot 1\\ b\cdot 0} = \colpoint{a\\
0}$$ and $$S_{a, b}\left(\colpoint{0\\ 1}\right) = \colpoint{0\cdot 1\\ b\cdot 1} = \colpoint{0\\
b}.$$
\end{exa}
\begin{exa}[Reflexion  Matrices] It is easy to verify that the matrix for the transformation $R_H$ is  $\begin{bmatrix} -1 & 0 \cr 0 & 1 \cr
\end{bmatrix}$, that the matrix for the transformation $R_V$ is $\begin{bmatrix} 1 & 0 \cr 0 & -1 \cr
\end{bmatrix}$ , and the matrix for the transformation $R_O$ is
 $\begin{bmatrix} -1 & 0 \cr 0 & -1 \cr
\end{bmatrix}$.
\end{exa}



\begin{exa}[Rotating Matrices] It is easy to verify that the matrix
for a rotation $R_\theta$ is
 $\begin{bmatrix}\cos \theta &
-\sin \theta \cr \sin \theta & \cos \theta \cr
\end{bmatrix}$.
\end{exa}
\begin{exa}[Identity Matrix] The matrix for the identity linear
transformation ${\bf Id}:\reals^2 \rightarrow \reals^2$, ${\bf
Id}(\point{x}) = \point{x}$ is ${\bf I}_2=\begin{bmatrix}1 & 0 \cr 0
 & 1 \cr \end{bmatrix}$.
\end{exa}
\begin{exa}[Zero Matrix] The matrix for the null linear
transformation ${\bf N}:\reals^2 \rightarrow \reals^2$, ${\bf
N}(\point{x}) = \point{O}$ is ${\bf 0}_2=\begin{bmatrix}0 & 0 \cr 0
 & 0 \cr \end{bmatrix}$.
\end{exa}

From problem \ref{pro:compo-lin-with-lin-lin-is} we know that the
composition of two linear transformations is also linear. We are now
interested in how to codify the matrix of a composition of linear
transformations $L_1\circ L_1$ in terms of their individual
matrices.

\begin{thm}\label{thm:matrix-prod}
Let $L:\reals^2\rightarrow \reals^2$ have the matrix representation
$A_L =\begin{bmatrix}a & b \cr c & d \cr \end{bmatrix}$ and let
$L':\reals^2\rightarrow \reals^2$ have the matrix representation
$A_{L'} =\begin{bmatrix}r & s \cr t & u \cr \end{bmatrix}$. Then the
composition $L\circ L'$ has matrix representation
$$\begin{bmatrix} ar+bt& as+bu\\ cr+dt & cs+du \cr \end{bmatrix}.   $$
\end{thm}
\begin{pf}
We need to find $(L\circ L')\left(\colpoint{1\\ 0}\right)$ and
$(L\circ L')\left(\colpoint{0\\ 1}\right)$.

\bigskip

We have
$$ (L\circ L')\left(\colpoint{1\\ 0}\right) = L\left(L'\left(\colpoint{1\\ 0}\right)\right) = L\left(\colpoint{r \\ t}\right) =
rL(\vector{i})+tL(\vector{j}) = r\colpoint{a \\ c}+t\colpoint{b\\ d}
= \colpoint{ar+bt\\ cr + dt},
$$
and
$$ (L\circ L')\left(\colpoint{0\\ 1}\right) = L\left(L'\left(\colpoint{0\\ 1}\right)\right) = L\left(\colpoint{s \\ u}\right) =
sL(\vector{i})+uL(\vector{j}) = s\colpoint{a \\ c}+u\colpoint{b\\
d} = \colpoint{as+bu\\ cs + du},
$$whence we conclude that the matrix of $L\circ L'$
 is $\begin{bmatrix} ar+bt& as+bu\\ cr+dt & cs+du \cr \end{bmatrix}$, as we wanted to shew.\end{pf}

The above motivates the following definition.
\begin{df}
Let $A = \begin{bmatrix}a & b \cr c & d \cr \end{bmatrix}$ and $B=
\begin{bmatrix}r & s \cr t & u \cr \end{bmatrix}$ be two $2\times 2$
matrices, and $\lambda\in\reals$ be a scalar. We define {\em matrix
addition} as
$$A+B = \begin{bmatrix}a & b \cr c & d \cr \end{bmatrix}+ \begin{bmatrix}r & s \cr t & u \cr \end{bmatrix} =
\begin{bmatrix}a+r & b+s \cr c+t & d+u \cr \end{bmatrix}.  $$
We define {\em matrix multiplication} as
$$AB = \begin{bmatrix}a & b \cr   c & d \cr \end{bmatrix}\begin{bmatrix}   r & s \cr t & u \cr \end{bmatrix}
=\begin{bmatrix} ar+bt& as+bu\\ cr+dt & cs+du \cr \end{bmatrix}.  $$
We define {\em scalar multiplication of a matrix} as
$$\lambda A =  \lambda \begin{bmatrix}a & b \cr c & d \cr \end{bmatrix} =\begin{bmatrix}\lambda a & \lambda b \cr \lambda c & \lambda d \cr \end{bmatrix}  . $$
\end{df}


\begin{rem}
Since the composition of functions is not necessarily commutative,
neither is matrix multiplication. Since the composition of functions
is associative, so is matrix multiplication.
\end{rem}
\begin{exa}
Let $$M = \begin{bmatrix}1 & -1  \cr 0 & 1\end{bmatrix}, \qquad N =
\begin{bmatrix}1 & 2 \cr  -2 & 1 \cr \end{bmatrix}.$$ Then
$$M + N = \begin{bmatrix}2 & 1 \cr -2 & 2\end{bmatrix}, \qquad 2M = \begin{bmatrix}2 & -2 \cr 0 & 2 \cr\end{bmatrix},
\qquad MN =
\begin{bmatrix}3 & 1\cr -2&1 \cr\end{bmatrix}.$$
\end{exa}

\begin{exa}\label{exa:rect-into-para}
Find a $2 \times 2$ matrix that will transform the square in figure
\ref{fig:rect-into-para1} into the parallelogram in figure
\ref{fig:rect-into-para2}. Assume in each case that the vertices of
the figures are lattice points, that is, coordinate points with
integer coordinates.
\end{exa}
\begin{solu}
Let $\begin{bmatrix} a & b \cr c & d\end{bmatrix}$ be the desired
matrix. Then since
$$\begin{bmatrix} a & b \cr c & d\end{bmatrix}\colvec{0\\ 0} = \colvec{0\\0 },  $$
the point $\colpoint{0\\ 0}$ is {\em a fortiori}, transformed to
itself. We now assume, without loss of generality, that each vertex
of the square is transformed in the same order, counterclockwise, to
each vertex of the rectangle. Then
$$ \begin{bmatrix} a & b \cr c & d\end{bmatrix}\colvec{1\\ 0}  = \colvec{2\\ 2} \implies \colvec{a \\ c} = \colvec{2 \\ 2} \implies a =c=2. $$
Using these values,
$$ \begin{bmatrix} a & b \cr c & d\end{bmatrix}\colvec{1\\ 1}  = \colvec{1\\ 3} \implies \colvec{a+b \\ c+d} = \colvec{1 \\ 3} \implies b=-1, \quad  d=1. $$
And so the desired matrix is
$$ \begin{bmatrix} 2 & -1 \cr 2 & 1\end{bmatrix}.$$
\end{solu}


\vspace*{2cm}
\begin{figure}[h]
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(0,0)(1,0)(1,1)(0,1)}
\vspace*{2cm}\footnotesize\hangcaption{Example
\ref{exa:rect-into-para}.} \label{fig:rect-into-para1}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\rput{45}(0,0){\psdots(0,0)(2.8283,0)(2.8284,1.4142)(0,1.4142)\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(0,0)(2.8283,0)(2.8284,1.4142)(0,1.4142)}}
\vspace*{2cm}\footnotesize\hangcaption{Example
\ref{exa:rect-into-para}.} \label{fig:rect-into-para2}
\end{minipage}
\hfill
\end{figure}


\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
If $A =
\begin{bmatrix}1 & -1 \cr 2 & 3 \cr \end{bmatrix}$, $B =
\begin{bmatrix} a& b \cr 1 & -2 \cr
\end{bmatrix}$ and $$(A+B)^2=A^2+2AB
+B^2,$$ find $a$ and $b$.
\begin{answer}
$a=-3, b=-\dfrac{1}{2}$.
\end{answer}
\end{pro}
\begin{pro}\label{pro:effects-scaling}
 Consider
$\triangle \point{ABC}$ with  $\point{A}=\colpoint{-1\\ 2}$,
$\point{B}=\colpoint{0\\ -2}$,  $\point{C}=\colpoint{2\\ 1}$, as in
figure \ref{fig:original-trig}. Determine the the effects of the
following scaling transformations on the triangle: $S_{2, 1}$,
$S_{1,2}$, and $S_{2,2}$.
\begin{answer} The desired transformations are in figures
\ref{fig:horistre-trig} through \ref{fig:stre-trig}.\\

 \vspace*{4cm}
\begin{figure}[h]
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-2,2)(0,-2)(4,1)}
\vspace*{2cm}\footnotesize\hangcaption{Horizontal Stretch.}
\label{fig:horistre-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,4)(0,-4)(2,2)}
\vspace*{2cm}\footnotesize\hangcaption{Vertical Stretch.}
\label{fig:vertistre-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-2,4)(0,-4)(4,2)}
\vspace*{2cm}\footnotesize\hangcaption{Horizontal and Vertical
Stretch.} \label{fig:stre-trig}
\end{minipage}
\end{figure}
\end{answer}
\end{pro}

\begin{pro} \label{pro:effects-rotating}
Find the effects of the reflexions $R_{\tfrac{\pi}{2}}$,
$R_{\tfrac{\pi}{4}}$,  $R_{-\tfrac{\pi}{2}}$, and
$R_{-\tfrac{\pi}{4}}$ on the triangle in figure
\ref{fig:original-trig}.

\begin{answer}
The desired transformations are shewn in figures through
\ref{fig:rot1-trig} \ref{fig:rot4-trig}.

 \vspace*{2cm}
\begin{figure}[h]
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\rput{90}(0,0){\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,2)(0,-2)(2,1)}}
\vspace*{2cm}\footnotesize\hangcaption{Levogyrate rotation
$\dfrac{\pi}{2}$ radians.} \label{fig:rot1-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\rput{45}(0,0){\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,2)(0,-2)(2,1)}}
\vspace*{2cm}\footnotesize\hangcaption{Levogyrate rotation
$\dfrac{\pi}{4}$ radians.} \label{fig:rot2-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\rput{-90}(0,0){\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,2)(0,-2)(2,1)}}
\vspace*{2cm}\footnotesize\hangcaption{Dextrogyrate rotation
$\dfrac{\pi}{2}$ radians.} \label{fig:rot3-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\rput{-45}(0,0){\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,2)(0,-2)(2,1)}}
\vspace*{2cm}\footnotesize\hangcaption{Dextrogyrate rotation
$\dfrac{\pi}{4}$ radians.} \label{fig:rot4-trig}
\end{minipage}
\end{figure}
\end{answer}
\end{pro}
\begin{pro}\label{pro:commu-refl-trans-scal}
Prove that the composition of two reflexions is commutative. Prove
that the composition of a reflexion and a scaling is commutative.
Prove that the composition of a reflexion and a translation is not
necessarily commutative.
\end{pro}
\begin{pro}\label{pro:compo-rot}Prove that the composition of two rotations on the
plane $R_\theta$ and $R_{\theta '}$ satisfies $$ R_{\theta} \circ
R_{\theta '} = R_{\theta+\theta'}=R_{\theta'}\circ R_{\theta},
$$and so the composition of two rotations on the plane is
commutative.
\end{pro}
\begin{pro}\label{pro:commu-refl-trans-scal-rot}
Prove that the composition of a scaling and a rotation is not
necessarily commutative. Prove that the composition of a rotation
and a translation is not necessarily commutative.  Prove that the
composition of a reflexion and a rotation is not necessarily
commutative.
\end{pro}
\begin{pro}\label{pro:compo-lin-with-lin-lin-is}
Let $L:\reals^2\rightarrow \reals^2$ and $L':\reals^2\rightarrow
\reals^2$ be linear transformations. Prove that their composition
$L\circ L'$ is also a linear transformation.
\end{pro}

\vspace*{2cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,2)(0,-2)(2,1)}
\vspace*{2cm}\footnotesize\hangcaption{Problems
\ref{pro:effects-scaling}, \ref{pro:effects-refle}, and
\ref{pro:effects-rotating}.} \label{fig:original-trig}
\end{figurehere}

\begin{pro}\label{pro:effects-refle}
Find the effects of the reflexions $R_{H}$, $R_{V}$, and $R_O$ on
the triangle in figure \ref{fig:original-trig}.
\begin{answer}
The transformations are shewn in figures \ref{fig:xreflexion-trig}
through \ref{fig:Oreflexion-trig}. \vspace*{2cm}

\begin{figure}[h]
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(-1,-2)(0,2)(2,-1)}
\vspace*{2cm}\footnotesize\hangcaption{Reflexion about the
$x$-axis.} \label{fig:xreflexion-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(1,2)(0,-2)(-2,1)}
\vspace*{2cm}\footnotesize\hangcaption{Reflexion about the $y$-axis
.} \label{fig:yreflexion-trig}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psgrid[gridlabels=.5,subgriddiv=0](-4.5,-4.5)(4.5,4.5)
\pscustom[fillcolor=red,fillstyle=solid]{\pspolygon(1,-2)(0,2)(-2,-1)}
\vspace*{2cm}\footnotesize\hangcaption{Reflexion about the origin.}
\label{fig:Oreflexion-trig}
\end{minipage}
\end{figure}
\end{answer}
\end{pro}

\begin{pro}Find all matrices $A\in\mat{2\times 2}{\reals}$ such that $A^2 = {\bf 0}_2$
\begin{answer} $\begin{bmatrix}a & b \cr c & -a \end{bmatrix}, \ bc = -a^2$\end{answer}
\end{pro}
\begin{pro}
\label{pro:sketch} Find the image of the figure below (consisting of
two circles and a triangle) under the matrix$\begin{bmatrix}1 & 1
\cr -1 & 3
\end{bmatrix}$.
\end{pro}
\vspace*{1cm}

\begin{figurehere}
$$ \psset{unit=2pc}
\pscircle*(.5,1.5){.5} \pscircle*(1.5,1.5){.5}
\pspolygon*(0,1)(2,1)(1,0)
\psgrid[gridlabels=.2,subgriddiv=2](0,0)(2,2)
$$
\vspace*{.5cm}\footnotesize\hangcaption{Problem
\ref{pro:sketch}.}\end{figurehere}



\end{multicols}

\section{Determinants in two dimensions}
\dropping{2}{W}e now desire to define a way of determining areas of
plane figures on the plane. It seems reasonable to require that this
area determination agrees with common formul\ae\ of areas of plane
figures, in particular, the area of a parallelogram should be as we
learn in elementary geometry and the area of a unit square should be
$1$.


\vspace*{3cm}
\begin{figure}[htpb]
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\pscustom[fillcolor=yellow,fillstyle=solid]{\pspolygon[showpoints=true,linewidth=1.5pt](0,0)(4,1)(6,4)(2,3)}
\psline[linewidth=2pt, linecolor=red]{->}(-6.5,0)(6.5, 0)
\psline[linewidth=2pt, linecolor=blue]{->}(0,-6.5)(0, 6.5)
\uput[r](4,1){\tiny{$\colpoint{a \\ b}$}}
\uput[u](2,3){\tiny{$\colpoint{c \\ d}$}}
\psline[linewidth=2pt,arrowscale=2]{->}(0,0)(2,3)
\psline[linewidth=2pt,arrowscale=2]{->}(0,0)(4,1)
\vspace*{3cm}\footnotesize\hangcaption{Area of a parallelogram.}
\label{fig:determ1}
\end{minipage}
\hfill
\begin{minipage}{10cm}
\centering \psset{unit=1pc}
\pscustom[fillcolor=yellow,fillstyle=solid]{\pspolygon[showpoints=true,linewidth=1.5pt](0,0)(4,1)(6,4)(2,3)}
\pscustom[fillcolor=cyan,fillstyle=solid]{\pspolygon[showpoints=true,linewidth=1.5pt](0,0)(4,0)(4,1)}
\pscustom[fillcolor=cyan,fillstyle=solid]{\pspolygon[showpoints=true,linewidth=1.5pt](2,3)(6,4)(2,4)}
\pscustom[fillcolor=orange,fillstyle=solid]{\pspolygon[showpoints=true,linewidth=1.5pt](0,0)(2,3)(2,4)(0,4)}
\pscustom[fillcolor=orange,fillstyle=solid]{\pspolygon[showpoints=true,linewidth=1.5pt](4,0)(6,0)(6,4)(4,1)}
\pstGeonode[PointName=none](0,0){A}(4,1){B}(6,4){C}(2,3){D}(4,0){E}(6,0){F}(2,4){G}(0,4){H}(0,3){I}
\pcline[offset=12pt, arrows={|-|}](0,0)(0,3)\lput*{:U}{$d$}
\ncline[offset=-12pt, arrows={|-|}]{A}{E}\lput*{:U}{$a$}
\ncline[offset=-12pt, arrows={|-|}]{E}{F}\lput*{:U}{$c$}
\ncline[offset=12pt, arrows={|-|}]{I}{H}\lput*{:U}{$b$}
\vspace*{3cm}\footnotesize\hangcaption{$(a+c)(b+d)-2\cdot
\tfrac{ab}{2}-2\cdot\tfrac{c(2b+d)}{2}=ad-bc$.} \label{fig:determ2}
\end{minipage}
\end{figure}




From figures (\ref{fig:determ1}) and (\ref{fig:determ2}), the area
of a parallelogram spanned by $\colvec{a\\ b}$, and $\colvec{c \\
d}$ is
$$ D\left(\colvec{a\\ b}, \colvec{c\\ d}\right) =ad-bc. $$ This motivates the following definition.
\begin{df}
The {\em determinant} of the $2\times 2$ matrix  $\begin{bmatrix} a
& c \cr b & d \cr\end{bmatrix}$ is $$\det \begin{bmatrix} a & c \cr
b & d \cr\end{bmatrix} = ad-bc.  $$
\end{df}



Consider now a simple quadrilateral with vertices
$\point{r_1}=(x_1,y_1)$, $\point{r_2}=(x_2,y_2)$,
$\point{r_3}=(x_3,y_3)$, $\point{r_4}=(x_4,y_4)$, listed in
counterclockwise order, as in figure \ref{fig:area-parallelogram2}.
This quadrilateral is spanned by the vectors
$$\vector{r_1r_2} = \colvec{x_2-x_1\\ y_2-y_1}, \qquad \vector{r_1r_4} = \colvec{x_4-x_1\\ y_4-y_1},  $$
and hence, its area is given by $$ A=\det \begin{bmatrix} x_2-x_1 &
x_4-x_1 \cr  y_2-y_1 & y_4-y_1 \cr
\end{bmatrix} =
D(\vector{r_2}-\vector{r_1},\vector{r_4}-\vector{r_1}) .$$
Similarly, noticing that the quadrilateral is also spanned by
$$\vector{r_3r_4} = \colvec{x_4-x_3\\ y_4-y_3},\qquad \vector{r_3r_2} = \colvec{x_2-x_3\\ y_2-y_3},   $$
its area is also  given by $$ A=\det \begin{bmatrix} x_4-x_3 &
x_2-x_3 \cr y_4-y_3 & y_2-y_3 \cr
\end{bmatrix} =
D(\vector{r_4}-\vector{r_3},\vector{r_2}-\vector{r_3}) .$$ Using the
properties derived in Theorem \ref{thm:properties-2by2-det}, we see
that
$$\begin{array}{lll}A & = & \tfrac{1}{2}\left(
D(\vector{r_2}-\vector{r_1},\vector{r_4}-\vector{r_1})+
D(\vector{r_4}-\vector{r_3},\vector{r_2}-\vector{r_3})\right)\\ & =
& \tfrac{1}{2}\left(D(\vector{r_2},\vector{r_4})
-D(\vector{r_2},\vector{r_1}) -D(\vector{r_1},\vector{r_4})+
D(\vector{r_1},\vector{r_1})\right)\\
& & \qquad + \tfrac{1}{2}\left(D(\vector{r_4},\vector{r_2})
-D(\vector{r_3},\vector{r_2}) -D(\vector{r_4},\vector{r_3})+D(\vector{r_3},\vector{r_3})\right)\\
& = & \tfrac{1}{2}\left(D(\vector{r_2},\vector{r_4})
-D(\vector{r_2},\vector{r_1}) -D(\vector{r_1},\vector{r_4}))\right)+
\tfrac{1}{2}\left(D(\vector{r_4},\vector{r_2})
-D(\vector{r_3},\vector{r_2}) -D(\vector{r_4},\vector{r_3})\right)\\
& = &
\tfrac{1}{2}\left(D(\vector{r_1},\vector{r_2})+D(\vector{r_2},\vector{r_3})+D(\vector{r_3},\vector{r_4})+D(\vector{r_4},\vector{r_1})\right).
\end{array}$$

We conclude that the area of a quadrilateral with  vertices
$(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$, $(x_4,y_4)$, listed in
counterclockwise order is
\begin{equation}\dfrac{1}{2}\left( \det\begin{bmatrix} x_1 & x_2 \cr
y_1 & y_2 \cr
\end{bmatrix}+ \det\begin{bmatrix} x_2 & x_3 \cr y_2 & y_3 \cr
\end{bmatrix}+\det\begin{bmatrix} x_3 & x_4 \cr y_3 & y_4 \cr
\end{bmatrix}+\det\begin{bmatrix} x_4 & x_1 \cr y_4 & y_1 \cr
\end{bmatrix}\right).\label{eq:surveyorsn=4}
\end{equation}




\bigskip

  Similarly, to find the area of a triangle of vertices
$\vector{r_1}=(x_1,y_1)$, $\vector{r_2}=(x_2,y_2)$,
$\vector{r_3}=(x_3,y_3)$, listed in counterclockwise order, as in
figure \ref{fig:area-triangle1}, reflect it about one of its sides,
as in figure \ref{fig:area-triangle2}, creating a parallelogram. The
area of the triangle is now half the area of the parallelogram,
which, by virtue of \ref{eq:surveyorsn=4}, is
$$ \dfrac{1}{4}\left(
D(\vector{r_1},\vector{r_2})+D(\vector{r_2},\vector{r})+D(\vector{r},\vector{r_3})+D(\vector{r_3},\vector{r_1})\right).
$$This is equivalent to
 $$  \dfrac{1}{2}\left(
D(\vector{r_1},\vector{r_2})+D(\vector{r_2},\vector{r_3})+D(\vector{r_3},\vector{r_1})\right)
-\dfrac{1}{4}\left(
D(\vector{r_1},\vector{r_2})-D(\vector{r_2},\vector{r})-D(\vector{r},\vector{r_3})+D(\vector{r_3},\vector{r_1})+2D(\vector{r_2},\vector{r_3})\right).
$$
We will prove that
$$D(\vector{r_1},\vector{r_2})-D(\vector{r_2},\vector{r})-D(\vector{r},\vector{r_3})+D(\vector{r_3},\vector{r_1})+2D(\vector{r_2},\vector{r_3})=0.  $$
To do this, we appeal once again to the bi-linearity properties
derived in Theorem \ref{thm:properties-2by2-det}, and observe, that
since we have a parallelogram,
$\vector{r}-\vector{r_3}=\vector{r_2}-\vector{r_1}$, which means
$\vector{r}=\vector{r_3}+\vector{r_2}-\vector{r_1}$. Thus
$$\begin{array}{lll}D(\vector{r_1},\vector{r_2})-D(\vector{r_2},\vector{r})-D(\vector{r},\vector{r_3})+D(\vector{r_3},\vector{r_1})+2D(\vector{r_2},\vector{r_3})
& = &
D(\vector{r_1},\vector{r_2})-D(\vector{r_2},\vector{r_3}+\vector{r_2}-\vector{r_1})+2D(\vector{r_2},\vector{r_3})\\
& & \quad
-D(\vector{r_3}+\vector{r_2}-\vector{r_1},\vector{r_3})+D(\vector{r_3},\vector{r_1})\\
& = &
D(\vector{r_1},\vector{r_2}-\vector{r_3})+D(\vector{r_3}+\vector{r_2}-\vector{r_1},\vector{r_2}-\vector{r_3})\\
& & \quad +2D(\vector{r_2},\vector{r_3})\\
& = & D(\vector{r_3}+\vector{r_2},\vector{r_2}-\vector{r_3}) +2D(\vector{r_2},\vector{r_3})\\
& = & D(\vector{r_3},\vector{r_2})-D(\vector{r_2},\vector{r_3}) +2D(\vector{r_2},\vector{r_3})\\
& = & D(\vector{r_3},\vector{r_2})-D(\vector{r_2},\vector{r_3})\\
 & = & 0,
\end{array}$$
as claimed. We have proved then that the area of a triangle, whose
vertices $(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$ are listed in
counterclockwise order, is
\begin{equation}\dfrac{1}{2}\left(
\det\begin{bmatrix} x_1 & x_2 \cr y_1 & y_2 \cr
\end{bmatrix}+ \det\begin{bmatrix} x_2 & x_3 \cr y_2 & y_3 \cr
\end{bmatrix}+\det\begin{bmatrix} x_3 & x_1 \cr y_3 & y_1 \cr
\end{bmatrix}\right).\label{eq:surveyorsn=3}
\end{equation}




\vspace*{5cm}
\begin{figure}[htpb]
\begin{minipage}{5.5cm}
\centering\psset{unit=1.5pc}
\pstGeonode[PosAngle={180,-90,90,0}](-1,-2){r_1}(2,1){r_2}(-2,2){r_4}(1,5){r_3}
\pspolygon[linewidth=2pt](r_1)(r_2)(r_3)(r_4)
\uput[d](r_1){$(x_1,y_1)$}
 \uput[r](r_2){$(x_2,y_2)$}
  \uput[u](r_3){$(x_3,y_3)$}
   \uput[l](r_4){$(x_4,y_4)$}
\vspace*{2cm}\footnotesize\hangcaption{Area of a
quadrilateral.}\label{fig:area-parallelogram2}
\end{minipage}
\begin{minipage}{5.5cm}
\centering\psset{unit=1.5pc}
\pstGeonode[PosAngle={180,90,180}](-1,-2){r_1}(2,1){r_2}(-2,2){r_3}
\pspolygon[linewidth=2pt](r_1)(r_2)(r_3) \uput[d](r_1){$(x_1,y_1)$}
 \uput[r](r_2){$(x_2,y_2)$}
  \uput[u](r_3){$(x_3,y_3)$}
\vspace*{2cm}\footnotesize\hangcaption{Area of a
triangle.}\label{fig:area-triangle1}
\end{minipage}
\begin{minipage}{5.5cm}
\centering\psset{unit=1.5pc}
\pstGeonode[PosAngle={180,45,180}](-1,-2){r_1}(2,1){r_2}(-2,2){r_3}
\pstGeonode[PosAngle={90}](1,5){r}
\pspolygon[linewidth=2pt](r_1)(r_2)(r_3) \uput[d](r_1){$(x_1,y_1)$}
 \uput[r](r_2){$(x_2,y_2)$}
  \uput[ul](r_3){$(x_3,y_3)$}
  \uput[l](r){$(x,y)$}
  \pstLineAB[linecolor=brown,linewidth=2pt,linestyle=dotted]{r_2}{r} \pstLineAB[linecolor=orange,linewidth=2pt,linestyle=dotted]{r_3}{r}
\vspace*{2cm}\footnotesize\hangcaption{Area of a
triangle.}\label{fig:area-triangle2}
\end{minipage}
\end{figure}





In general, we have the following theorem.

\begin{thm}[Surveyor's Theorem] Let  $(x_1,y_1)$, $(x_2,y_2)$,
\ldots , $(x_n,y_n)$ be the vertices of a simple (non-crossing)
polygon, listed in counterclockwise order. Then its area is given by
$$ \dfrac{1}{2}\left(
\det\begin{bmatrix} x_1 & x_2 \cr y_1 & y_2 \cr
\end{bmatrix}+ \det\begin{bmatrix} x_2 & x_3 \cr y_2 & y_3 \cr
\end{bmatrix}+\cdots + \det\begin{bmatrix} x_{n-1} & x_n \cr y_{n-1} & y_n \cr
\end{bmatrix}+ \det\begin{bmatrix} x_n & x_1 \cr y_n & y_1 \cr
\end{bmatrix}\right).  $$
\end{thm}
\begin{pf}
The proof is by induction on $n$. We have already proved the cases
$n=3$ and $n=4$ in (\ref{eq:surveyorsn=3}) and
(\ref{eq:surveyorsn=4}), respectively.
 Consider now a simple polygon $P$ with $n$ vertices. If $P$ is
 convex then we may take any vertex and draw a line to the other
 vertices, triangulating the polygon, creating $n-2$ triangles. If
 $P$ is not convex, then there must be a vertex that has
 a reflex angle. A ray produced from this vertex must hit another
 vertex, creating a diagonal, otherwise the polygon would have
 infinite area. This diagonal divides the polygon into two
 sub-polygons. These two sub-polygons are either both convex or at
 least  one is not convex. In the latter case, we repeat the
 argument, finding another diagonal and creating a new sub-polygon.
 Eventually, since the number of vertices is infinite, we end up
 triangulating the polygon. Moreover, the polygon can be triangulated in such a way
that all triangles inherit the positive orientation of the original
polygon but each neighbouring pair of triangles have opposite
orientations. Applying  (\ref{eq:surveyorsn=3}) we obtain that the
area is $$ \sum \det\begin{bmatrix}x_i & x_j \cr y_i & y_j \cr
\end{bmatrix},
$$where the sum is over each oriented edge. Since each diagonal occurs twice, but having opposite
orientations, the terms
$$ \det\begin{bmatrix}x_i & x_j \cr y_i & y_j \cr
\end{bmatrix} + \det\begin{bmatrix}x_j & x_i \cr y_j & y_i \cr
\end{bmatrix} =0, $$disappear from the sum and we are simply left
with
$$ \dfrac{1}{2}\left(
\det\begin{bmatrix} x_1 & x_2 \cr y_1 & y_2 \cr
\end{bmatrix}+ \det\begin{bmatrix} x_2 & x_3 \cr y_2 & y_3 \cr
\end{bmatrix}+\cdots + \det\begin{bmatrix} x_{n-1} & x_n \cr y_{n-1} & y_n \cr
\end{bmatrix}+ \det\begin{bmatrix} x_n & x_1 \cr y_n & y_1 \cr
\end{bmatrix}\right).  $$

\end{pf}


We may use the software Maple\TM in order to speed up computations
with vectors. Most of the commands we will need are in the
\verb+linalg+ package. For example, let us define two vectors,
$\vector{a}=\colvec{1\\ 2}$ and $\vector{b}=\colvec{2\\ 1}$ and a
matrix $A:=\begin{bmatrix} 1 & 2 \\ 3 & 4 \\
\end{bmatrix}$. Let us compute their dot product, find a unit vector in
the direction of $\vector{a}$, and the angle between the vectors.
(There must be either a colon or a semicolon at the end of each
statement. The result will not display if a colon is chosen.)

\bigskip

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(linalg):}{}
\mapleinline{active}{1d}{a:=vector([2,1]);}{}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[a := [2, 1]\]}
\end{maplelatex}
\mapleinline{active}{1d}{b:=vector([1,2]);}{}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[b := [1, 2]\]}
\end{maplelatex}
\mapleinline{active}{1d}{normalize(a);}{}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[ [\dfrac{2\sqrt{5}}{5},\dfrac{\sqrt{5}}{5} ]\]}
\end{maplelatex}
\mapleinline{active}{1d}{dotprod(a,b);}{}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[4\]}
\end{maplelatex}
\mapleinline{active}{1d}{angle(a,b);}{}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[\arccos\left(\dfrac{4}{5}\right)\]}
\end{maplelatex}
\mapleinline{active}{1d}{A:=matrix([[1,2],[3,4]]);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[A:=\begin{bmatrix} 1 & 2 \\ 3 & 4 \\
\end{bmatrix}\]}
\end{maplelatex}
\mapleinline{active}{1d}{det(A);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[-2\]}
\end{maplelatex}
\end{mapleinput}
\end{maplegroup}


\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Find all vectors $\vector{a}\in\reals^2$ such that  $\vector{a}\perp \colvec{-3\\
2}$ and $\norm{a} = \sqrt{13}$.
\begin{answer}
Upon solving the equations
$$-3a_1+2a_2=0, \qquad a_1 ^2 + a_2 ^2 = 13  $$
we find $(a_1,a_2)=(2,3)$ or $(a_1,a_2)=(-2,-3)$.
\end{answer}
\end{pro}
\begin{pro}[Pythagorean Theorem] If \mbox{$\vector{a} \perp
\vector{b}$}, prove that
$$||\vector{a} + \vector{b}||^2 = \norm{\vector{a}}^2 + \norm{\vector{b}}^2.
$$\label{cor:pythagoras} \index{theorem!Pythagoras'}
\begin{answer}
Since $\dotprod{a}{b} = 0$, we have
$$\begin{array}{lll}
||\vector{a} + \vector{b}||^2 & = & (\vector{a} + \vector{b})\bp (\vector{a} + \vector{b}) \\
& = & \vector{a}\bp\vector{a} + 2\vector{a}\bp\vector{b} +
\vector{b}\bp\vector{b} \\
& = & \vector{a}\bp\vector{a} + 0 +
\vector{b}\bp\vector{b} \\
& = & ||\vector{a}||^2 + ||\vector{b}||^2,
\end{array}$$from where the desired result follows.  \end{answer}
\end{pro}
\begin{pro}
Let $a, b$ be arbitrary real numbers. Prove that $$ (a^2+b^2)^2 \leq
2(a^4+b^4).
$$
\begin{answer}
By the CBS Inequality,
$$ (a^2\cdot 1 + b^2\cdot 1) \leq (a^4+b^4)^{1/2}(1^2+1^2)^{1/2},  $$
whence the assertion follows.
\end{answer}
\end{pro}

\begin{pro}
Let $\vector{a}, \vector{b}$ be fixed vectors in $\reals^2$. Prove
that if
$$\forall \vector{v}\in\reals^2, \vector{v}\bullet \vector{a} = \vector{v}\bullet \vector{b},$$then$\vector{a} = \vector{b}$.
\begin{answer}
 We have $\forall \vector{v}\in\reals^2, \vector{v}\bullet
(\vector{a} - \vector{b}) = 0.$ In particular, choosing $\vector{v}
= \vector{a} - \vector{b}$, we gather
$$(\vector{a} - \vector{b})\bp (\vector{a} - \vector{b}) = ||\vector{a} - \vector{b}||^2 =
0.$$But the norm of a vector is $0$ if and only if the vector  is
the $\vector{0}$ vector. Therefore $\vector{a} - \vector{b} =
\vector{0}$, i.e., $\vector{a} = \vector{b}$.

\end{answer}
\end{pro}


 \begin{pro}[Polarisation Identity]
Let $\vector{u}, \vector{v}$ be vectors in $\reals^2$. Prove that
$$\vector{u}\bullet\vector{v} = \frac{1}{4}\left(||\vector{u} + \vector{v}||^2 - ||\vector{u} - \vector{v}||^2 \right).$$
\begin{answer} We have $$\begin{array}{lll} ||\vector{u} + \vector{v}||^2
- ||\vector{u} - \vector{v}||^2 & = & (\vector{u} + \vector{v})\bp
(\vector{u} + \vector{v}) - (\vector{u}
- \vector{v})\bp (\vector{u} - \vector{v}) \\
&=& \dotprod{u}{u} + 2\dotprod{u}{v} + \dotprod{v}{v} -
(\dotprod{u}{u} - 2\dotprod{u}{v} + \dotprod{v}{v}) \\
&=& 4\dotprod{u}{v},
\end{array}$$giving the result.
\end{answer}
\end{pro}
\begin{pro}
Consider two lines on the plane $L_1$ and $L_2$  with Cartesian
equations $L_1: y = m_1x+b_1$ and $L_2: y = m_2x+b_1$, where
$m_1\neq 0$, $m_2\neq 0$. Using Corollary \ref{cor:condi-perp-vect},
prove that $L_1\perp L_2 \iff m_1m_2 =-1$. .
\begin{answer}
A parametric equation for $L_1$ is
$$\colpoint{x\\ y} = \colpoint{0\\ b_1} + t\colvec{1\\ m_1}.  $$
A parametric equation for $L_2$ is
$$\colpoint{x\\ y} = \colpoint{0\\ b_2} + t\colvec{1\\ m_2}.
$$The lines are perpendicular if and only if, according to Corollary
\ref{cor:condi-perp-vect},
$$ \colvec{1\\ m_1}\bp \colvec{1\\ m_2} = 0 \iff 1 + m_1m_2 =0 \iff m_1m_2=-1. $$
\end{answer}
\end{pro}
\begin{pro}Find the Cartesian equation of all lines $L'$ passing through $\colpoint{-1\\ 2}$ and making an
angle of $\dfrac{\pi}{6}$ radians with the Cartesian line $L:
x+y=1$.
\begin{answer}
The line $L$ has a parametric equation
$$ \colpoint{x\\ y} = \colpoint{0\\ 1} + t\colvec{1\\ -1}. $$
Let $L'$ have parametric equation $$\colpoint{x\\ y} = \colpoint{0\\
b} + t\colvec{1\\ m}.$$We need the angle between $\colvec{1\\ m}$
and $\colvec{1\\ -1}$ to be $\dfrac{\pi}{6}$ and so by Theorem
\ref{thm:cosanglebetween},
$$1 -m = \sqrt{1 + m^2}\sqrt{2}\cos \dfrac{\pi}{6} \implies m=-2\pm\sqrt{3}.  $$
This gives two possible values for the slope of $L'$. Now, since
$L'$ must pass through $\colpoint{-1\\ 2}$
$$ y = (-2\pm \sqrt{3})x +b \implies  2= (-2\pm \sqrt{3})(-1)+b \implies
b=\pm \sqrt{3}$$and the lines are $ y = (-2+\sqrt{3})x +\sqrt{3}$
and $ y = (-2-\sqrt{3})x -\sqrt{3}$, respectively.
\end{answer}
\end{pro}
\begin{pro}
Let $\vector{v},$ $\vector{w}$, be vectors on the plane, with
$\vector{w}\neq \vector{0}$.  Prove that the vector
\mbox{$\vector{a}=\vector{v}-
\dfrac{\dotprod{v}{w}}{\norm{\vector{w}}^2}\vector{w}$} is
perpendicular to $\vector{w}$.
\begin{answer}
We must prove that $\dotprod{a}{w}=0$. Using the distributive law for the dot product,
$$\begin{array}{lll}  \left(\vector{v}- \dfrac{\dotprod{v}{w}}{\norm{\vector{w}}^2}\vector{w}\right)\bullet \vector{w}
& = & \dotprod{v}{w} - \dfrac{\dotprod{v}{w}}{\norm{\vector{w}}^2}\dotprod{w}{w}\\
& = & \dotprod{v}{w} - \dfrac{\dotprod{v}{w}}{\norm{\vector{w}}^2}\norm{\vector{w}}^2\\
& = & \dotprod{v}{w} - \dotprod{v}{w}\\
& = & 0.\\
\end{array} $$
\end{answer}
\end{pro}

\end{multicols}






\section{Parametric Curves on the Plane}
\begin{df}
Let $[a; b] \subseteq \reals$. A {\em parametric curve}
representation $\point{r}$ of a curve $\Gamma$ is a function
$\point{r}:[a; b] \rightarrow \reals^2$, with
$$\point{r}(t) = \colpoint{x(t) \\ y(t)},$$and such that $\point{r}([a; b]) = \Gamma$. $\point{r}(a)$ is
the {\em initial point} of the curve and $\point{r}(b)$ its {\em
terminal point}. A curve is {\em closed} if its initial point and
its final point coincide. The {\em trace} of the curve $\point{r}$
is the set of all images of $\point{r}$, that is, $\Gamma$. If there
exist $t_1 \neq t_2$ such that $\point{r}(t_1) = \point{r}(t_2) =
\point{p}$, then $\point{p}$ is a {\em multiple point} of the curve.
The curve is {\em simple} if its has no multiple points. A closed
curve whose only multiple points are its endpoints is called a {\em
Jordan curve.}
\end{df}
\vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{4cm}
\centering\psset{unit=2pc}
\psaxes[labels=none, ticks=none]{->}(0,0)(-2,-2)(2,2)
\parametricplot[algebraic,linewidth=2pt,linecolor=red,plotpoints=5001]{0}{6.28}{sin(2*t)|cos(6*t)}
\vspace{2cm}\footnotesize\hangcaption{$x=\sin 2t$, $y =\cos 6t $.}\label{fig:param-1}
\end{minipage}\hfill
\begin{minipage}{4cm}
\centering\psset{unit=2pc}
\psaxes[labels=none, ticks=none]{->}(0,0)(-2,-2)(2,2)
\parametricplot[algebraic,linewidth=2pt,linecolor=red,plotpoints=5001]{-30}{10}{(2^(t/10))*cos(t)|(2^(t/10))*sin(t)}
\vspace{2cm}\footnotesize\hangcaption{$x=2^{t/10}\cos t$, $y =2^{t/10}\sin t $.} \label{fig:param-2}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering\psset{unit=2pc}
\psaxes[labels=none, ticks=none]{->}(0,0)(-2,-2)(2,2)
\parametricplot[algebraic,linewidth=2pt,linecolor=red,plotpoints=5001]{-2}{2}{(1-t^2)/(t^2+1)|(t^3-t)/(t^2+1)}
\vspace{2cm}\footnotesize\hangcaption{$x=\dfrac{1-t^2}{1+t^2}$, $y =\dfrac{t-t^3}{1+t^2} $.} \label{fig:param-3}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering\psset{unit=2pc}
\psaxes[labels=none, ticks=none]{->}(0,0)(-2,-2)(2,2)
\parametricplot[algebraic,linewidth=2pt,linecolor=red]{-4}{4}{(1+cos(t))/2|sin(t)*(1+cos(t))/2}
\vspace{2cm}\footnotesize\hangcaption{$x=(1+\cos t)/2$, $y =(\sin t)(1+\cos t)/2 $.} \label{fig:param-4}
\end{minipage}
\end{figure}


Graphing parametric equations is a difficult art, and a theory akin to the one studied for Cartesian equations in a first Calculus course
has been developed. Our interest is not in graphing curves, but in obtaining suitable parametrisations of simple Cartesian curves. We mention in passing however that
Maple has excellent capabilities for graphing parametric equations. For example, the commands to graph the various curves in figures
\ref{fig:param-1} through \ref{fig:param-4} follow.


\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):}{}
\mapleinline{active}{1d}{plot([sin(2*t),cos(6*t),t=0..2*Pi],x=-5..5,y=-5..5);}{}
\mapleinline{active}{1d}{plot([2^(t/10)*cos(t),2^(t/10)*sin(t),t=-20..10],x=-5..5,y=-5..5);}{}
\mapleinline{active}{1d}{plot([(1-t^2)/(1+t^2),(t-t^3)/(1+t^2),t=-2..2],x=-5..5,y=-5..5);}{}
\mapleinline{active}{1d}{plot([(1+cos(t))/2,sin(t)*(1+cos(t))/2,t=0..2*Pi],x=-5..5,y=-5..5);}{}
\end{mapleinput}
\end{maplegroup}



Our main focus of attention will be the following. Given a Cartesian
curve with equation $f(x,y)=0$, we wish to find suitable
parametrisations for them. That is, we want to find functions
$x:t\mapsto a(t)$, $y:t\mapsto b(t)$ and an interval $I$ such that
the graphs of $f(x,y)=0$ and $f(a(t),b(t))=0$, $t\in I$ coincide.
These parametrisations may differ in  features, according to the
choice of functions and the choice of intervals.
\begin{exa}
Consider the parabola with Cartesian equation $y=x^2$. We will give
various  parametrisations for portions of this curve.
\begin{enumerate}
\item If $x=t$ and $y=t^2$, then clearly $y=t^2=x^2$. This works for
every $t\in \reals$, and hence the parametrisation
$$ x=t, \quad y=t^2, \quad t\in \reals $$works for the whole curve.
Notice that as $t$ increases, the curve is traversed from left to
right.
\item If $x=\sqrt{t}$ and $y=t$, then again $y=t= (\sqrt{t})^2=x^2$. This works  only for
 $t\geq 0$, and hence the parametrisation
$$ x=\sqrt{t}, \quad y=t, \quad t\in [0;+\infty[ $$gives the half of the   curve for which $x\geq
0$. As $t$ increases, the curve is traversed from left to right.
\item Similarly, if $x=-\sqrt{t}$ and $y=t$, then again $y=t= (-\sqrt{t})^2=x^2$. This works  only for
 $t\geq 0$, and hence the parametrisation
$$ x=-\sqrt{t}, \quad y=t, \quad t\in [0;+\infty[ $$gives the half of the   curve for which $x\leq
0$. As $t$ increases, $x$ decreases, and so the curve is traversed
from right to left.
\item If $x=\cos t$ and $y=\cos^2t$, then again $y=\cos^2t= (\cos
t)^2=x^2$. Both $x$ and $y$ are periodic with period $2\pi$, and so
this parametrisation only agrees with the curve $y=x^2$ when $-1\leq
x \leq 1$. For $t\in [0;\pi]$, the cosine decreases from $1$ to $-1$
and so the curve is traversed from right to left in this interval.
\end{enumerate}
\end{exa}

\vspace{2cm}

\begin{figure}[htpb]
\begin{minipage}{4cm}\psset{unit=1pc}
\centering \psaxes[labels=none,ticks=none,
arrows={->}](0,0)(-5,0)(5,5)
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},arrowscale=1.2,algebraic]{-2.5}{2.5}{t|t^2}
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{-1}{1}{t|t^2}
\vspace{1cm}\footnotesize\hangcaption{$x=t, y=t^2$,
$t\in\reals$.}\end{minipage} \hfill
\begin{minipage}{4cm}\psset{unit=1pc}
\centering \psaxes[labels=none,ticks=none,
arrows={->}](0,0)(-5,0)(5,5)
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{0}{2.5}{sqrt(t)|t}
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{0}{1}{sqrt(t)|t}
\vspace{1cm}\footnotesize\hangcaption{$x=\sqrt{t}, y=t$, $t\in
[0;+\infty[$.}\end{minipage} \hfill
\begin{minipage}{4cm}\psset{unit=1pc}
\centering \psaxes[labels=none,ticks=none,
arrows={->}](0,0)(-5,0)(5,5)
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{0}{2.5}{-sqrt(t)|t}
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{0}{1.5}{-sqrt(t)|t}
\vspace{1cm}\footnotesize\hangcaption{$x=-\sqrt{t}, y=t$, $t\in
[0;+\infty[$.}\end{minipage} \hfill
\begin{minipage}{4cm}\psset{unit=1pc}
\centering \psaxes[labels=none,ticks=none,
arrows={->}](0,0)(-5,0)(5,5)
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{0}{3.1415}{cos(t)|(cos(t))^2}
\parametricplot[linewidth=2pt,linecolor=red,arrows={->},algebraic]{0}{1}{cos(t)|(cos(t))^2}
\vspace{1cm}\footnotesize\hangcaption{$x=\cos t, y=\cos ^2t$, $t\in
[0;\pi ]$.}\end{minipage}
\end{figure}





The identities $$ \cos^2\theta+\sin^2\theta =1, \qquad  \tan^2\theta
-\sec^2\theta =1, \qquad  \cosh^2\theta -\sinh^2\theta =1,
$$are often useful when parametrising quadratic curves.



\begin{exa}
Give two distinct parametrisations of the ellipse
$\dfrac{(x-1)^2}{4}+\dfrac{(y+2)^2}{9}=1$.
\begin{enumerate}
\item The first parametrisation must satisfy that as $t$ traverses the values in the interval $[0;2\pi]$,
one starts at the point $(3,-2)$, traverses the ellipse once
counterclockwise, finishing at $(3,-2)$.
\item The second parametrisation must satisfy that as $t$ traverses
the interval $[0;1]$, one starts at the point $(3,-2)$, traverses
the ellipse twice clockwise, and returns to $(3,-2)$.
\end{enumerate}
\end{exa}
\begin{solu}What formula do we know where a sum of two squares
equals
$1$? We use a trigonometric substitution, a sort of ``polar
coordinates.''  Observe that for $t\in [0;2\pi]$, the point $(\cos
t, \sin t)$ traverses the unit circle once, starting at $(1,0)$ and
ending there. Put
$$\dfrac{x-1}{2}=\cos t \implies x=1+2\cos t,  $$
and
$$\dfrac{y+2}{3}=\sin t \implies y=-2+3\sin t.  $$
Then
$$  x=1+2\cos t, \quad  y=-2+3\sin t, \quad t\in [0;2\pi] $$
is the desired first parametrisation.

\bigskip For the second parametrisation, notice that as $t$
traverses the interval $[0;1]$, $(\sin 4\pi t, \cos 4\pi t)$
traverses the unit interval twice, clockwise, but begins and ends at
the point $(0,1)$. To begin at the point $(1,0)$ we must make a
shift: $\left(\sin \left(4\pi t +\dfrac{\pi}{2} \right) , \cos
\left(4\pi t +\dfrac{\pi}{2} \right)\right)$ will start at $(1,0)$
and travel clockwise twice, as $t$ traverses $[0;1]$. Hence we may
take
$$  x=1+2\sin \left(4\pi t +\dfrac{\pi}{2} \right) , \quad  y=-2+3\cos  \left(4\pi t +\dfrac{\pi}{2} \right) , \quad t\in [0;1] $$
as our parametrisation.
\end{solu}

Some classic curves can be described by mechanical means, as the curves drawn by a spirograph. We will consider one such curve.
\vspace{4cm}
\begin{figure}[htpb]
\begin{minipage}{4cm}
\centering
\psset{unit=1.5pc}
\psaxes[labels=none,ticks=none](0,0)(-5,-5)(5,5)
\pstGeonode[PosAngle={-45,135}](0,0){O}(3;45){O'}
\pstGeonode[PointName=none,PointSymbol=none](4;45){a}(4,0){C}
\pstCircleOA{O}{a}\pstCircleOA{O'}{a}
\pstLineAB{O}{a}\rput(O'){\pstGeonode[PosAngle={-60,-45}](1;0){B}(1;-65){P}\psline(P)(O')(B)\pstMarkAngle[LabelSep=.7]{P}{O'}{B}{$\phi$}}
\pstProjection{O}{C}{P}[A]\psline(P)(A)\psline[linestyle=dotted](P)(O)
\pstMarkAngle{C}{O}{a}{$\theta$}
\vspace*{4cm}\footnotesize\hangcaption{Construction of the hypocycloid.}\label{fig:hypocycloid1}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=.5pc}
\psaxes[labels=none,ticks=none](0,0)(-10,-10)(10,10)
\parametricplot[plotpoints=501,linewidth=3\pslinewidth,algebraic]{-3.14}{3.14}{4*cos(t)+cos(4*t)|4*sin(t)-sin(4*t)}
 \vspace*{4cm}\footnotesize\hangcaption{Hypocycloid with $R=5$, $\rho=1$.}\label{fig:hypocycloid3}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=.5pc}
\psaxes[labels=none,ticks=none](0,0)(-10,-10)(10,10)
\parametricplot[plotpoints=501,linewidth=3\pslinewidth,algebraic]{-6.28}{6.28}{cos(t)+2*cos(t/2)|sin(t)-2*sin(t/2)}
 \vspace*{4cm}\footnotesize\hangcaption{Hypocycloid with $R=3$, $\rho=2$.}\label{fig:hypocycloid3}
\end{minipage}
\end{figure}





\begin{exa}\label{exa:hypocycloid} A {\em hypocycloid} is a curve traced out by a fixed point
$P$ on a circle ${\mathscr  C}$ of radius $\rho$ as ${\mathscr  C}$
rolls on the inside of a circle with centre at $O$ and radius $R$.
If the initial position of $P$ is $\colpoint{R\\ 0}$, and $\theta$
is the angle, measured counterclockwise, that a ray starting at $O$
and passing through the centre of ${\mathscr  C}$ makes with the
$x$-axis, shew that a parametrisation of the hypocycloid is
$$x = (R - \rho)\cos\theta + \rho\cos \left(\dfrac{(R - \rho)\theta}{\rho}\right),$$
$$y = (R - \rho)\sin\theta - \rho\sin\left(\dfrac{(R -
\rho)\theta}{\rho}\right).$$
\end{exa}

\begin{solu}
 Suppose that starting from $\theta = 0$, the centre $O'$ of the
small circle moves counterclockwise inside the larger circle by an
angle $\theta$, and the point $P = (x,y)$ moves clockwise an angle
$\phi$. The arc length travelled by the centre of the small circle
is $(R - \rho)\theta$ radians. At the same time the point $P$ has
rotated $\rho\phi$ radians, and so $(R - \rho)\theta = \rho\phi$.
See figure \ref{fig:hypocycloid1}, where $O'B$ is parallel to the
$x$-axis.

\bigskip

Let $A$ be the projection of $P$ on the $x$-axis. Then $\angle OAP = \angle OPO' = \dfrac{\pi}{2}$,
$\angle OO'P = \pi - \phi - \theta,$ $\angle POA = \dfrac{\pi}{2} -
\phi,$ and $OP = (R - \rho)\sin (\pi - \phi - \theta)$. Hence

$$x =  (OP)\cos \angle POA  = (R - \rho)\sin (\pi - \phi - \theta)\cos (\dfrac{\pi}{2} - \phi),$$
$$y = (R - \rho)\sin (\pi - \phi - \theta)\sin(\dfrac{\pi}{2} - \phi).$$
Now
$$\begin{array}{lll}x  & = & (R - \rho)\sin (\pi - \phi - \theta)\cos (\dfrac{\pi}{2} - \phi) \\
& = & (R - \rho)\sin (\phi + \theta)\sin\phi \\
& = & \dfrac{(R - \rho)}{2}(\cos\theta - \cos (2\phi + \theta) ) \\
& = &  (R - \rho)\cos \theta - \dfrac{(R - \rho)}{2}(\cos\theta +
\cos
(2\phi + \theta) )  \\
& = &  (R - \rho)\cos \theta - (R - \rho)(\cos (\theta + \phi )\cos
\phi ).\end{array}$$ Also, $\cos (\theta + \phi ) = -\cos (\pi -
\theta - \phi) = -\dfrac{\rho}{OO'} = -\dfrac{\rho}{R - \rho}$ and
$\cos \phi = \cos\left(\dfrac{(R - \rho)\theta}{\rho}\right)$ and so
$$x = (R - \rho)\cos \theta - (R - \rho)(\cos (\theta + \phi )\cos \phi = (R - \rho)\cos\theta + \rho\cos \left(\dfrac{(R - \rho)\theta}{\rho}\right), $$
as required. The identity for $y$ is proved similarly. A particular
example appears in figure \ref{fig:hypocycloid3}.
\end{solu}


\vspace*{4cm}
\begin{figure}[htpb]
\hfill\begin{minipage}{7cm} \centering\psset{unit=1pc}
\pstGeonode[PointName=none,dotscale=1.4](-4,5){A}(-7,10){B}(-9,8){C}(-10,
4){D}(-3,2){E}(0, 8){F}
\pscurve[linewidth=2pt](A)(B)(C)(D)(E)(F)\psline(A)(B)(C)(D)(E)(F)
\ncline{C}{D}\naput{$\d{\vector{x}}$}
\footnotesize\hangcaption{Length of a
curve.}\label{fig:lengthofacurve}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering\psset{unit=1pc}
\pstGeonode[PointName=none,dotscale=1.4](-4,5){A}(-7,10){B}(-9,8){C}(-10,
4){D}(-3,2){E}(0, 8){F} \pscurve[linewidth=2pt](A)(B)(C)(D)(E)(F)(A)
\psline(A)(B) \psline(A)(C) \psline(A)(D)\psline(A)(E)\psline(A)(F)
\pscustom[fillcolor=yellow,fillstyle=solid]{\pspolygon(D)(E)(A)}
\uput[dr](E){$\vector{x}+\d{\vector{x}}$} \uput[dl](D){$\vector{x}$}
 \psline(A)(B)(C)(D)(E)(F) \footnotesize\hangcaption{Area enclosed by a simple
closed curve} \label{fig:jordanarea}\end{minipage} \hfill
\end{figure}



\bigskip


Given a curve $\Gamma$ how can we find its length? The idea, as seen
in figure \ref{fig:lengthofacurve} is to consider the projections
$\d{x}, \d{y}$ at each point. The length of the vector
$$ \d{\point{r}} = \colvec{\d{x} \\ \d{y}}$$is $$
\norm{\d{\point{r}}} = \sqrt{(\d{x})^2 + (\d{y})^2 }.
$$Hence the length of $\Gamma$ is given by
\begin{equation}\label{eq:arc_length}
\int _\Gamma  \norm{\d{\point{r}}} = \int _\Gamma \ \sqrt{(\d{x})^2
+ (\d{y})^2}.
\end{equation}


Similarly, suppose that $\Gamma$ is a simple closed curve in
$\reals^2$. How do we find the (oriented) area of the region it
encloses? The idea, borrowed from finding areas of polygons, is to
split the region into triangles, each of area
$$\dfrac{1}{2}\det\begin{bmatrix} x& x+\d{x} \cr y & y+\d{y} \cr \end{bmatrix}=\dfrac{1}{2}\det\begin{bmatrix} x& \d{x} \cr y & \d{y} \cr \end{bmatrix}
= \dfrac{1}{2}(x\d{y} - y\d{x}),$$and to sum over the closed curve,
obtaining a total oriented area of
\begin{equation}\label{eq:area_inside_curve} \dfrac{1}{2}\oint
_\Gamma  \det\begin{bmatrix} x & \d{x} \cr y &\d{y}\cr
\end{bmatrix}   =   \dfrac{1}{2}\oint _\Gamma (x\d{y} - y\d{x}).\end{equation} Here $\dis{\oint _\Gamma}$ denotes integration around the
closed curve.

\vspace*{1cm}

\begin{figure}[htpb]
\begin{minipage}{7cm}
$$
\psset{unit=1pc} \psaxes[labels=none, ticks=none](0,0)(-3,-3)(3,3)
\parametricplot[linewidth=2pt,plotstyle=curve,algebraic]{0}{6.29}{3*cos(t)|sin(t)}
$$\vspace*{1cm}\caption{Example \ref{exa:ellipse}.} \label{fig:ellipse}
\end{minipage}
\hfill
\begin{minipage}{7cm}
$$
\psset{unit=1pc} \psaxes[labels=none, ticks=none](0,0)(-3,-3)(3,3)
\parametricplot[linewidth=2pt, plotstyle=ccurve]{0}{360}{t sin  3 exp 2 mul t cos 3 exp 2 mul}
$$\vspace*{1cm}\caption{Example \ref{exa:astroid}.} \label{fig:astroid}
\end{minipage}


\end{figure}


\begin{exa}
Let $(A, B)\in \reals^2, A > 0, B > 0$. Find a parametrisation of
the ellipse
$$\Gamma: \left\{(x, y)\in\reals^2:\dfrac{x^2}{A^2} +
\dfrac{y^2}{B^2} = 1\right\}.$$Furthermore, find an integral
expression for the perimeter of this ellipse and find the area it
encloses. \label{exa:ellipse}\end{exa}
\begin{solu} Consider the parametrisation $\Gamma:[0; 2\pi]\rightarrow
\reals^2$, with
$$\colvec{x \\ y} = \colvec{ A\cos t \\ B\sin t}. $$ This is a
parametrisation  of the  ellipse, for
$$\dfrac{x^2}{A^2} +
\dfrac{y^2}{B^2} = \dfrac{A^2\cos^2t}{A^2} + \dfrac{B^2\sin^2t}{B^2}
= \cos^2t + \sin^2t = 1.$$ Notice that this parametrisation goes
around once the ellipse counterclockwise. The perimeter of the
ellipse is given by
$$\int _\Gamma \norm{\d{\vector{r}}}   =  \int_0 ^{2\pi} \sqrt{A^2\sin^2 t + B^2\cos^2t} \ \d{t} .
$$The above integral is an {\em elliptic integral}, and we do not have a closed form for it (in terms of the elementary functions studied in
Calculus I). We will have better luck with the area of the ellipse,
which is given by
$$\renewcommand{\arraystretch}{1.7}\begin{array}{lll}\dfrac{1}{2}\oint _\Gamma (x\d{y} - y\d{x}) & = & \dfrac{1}{2}\oint (A\cos t\ {\rm d}(B\sin t) -  B\sin t\
{\rm
d }(A\cos t)) \\
 & = & \dfrac{1}{2}\int _0 ^{2\pi} (AB\cos^2t  +  AB\sin^2t))\ {\rm
d }t \\
& = &  \dfrac{1}{2}\int _0 ^{2\pi} AB\ {\rm
d }t \\
& = & \pi AB .\end{array}\renewcommand{\arraystretch}{1}.$$
\end{solu}




\begin{exa}
Find a parametric representation for the astroid
$$\Gamma: \left\{(x,y)\in\reals^2:x ^{2/3} + y ^{2/3} = 1\right\},$$ in figure \ref{fig:astroid}. Find the perimeter of the astroid and the
area it encloses. \label{exa:astroid}\end{exa} \begin{solu}
Take$$\colvec{x
\\ y} = \colvec{ \cos^3t \\ \sin^3 t}
$$ with $t\in[0; 2\pi]$.  Then
$$x ^{2/3} + y ^{2/3} = \cos^2t + \sin^2t = 1.$$
The perimeter of the astroid is
$$\renewcommand{\arraystretch}{1.7}\begin{array}{lll}\int _\Gamma ||\d{\point{r}}||  & = & \int _0 ^{2\pi} \sqrt{9\cos^4t\sin^2 t + 9\sin^4t\cos^2t} \ {\rm
d}t  \\
& = & \int _0 ^{2\pi} 3|\sin t\cos t| \ {\rm
d}t  \\
& = & \dfrac{3}{2}\int _0 ^{2\pi} |\sin 2t| \ {\rm d}t \\
& = & 6\int _0 ^{\pi /2} \sin 2t \ {\rm d}t \\
 & = & 6.
\end{array}\renewcommand{\arraystretch}{1}
$$The area of the astroid is given by
$$\renewcommand{\arraystretch}{1.7}\begin{array}{lll}\dfrac{1}{2}\oint _\Gamma (x\d{y} - y\d{x}) & = &
\dfrac{1}{2}\oint (\cos^3 t\ {\rm d}(\sin^3 t) -  \sin^3 t\ {\rm
d }(\cos^3 t)) \\
 & = & \dfrac{1}{2}\int _0 ^{2\pi} (3\cos^4t\sin^2t  +  3\sin^4t\cos^2t))\ {\rm
d }t \\
& = &  \dfrac{3}{2}\int _0 ^{2\pi} (\sin t\cos t)^2\ {\rm
d }t \\
& = & \dfrac{3}{8}\int _0 ^{2\pi} (\sin 2t)^2\ {\rm
d }t \\
& = & \dfrac{3}{16}\int _0 ^{2\pi} (1 - \cos 4t)\ {\rm
d }t \\
& = & \dfrac{3\pi}{8}.
\end{array}\renewcommand{\arraystretch}{1}$$


We can use Maple\TM (at least version 10) to calculate the above integrals. For example, if $(x,y)=(\cos^3t,\sin^3t)$, to compute the arc length we use the path integral
command and to compute the area, we use the line integral command with the vector field $\colvec{-y/2 \\ x/2}$.
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}
\mapleinline{active}{1d}{PathInt( 1, [x,y]=Path( <(cos(t))^3,(sin(t))^3>,0..2*Pi));}{}
\mapleinline{active}{1d}{LineInt( VectorField(<-y/2,x/2>), Path( <(cos(t))^3,(sin(t))^3>,0..2*Pi));}{}
\end{mapleinput}
\end{maplegroup}
\end{solu}
We include here for convenience, some Maple commands to compute various arc lengths and areas.

\begin{exa}
To obtain  the arc length of the path in figure  \ref{fig:arclength-line}, we type
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}
\mapleinline{active}{1d}{PathInt(1, [x,y] = LineSegments( <0,0>, <1,1>, <1,2> ,<2,1>,<3,3>,<4,1>);}{}
\end{mapleinput}
\end{maplegroup}
To obtain the arc length of the path in figure \ref{fig:arclength-arc}, we type
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}
\mapleinline{active}{1d}{PathInt(1, [x,y] =  Arc( Circle( <0,0>, 3), Pi/6, Pi/5 ) ;}{}
\end{mapleinput}
\end{maplegroup}
To obtain the area inside the curve in \ref{fig:area-heart}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}
\mapleinline{active}{1d}{LineInt( VectorField(<-y/2,x/2>),
Path( <(1+cos(t))*(cos(t))+1,(1+cos(t))*(sin(t))+2>,0..2*Pi));}{}
\end{mapleinput}
\end{maplegroup}

\end{exa}

\vspace{2cm}

\begin{figure}[htpb]
\begin{minipage}{4cm}
\psset{unit=1pc}
\psaxes[labelFontSize=\tiny,subticks=0](0,0)(-.1,-.1)(5,5)
\pstGeonode[PointName=none,dotscale=1.5](0,0){A}(1,1){B}(1,2){C}(2,1){D}(3,3){E}(4,1){F}
\psline(A)(B)(C)(D)(E)(F)
\vspace{1cm}\footnotesize\hangcaption{Line Path.}
\label{fig:arclength-line}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\psset{unit=1pc}
\psaxes[labelFontSize=\tiny,subticks=0](0,0)(-.1,-.1)(5,5)
\pstGeonode[PointName=none,dotscale=1.5](0,0){A}(3;72){B}(3;30){C}
\pstArcOAB{A}{C}{B}
\vspace{1cm}\footnotesize\hangcaption{Arc of circle  of radius $3$, angle $\dfrac{\pi}{6}\leq\theta \leq \dfrac{\pi}{5}$.}
\label{fig:arclength-arc}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\psset{unit=1pc}
\psaxes[labelFontSize=\tiny,subticks=0](0,0)(-.1,-.1)(5,5)
\parametricplot[linewidth=2pt,linecolor=red,algebraic]{0}{6.14}{(1+cos(t))*(cos(t))+1|(1+cos(t))*(sin(t))+2}
\vspace{1cm}\footnotesize\hangcaption{$x=1+(1+\cos t)(\cos t), y=2+(1+\cos t)(\sin t)$.}
\label{fig:area-heart}
\end{minipage}
\hfill

\end{figure}



\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
A curve is represented parametrically by $x(t) = t^3 - 2t$, $ y(t) =
t^3 + 2t$. Find its Cartesian equation.
\begin{answer}
We have $y-x = 4t \implies t = \dfrac{y-x}{4}$ and so
$$x = \left(\dfrac{y-x}{4}\right)^3 -2\left(\dfrac{y-x}{4}\right)
$$is the Cartesian equation sought.
\end{answer}
\end{pro}

\begin{pro}
Give an implicit Cartesian equation for the parametric
representation $x=\dfrac{t^2}{1+t^5}, \ y = \dfrac{t^3}{1+t^5}$.
\begin{answer}
Observe that for $t\neq \{0,-1\}$, $$ \dfrac{y}{x} = t \implies x=
\dfrac{\left(\dfrac{y}{x}\right)^2}{1+ \left(\dfrac{y}{x}\right)^5}
\implies x = \dfrac{y^2x^3}{x^5+y^5} \implies x^5+y^5 = x^2y^2.
$$If $t=0$, then $x=0, y=0$ and our Cartesian equation agrees. What
happens as $t\to -1$?
\end{answer}
\end{pro}
\begin{pro}
Let $a, b, c, d$ be strictly positive real constants. In each case
give an implicit Cartesian equation for the parametric
representation and describe the trace of the parametric curve.
\begin{enumerate}
\item $x=at+b$, $y=ct+d$
\item $x=\cos t$, $y=0$
\item $x=a\cosh t$, $y=b\sinh t$
\item $x=a\sec t$, $y = b\tan t$, $t\in ]-\frac{\pi}{2}; \frac{\pi}{2}[$
\end{enumerate}
\begin{answer}
\noindent
\begin{enumerate}
\item $ay - cx = ad - bc$, this is a straight line with positive
slope.
\item $-1\leq x \leq 1, y=0$, this is the line segment on the plane
joining $(-1,0)$ to $(1,0)$.
\item $\dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}=1$, $x>0$. This is one  branch of a hyperbola.
\item $\dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}=1$. This is  a hyperbola.
\end{enumerate}
\end{answer}
\end{pro}
\begin{pro}
Parametrise the curve $y = \log \cos x$ for $0 \leq x \leq \dfrac{\pi}{3}$. Then find its arc length.
\begin{answer}
We may simply give the trivial parametrisation: $x=t$, $y = \log \cos t$, $0 \leq t \leq \dfrac{\pi}{3}$.  Then
$$ (\d{x})^2+(\d{y})^2 = (1+\tan^2t)(\d{t})^2=\sec^2t(\d{t})^2.  $$
Hence the arc length is
$$ \int _0 ^{\pi/3}\sec t\d{t} =\log (2+\sqrt{3}) .  $$
\end{answer}
\end{pro}
\begin{pro}
Describe the trace of the parametric curve
$$ \colvec{x\\ y}= \colvec{\sin t \\ 2\sin t + 1}, \quad t\in [0;4\pi]. $$
\begin{answer}
Observe that $y=2x+1$, so the trace is part of this line. Since in the interval $[0;4\pi]$, $-1\leq \sin t \leq 1$, we want the
portion of the line $y=2x+1$ with $-1\leq x \leq 1$ (and, thus $-1 \leq y \leq 3$). The curve starts at the middle point $(0,1)$ (at $t=0$),
reaches the high point $(1,3)$ at $t=\dfrac{\pi}{2}$,
reaches its low point
$(-1,1)$ at $t=\dfrac{3\pi}{2}$,
reaches its high point $(1,3)$ again at $t=\dfrac{5\pi}{2}$,
it goes to its low point $(-1,1)$ at $t=\dfrac{7\pi}{2}$, and
finishes in the middle point $(0,1)$ when $t=4\pi$.
\end{answer}
\end{pro}


\begin{pro}
\label{pro:parametric} Consider the plane curve defined implicitly
by $\sqrt{x}+\sqrt{y}=1$. Give a suitable parametrisation of this
curve,  and find its length.
The graph of the curve appears in figure \ref{fig:parametric}.
\begin{answer} First observe that $\sqrt{x}+\sqrt{y}=1$ demands $x\in [0;1]$
and $[0;1]$. Again, one can give many parametrisations. One is
$x=t^2,\ y = (1-t)^2$, $t\in [0;1]$. This gives
$$ \sqrt{(\d{x})^2+(\d{y})^2} =\sqrt{4t^2+(2-2t)^2}\ \d{t}=2\sqrt{2t^2-2t+1}\ \d{t}=\dfrac{2}{\sqrt{2}}\sqrt{4\left(t-\dfrac{1}{2}\right)^2+1}\ \d{t}. $$
To integrate
$$ \dfrac{2}{\sqrt{2}}\int _0 ^1 \sqrt{4\left(t-\dfrac{1}{2}\right)^2+1}\ \d{t}, $$
we now use the trigonometric substitution
$$2\left(t-\dfrac{1}{2}\right) = \tan \theta \implies  \d{t} =\dfrac{1}{2}\sec^2\theta\d{\theta}.$$
The integral thus becomes
$$\sqrt{2}\int _0 ^{\pi/4} \sec^3\theta  \d{\theta},  $$
the famous secant cube integral, which is a standard example of
integration by parts where you ``solve'' for the integral. (You
write $\int \sec\theta \d{\tan\theta} = \tan\theta\sec\theta -\int
\tan\theta\d{\sec\theta}$, etc.) I will simply quote it, as I assume
most of you have seen it, and it appears in most Calculus texts:
$$\begin{array}{lll}\sqrt{2}\dint _0 ^{\pi/4} \sec^3\theta  \d{\theta} & =  &
\sqrt{2}\left(\dfrac{1}{2}\sec\theta\tan\theta  -\dfrac{1}{2}\log
|\sec\theta+\tan\theta|\right) _0 ^{\pi/4}\\
& = & \sqrt{2}\left(\dfrac{1}{2}\cdot \sqrt{2} + \dfrac{1}{2}\log
(\sqrt{2} +1)\right)\\ & = & \dfrac{1}{\sqrt{2}}\log (\sqrt{2}
+1)+1.
\end{array}$$
\end{answer}
\end{pro}
\vspace{1cm}
\begin{figurehere}
\centering \psset{unit=2pc}
\psaxes[labelFontSize=\tiny]{->}(0,0)(-1.5,-1.5)(1.5,1.5)
\parametricplot[algebraic,linewidth=2pt,linecolor=red]{0}{1}{t^2|(1-t)^2}
\vspace{1cm}\footnotesize\hangcaption{Problem
\ref{pro:parametric}.}\label{fig:parametric}
\end{figurehere}
\begin{pro}
Consider the graph given parametrically by $x(t)=t^3+1$,
$y(t)=1-t^2$. Find the area under the graph, over the $x$ axis, and
between the lines $x=1$ and $x=2$.
\begin{answer}
First notice that $x=1 \implies t^3+1 = 1 \implies t = 0$ and $x=2
\implies t^3+1 = 2 \implies t=1$. The area under the graph is $$
\int _{t=0} ^{t=1} y\d{x} = \int _{t=0} ^{t=1} (1-t^2)\d{(t^3+1)} =
\int _{t=0} ^{t=1} 3t^2(1-t^2)\d{t} = \dfrac{2}{5}.
$$
\end{answer}
\end{pro}
\begin{pro}
Find the  arc length of the curve given parametrically by
$x(t)=3t^2$, $y(t)=2t^3$ for \mbox{$0\le t\le 1$}.
\begin{answer}
Observe that $$\d{x} = 6t\d{t}; \quad \d{y} = 6t^2\d{t} \implies
\sqrt{(\d{x})^2 + (\d{y})^2} = 6t\sqrt{1 + t^2}\ \d{t},
$$and so the arc length is
$$ \int _{t=0} ^{t=1}\sqrt{(\d{x})^2 + (\d{y})^2} = \int _{t=0} ^{t=1} 6t\sqrt{1 + t^2}\ \d{t} =
4\sqrt{2}-2.$$
\end{answer}
\end{pro}
\begin{pro}
Let $\mathscr{C}$ be the curve in $\reals^2$ defined by
 $$x(t) = \dfrac{t^2}{2},\quad  y(t) =\dfrac{(2t+1)^{3/2}}{3}, \quad  t\in [-\dfrac{1}{2};+\dfrac{1}{2}].$$
 Find the length of this curve.
 \begin{answer}
Observe that $$\d{x} = t\d{t}, \qquad \d{y}=\sqrt{2t+1}\d{t}\implies
\sqrt{(\d{x})^2+(\d{y})^2}=\sqrt{t^2 +(\sqrt{2t+1})^2}\d{t}
=\sqrt{t^2+2t+1}\d{t} = (t+1)\d{t}.  $$ Hence, the arc length is
$$ \int _{-1/2} ^{1/2}(1+t)\d{t} =\left(t+\dfrac{t^2}{2}\right)  _{-1/2} ^{1/2} =1. $$
 \end{answer}
\end{pro}


\begin{pro}\label{pro:parametric2}
Find the area enclosed by the curve $x(t)  = \sin^3t, y(t) = (\cos
t)(1 + \sin^2t)$. The curve appears in figure \ref{fig:parametric2}.\begin{answer} Observe that the parametrisation
traverses the curve once clockwise if $t\in [0;2\pi]$.  The area is
given by
$$\begin{array}{lll}
\dfrac{1}{2}\oint _\Gamma\det \begin{bmatrix} x &\d{x} \cr y & \d{y}
\cr
\end{bmatrix} & = & \dfrac{1}{2}\oint x\d{y} - y\d{x} \\
& = & \dfrac{4}{2}\int _{\pi/2} ^0 (\sin^3t(-\sin t(1 + \sin^2t) +
2\sin t\cos^2t) \\ & & \quad -  \cos t(1 + \sin^2t)(3\sin^2t\cos t))\d{t} \\
& = & 2\int _{\pi/2} ^0 (-3\sin^2t + \sin^4t)\d{t} \\
& = & 2\int _{\pi/2} ^0 \left(-\dfrac{9}{8} + \cos 2t +
\dfrac{1}{8}\cos 4t\right)\d{t} \\
& = & \dfrac{9\pi}{8}.
\end{array}$$
\end{answer}
\end{pro}
\vspace{1cm}
\begin{figurehere}
\centering \psset{unit=2pc}
\psaxes[labels=none,ticks=none]{->}(0,0)(-1.5,-1.5)(1.5,1.5)
\parametricplot[algebraic,linewidth=2pt,linecolor=red,plotpoints=501]{-8}{8}{(sin(t))^3|(cos(t))*(1+(sin(t))^2)}
\vspace{1cm}\footnotesize\hangcaption{Problem
\ref{pro:parametric2}.}\label{fig:parametric2}
\end{figurehere}
\begin{pro}\label{pro:parametric3}
Let $\mathscr{C}$ be the curve in $\reals^2$ defined by
 $$x(t) = \dfrac{3t}{1+t^3},\quad  y(t) =\dfrac{3t^2}{1+t^3}, \quad  t\in \reals\setminus\{-1\},$$
 which you may see in figure \ref{fig:parametric3}.
 Find the area enclosed by the loop of this curve.
\begin{answer}
Using the quotient rule,
$$ \d{x} =\dfrac{3(1+t^3)-3t^2(3t)}{(1+t^3)^2}\cdot \d{t} = \dfrac{3-6t^3}{(1+t^3)^2}  \cdot \d{t} \implies y\d{x}= \dfrac{9t^2-18t^5}{(1+t^3)^3}  \cdot \d{t} $$
and
$$ \d{y} =\dfrac{6t(1+t^3)-3t^2(3t^2)}{(1+t^3)^2}\cdot \d{t} = \dfrac{6t-3t^4}{(1+t^3)^2}  \cdot \d{t} \implies x\d{y}= \dfrac{18t^2-9t^5}{(1+t^3)^3}  \cdot \d{t} $$
Hence
$$x\d{y}-y\d{x}= \dfrac{18t^2-9t^5}{(1+t^3)^3}  \cdot \d{t}-  \dfrac{9t^2-18t^5}{(1+t^3)^3}  \cdot \d{t}=  \dfrac{9t^2+9t^5}{(1+t^3)^3}  \cdot \d{t}=
\dfrac{9t^2(1+t^3)}{(1+t^3)^3}  \cdot \d{t}= \dfrac{9t^2}{(1+t^3)^2}
\cdot \d{t} .
$$
Observe that when $t=0$ then $x=y=0$. As $t\to +\infty$, then $x\to 0$ and $y\to 0$. Hence to obtain the loop
Using integration by substitution ($u = 1+t^3$ and $\d{u} = 3t^2\d{t}$) , the area is given by
$$ \dfrac{1}{2}\int _0 ^{+\infty}  \dfrac{9t^2}{(1+t^3)^2}
\cdot \d{t} =  \dfrac{3}{2}\int _0 ^{+\infty} \dfrac{3t^2}{(1+t^3)^2}\d{t}   = \dfrac{3}{2}\int _1
^{+\infty} \dfrac{\d{u}}{u^2}= \dfrac{3}{2}.$$

\begin{rem}
A shorter way of obtaining $x\d{y}-y\d{x}$ would have been to argue that $x\d{y}-y\d{x}=x^2\d{\left(\dfrac{y}{x}\right)} = \dfrac{9t^2}{(1+t^3)^2}\d{t}$.
\end{rem}

\end{answer}
\end{pro}

\vspace{1cm}
\begin{figurehere}
\centering \psset{unit=2pc}
\psaxes[labelFontSize=\tiny]{->}(0,0)(-1.5,-1.5)(1.5,1.5)
\parametricplot[algebraic,linewidth=2pt,linecolor=red,plotpoints=1001]{-2.5}{-50}{3*t/(1+t^3)|3*(t^2)/(1+t^3)}
\parametricplot[algebraic,linewidth=2pt,linecolor=red,plotpoints=1001]{-.5}{100}{3*t/(1+t^3)|3*(t^2)/(1+t^3)}
\vspace{1cm}\footnotesize\hangcaption{Problem
\ref{pro:parametric3}.}\label{fig:parametric3}
\end{figurehere}


\begin{pro}\label{pro:cycloid} Let $P$ be a point at a distance $d$
from the centre of a circle of radius $\rho$. The curve traced out
by $P$ as the circle rolls along a straight line, without slipping, is called a {\em
cycloid}. Find a parametrisation of the cycloid.
\begin{answer}See figure \ref{fig:cycloid}. Let $\theta$ be the angle (in radians) of rotation of the
circle, and let $C$ be the centre of the circle. At $\theta = 0$ the
centre of the circle is at $(0,\rho)$, and $P = (0,\rho-d).$ Suppose the circle is displaced towards the right, making
the point $P$ to rotate an angle of $\theta $ radians.
Then the centre of the circle has displaced $r\theta$ units
horizontally, and so is now located at $(\rho\theta,\rho)$. The polar coordinates of the point $P$ are $(d\sin\theta;
d\cos\theta)$, in relation to the centre of the circle (notice
that the circle moves clockwise). The point $P$ has moved $x =
\rho\theta - d\sin\theta$ horizontal units and $y = \rho -
d\cos\theta$ units. This is the desired parametrisation.
\end{answer}

\vspace{4cm}
\begin{figurehere}
\centering \psset{unit=3pc}
\psaxes[labels=none,ticks=none](0,0)(3,0)(0,3)
\pstGeonode[PointName=none](0,0){O'}
\rput(1.57075,0){\pstGeonode[PosAngle={0,135,-90}](0,1){C}(-.5,1){P}(0,0){B}\pstCircleOA{C}{B}\pcline(C)(B)\naput{$\rho$}\pcline(C)(P)\Bput{$d$}\pstMarkAngle[LabelSep=.5]{P}{C}{B}{$\theta$}}
\parametricplot[linewidth=2pt,algebraic,linecolor=red]{0}{3.15}{t-.5*sin(t)|1-.5*cos(t)}
\vspace{1cm}\footnotesize\hangcaption{Cycloid}\label{fig:cycloid}
\end{figurehere}
\end{pro}
\begin{pro}
Find the arc length of the arc of the cycloid $x=\rho (t-\cos t)$,
$y = \rho (1-\cos t)$, $t\in [0;2\pi]$.
\end{pro}

\begin{pro}
Find the length of the parametric curve given by
$$ x=e^t\cos t, \qquad y = e^t\sin t, \qquad t\in [0;\pi]. $$
\begin{answer}
We have
$$ \d{x}=e^t(\cos t-\sin t)\d{t}, \  \d{y}=e^t(\sin t+\cos t)\d{t}\implies \sqrt{(\d{x})^2+(\d{y})^2}=
e^t\sqrt{(\cos t-\sin t)^2+(\sin t+\cos t)^2}\d{t}=\sqrt{2}e^t\d{t}.
$$The arc length is thus
$$ \int _0 ^\pi \sqrt{(\d{x})^2+(\d{y})^2} = \sqrt{2}\int _0 ^\pi e^t\d{t} = \sqrt{2}(e^\pi -1).  $$
\end{answer}
\end{pro}

\begin{pro}
A shell strikes an airplane flying at height $h$ above the ground.
It is known that the shell was fired from a gun on the ground with a
muzzle velocity of magnitude $V$, but the position of the gun and
its angle of elevation are both unknown. Deduce that the gun is
situated within a circle whose centre lies directly below the
airplane and whose radius is $$ \dfrac{V\sqrt{V^2-2gh}}{g}. $$ \\
\begin{answer}
Choose coordinates so that the origin is at the position of the gun,
the $y$-axis is vertical, and the airplane is on a point with
coordinates $(u, h)$ with $u\geq 0$.

\bigskip

If the gun were fired at $t=0$, then $$x = Vt\cos a; \quad y =
Vt\sin a - \dfrac{gt^2}{2},
$$where $a$  is the angle of elevation, $t$ is the time and $g$ is the acceleration due to gravity.  Since
we know that the shell strikes the plane, we must have $$u = Vt\cos
a; \quad h = Vt\sin a - \dfrac{gt^2}{2},
$$whence $$u^2 + \left(h + \frac{1}{2}gt^2\right)^2=V^2t^2,  $$
and thus $$ \dfrac{g^2t^4}{4} + (gh-V^2)^2t^2 + h^2+u^2 = 0.$$The
quadratic equation in $t^2$ has a real root if $$(gh-V^2)^2 \geq
g^2(h^2+u^2) \implies g^2u^2 \leq V^2(V^2-2gh),
$$from where the assertion follows.
\end{answer}

\end{pro}
\begin{pro}
The parabola $y^2=-4px$ rolls without slipping around the parabola
$y^2=4px$. Find the equation of the locus of the vertex of the
rolling parabola.
\begin{answer}Suppose the parabolas have a point of contact $P=(4px_0 ^2,4px_0)$.
By symmetry, the vertex $V$ of the rolling parabola is the reflexion
of the   origin about the line tangent to their point of contact.
The slope of the tangent at $P$ is $\dfrac{1}{2x_0}$, from where the
equation of the tangent is $$y = \dfrac{x}{2x_0} + 2px_0.  $$The
line normal to this line and passing through the origin is hence $$
y = -2xx_0,$$ and so the lines intersect at $$ \left(-\dfrac{4px_0
^2}{1+4x_0 ^2}, \dfrac{8px_0 ^3}{1+4x_0 ^2}\right),
$$from where $$V =  \left(-\dfrac{8px_0
^2}{1+4x_0 ^2}, \dfrac{16px_0 ^3}{1+4x_0 ^2}\right):= (x(t),y(t)).
$$As $-2x_0x(t) = y(t)$, eliminating $t$ yields $$ x = -\dfrac{2p\left(\frac{y}{x}\right)^2}{1+ \left(\frac{y}{x}\right)^2}  $$
or $$(x^2+y^2)x+2py^2=0, $$giving the equation of the
locus.\end{answer}

\end{pro}

\end{multicols}

\section{Vectors in Space}

\begin{df}
The $3$-dimensional Cartesian Space is defined and denoted by
$$ \reals^3= \left\{\point{r}=(x,y,z): x\in \reals, \ y\in\reals, \ z\in\reals\right\}. $$
\end{df}
In figure \ref{fig:point-in-space} we have pictured the point $(2,1,3)$.

\vspace*{5cm}
\begin{figure}[htpb]
\centering \pstThreeDCoor[IIIDticks=true,xMin=
-3,xMax=3,yMin=-3,yMax=3,zMin=-3,zMax=5]
\psset{dotstyle=*,linecolor=red,drawCoor=true}
\pstThreeDDot[dotscale=1.2](2,1,3)\pstThreeDLine[linestyle=dashed](2,1,3)(0,0,3)
\vspace*{3cm}\footnotesize\hangcaption{A point in
space.}\label{fig:point-in-space} \label{fig:lines3d}
\end{figure}


Having oriented the $z$ axis upwards, we have a choice for the
orientation of the the $x$ and $y$-axis. We adopt a convention known
as a {\em right-handed coordinate system}, as in figure
\ref{fig:righthanded}. Let us explain. In analogy to $\reals^2$ we
put
$$\vector{i} = \colvec{1\\ 0 \\ 0}, \qquad \vector{j} = \colvec{0\\ 1 \\ 0}, \qquad \vector{k} = \colvec{0\\ 0 \\ 1},   $$
and observe that
$$ \point{r}=(x,y,z) = x\vector{i}+  y\vector{j}+  z\vector{k}.$$



Most of what we did in $\reals^2$ transfers to $\reals^3$ without
major complications.




 \vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{4cm}
$$\psset{unit=1pc}
\psline[linewidth=1.5pt, linecolor=red]{->}(0,0)(3,
0)\uput[r](3,0){\vector{j}} \psline[linewidth=1.5pt,
linecolor=blue]{->}(0,0)(0, 3)\uput[u](0,3){\vector{k}}
\psline[linewidth=1.5pt, linecolor=magenta]{->}(0,0)(-2.213,
-2.213)\uput[d](-2.213,-2.213){\vector{i}} \uput[r](3,0){\vector{j}}
$$\vspace*{3cm}\footnotesize\hangcaption{Right-handed system.} \label{fig:righthanded}\end{minipage}
\hfill
\begin{minipage}{4cm}
\includegraphics[height=3cm]{right-hand-rule}
\vspace*{1cm}\footnotesize\hangcaption{Right Hand.}\end{minipage}
\begin{minipage}{4cm}
$$\psset{unit=1pc}
\psline[linewidth=1.5pt, linecolor=red]{->}(0,0)(-3,
0)\uput[l](-3,0){\vector{j}} \psline[linewidth=1.5pt,
linecolor=blue]{->}(0,0)(0, 3)\uput[u](0,3){\vector{k}}
\psline[linewidth=1.5pt, linecolor=magenta]{->}(0,0)(-2.213,
-2.213)\uput[d](-2.213,-2.213){\vector{i}}
\uput[l](-3,0){\vector{j}}
$$\vspace*{3cm}\footnotesize\hangcaption{Left-handed system.}\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1.5pc} \ThreeDput[normal=0 .2
1](0,0,1){\pscustom[fillcolor=yellow,fillstyle=solid]{\psline(-2,-2)(2,-2)(2,1)(-2,1)(-2,-2)}}
\ThreeDput[normal=0 .2
1](1,0,-2){\pscustom[fillcolor=yellow,fillstyle=solid]{\psline(-2,-2)(2,-2)(2,1)(-2,1)(-2,-2)}}
\ThreeDput[normal=0 .2
1](0,0,1){\psline[linewidth=3pt,linecolor=red](-.5,-2)(2,1)\psline[linewidth=3pt,linecolor=blue](2,-2)(-1,1)}
\ThreeDput[normal=0 .2
1](1,0,-2){\psline[linewidth=3pt,linecolor=magenta](2,-2)(-1,1)}
\uput[r](1,-2){$\ell _1$} \uput[r](0,.5){$\ell _2$}
\uput[r](-1,1){$\ell _3$}
\vspace*{3cm}\footnotesize\hangcaption{$\ell _1 \parallel \ell _2$.
$\ell _1$ and $\ell _3$ are skew.} \label{fig:lines3d}
\end{minipage}
\end{figure}



\bigskip









\begin{df}
The dot product of two vectors $\vector{a}$ and $\vector{b}$ in
$\reals^3$ is
$$\dotprod{a}{b} = a_1b_1+a_2b_2+a_3b_3.  $$ The norm of a vector
$\vector{a}$ in $\reals^3$ is $$ \norm{\vector{a}} =
\sqrt{\dotprod{a}{a}} = \sqrt{(a_1)^2+(a_2)^2+(a_3)^2}.
$$
\end{df}
Just as in $\reals^2$, the dot product satisfies $\dotprod{a}{b} =
\norm{\vector{a}}\norm{\vector{b}}\cos \theta$, where $\theta\in
[0;\pi]$ is the convex angle between the two vectors.



The Cauchy-Schwarz-Bunyakovsky Inequality takes the form

$$|\dotprod{a}{b}|\leq
\norm{\vector{a}}\norm{\vector{b}} \implies |a_1b_1+a_2b_2+a_3b_3|\leq (a_1 ^2+a_2 ^2 + a_3 ^2)^{1/2} (b_1 ^2+b_2 ^2 + b_3 ^2)^{1/2},   $$
equality holding if an only if the vectors are parallel.
\begin{exa}
Let $x,y,z$ be positive real numbers such that $x^2+4y^2+9z^2=27$. Maximise $x+y+z$.
\end{exa}
\begin{solu}
Since $x,y,z$ are positive, $|x+y+z|=x+y+z$. By Cauchy's Inequality,
$$|x+y+z|=\left|x+2y\left(\dfrac{1}{2}\right)+3z\left(\dfrac{1}{3}\right)\right|\leq (x^2+4y^2+9z^2)^{1/2}\left(1+\dfrac{1}{4}+\dfrac{1}{9}\right)^{1/2}=\sqrt{27}\left(\dfrac{7}{6}\right)=\dfrac{7\sqrt{3}}{2}.  $$
Equality occurs if and only if
$$ \colvec{x\\ 2y \\ 3z}=\lambda \colvec{1 \\ 1/2 \\ 1/3}\implies x=\lambda , y = \dfrac{\lambda}{4}, z=\dfrac{\lambda}{9} \implies \lambda ^2+\dfrac{\lambda ^2}{4}+\dfrac{\lambda ^2}{9} =27\implies \lambda = \pm \dfrac{18\sqrt{3}}{7}.  $$
Therefore for a maximum we take
$$x=\dfrac{18\sqrt{3}}{7}, \quad y = \dfrac{9\sqrt{3}}{14}, \quad z = \dfrac{2\sqrt{3}}{7}.  $$
\end{solu}




\begin{df}
Let $\point{a}$ be a point in $\reals^3$ and let $\vector{v}\neq
\vector{0}$ be a vector in $\reals^3$. The {\em parametric line}
passing through $\point{a}$ in the direction of $\vector{v}$ is the
set
$$ \left\{\point{r}\in\reals^3:\point{r}=\point{a}+t\vector{v} \right\}. $$
\end{df}


\begin{exa}
Find the parametric equation of the line passing through $\colpoint{1 \\ 2\\
3}$ and  $\colpoint{-2\\ -1 \\ 0}$.
\end{exa}
\begin{solu} The line follows the direction $$ \colvec{1 - (-2) \\ 2 - (-1)
\\ 3 - 0} = \colvec{3\\ 3 \\ 3}.
$$ The desired equation is $$\colpoint{x \\ y \\ z} =  \colpoint{1 \\
2\\ 3} + t\colvec{3\\ 3 \\ 3}.   $$
\end{solu}

\begin{rem}
Given two lines in space, one of the following three situations
might arise: (i) the lines intersect at a point, (ii) the lines are
parallel, (iii) the lines are skew (non-parallel, one over the
other, without intersecting, lying on different planes). See figure
\ref{fig:lines3d}.
\end{rem}




Consider now two non-zero vectors $\vector{a}$ and $\vector{b}$ in
$\reals^3$. If $\vector{a}\parallel \vector{b}$, then the set
$$ \{s\vector{a}+t\vector{b}: s\in\reals, t\in\reals\}= \{\lambda\vector{a}: \lambda \in\reals\},  $$
which is a line through the origin. Suppose now that $\vector{a}$
and $\vector{b}$  are not parallel. We saw in the preceding chapter
that if the vectors were on the plane, they would span the whole
plane $\reals^2$. In the case at hand the vectors are in space, they
still span a plane, passing through the origin.
 Thus
$$ \{s\vector{a}+t\vector{b}: s\in\reals, t\in\reals, \vector{a}\not\parallel \vector{b} \}$$is a plane passing through the origin.
We will say, abusing language, that two vectors are {\em coplanar}
if there exists bi-point representatives of the vector that lie on
the same plane. We will say, again abusing language, that a vector
is {\em parallel to a specific plane} or that it {\em lies on a
specific plane} if there exists a bi-point representative of the
vector that lies on the particular plane. All the above gives the
following result.


\begin{thm}
Let $\vector{v}, \vector{w}$ in $\reals^3$ be non-parallel vectors.
Then every vector $\vector{u}$ of the form  $$\vector{u} =
a\vector{v} + b\vector{w},$$ $a, b$ arbitrary scalars, is coplanar
with both $\vector{v}$ and $\vector{w}$. Conversely, any vector
$\vector{t}$ coplanar with both $\vector{v}$ and $\vector{w}$  can
be uniquely expressed in the form
$$\vector{t} = p\vector{v} + q\vector{w}.$$
\label{lem:coplanarvectors}See figure
\ref{fig:coplanarvectors}.\end{thm}

From the above theorem, if a vector $\vector{a}$ is not a linear
combination of two other vectors $\vector{b}, \vector{c}$, then
linear combinations of these three vectors may lie outside the plane
containing  $\vector{b}, \vector{c}$. This prompts the following
theorem.
\begin{thm}
Three vectors  $\vector{a}, \vector{b}, \vector{c}$ in $\reals^3$
are said to be {\em linearly independent} if
$$\alpha\vector{a}+\beta\vector{b}+\gamma\vector{c}=\vector{0} \implies \alpha = \beta = \gamma =0.$$
Any vector in $\reals^3$ can be written as a linear combination of
three linearly independent vectors in $\reals^3$.
\end{thm}

A plane is determined by three non-collinear points. Suppose that
$\point{a}$, $\point{b}$, and $\point{c}$ are non-collinear points
on the same plane and that $\point{r} = \colpoint{x\\ y\\ z}$ is
another arbitrary point on this plane. Since $\point{a}$,
$\point{b}$, and $\point{c}$ are non-collinear, $\vector{ab}$ and
$\vector{ac}$, which are coplanar, are non-parallel. Since
$\vector{ax}$ also lies on the plane, we have by Lemma
\ref{lem:coplanarvectors}, that there exist real numbers $p, q$ with
$$\vector{ar} = p\vector{ab} + q\vector{ac}.$$By Chasles' Rule,
$$\vector{r} = \vector{a}  + p(\vector{b} - \vector{a}) +
q(\vector{c} - \vector{a}),$$is the equation of a plane containing
the three non-collinear points $\point{a}$, $\point{b}$, and
$\point{c}$, where $\vector{a}$, $\vector{b}$, and $\vector{c}$ are
the position vectors of these points. Thus we have the following
theorem.


\vspace*{3cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering \ThreeDput[normal=.1 -1
1](0,0,1){\pspolygon[fillcolor=yellow,fillstyle=solid](-2,-3)(2,-3)(3,2)(-1,2)}
\ThreeDput[normal=.1 -1 1](0,0,1){\psline[linewidth=1.2pt,
arrows={*->},arrowscale=2](-1,-1)(.5,.5)\psline[linewidth=1.2pt,
arrows={*->},arrowscale=2](-1,-1)(.5,-.5)\psline[linewidth=1.2pt,
arrows={*->},arrowscale=2](-1,-1)(2,1)}
\uput[ul](1,1){$\vector{v}$}\uput[d](2,1){$p\vector{v}+q\vector{w}$}\uput[d](0,0){$\vector{w}$}
\vspace*{3cm}\footnotesize\hangcaption{Theorem
\ref{lem:coplanarvectors}.} \label{fig:coplanarvectors}
\end{minipage}
\begin{minipage}{7cm} \psset{unit=2pc}
\psset{xMin=0,yMin=0,zMin=0,Alpha=160, Beta=10}%
\pstThreeDPlaneGrid[planeGrid=xy,linewidth=0.1pt,linecolor=magenta](0,0)(10,10)
  \pstThreeDLine[arrows=->,linecolor=red,linewidth=1.5pt](5,8,0)(5,8,2)
  \pstThreeDLine[arrows=->,linewidth=1.5pt](3,4,0)(5,8,0)
  \pstThreeDLine[linewidth=.5pt](4.9,7.8,0.2)(4.975,7.95,0.2)
  \uput[0](1.7,0){$ax+by+cz=d$}
  \uput[0](6,0.5){$\vector{x}$}
  \uput[ur](7.5,2){\small{$\vector{n}=\colvec{a\\ b \\ c}$}}
\vspace*{3cm}\footnotesize\hangcaption{Theorem
\ref{thm:cartesian-eq-of-plane}.} \label{fig:cartesian-eq-of-plane}
\end{minipage}
\end{figure}


\begin{thm}Let  $\vector{u}$ and  $\vector{v}$  be linearly
independent vectors. The {\em parametric equation} of a plane
containing the point $\point{a}$, and parallel to the vectors
$\vector{u}$ and $\vector{v}$ is given by
$$
\vector{r} -\vector{a} = p\vector{u} + q\vector{v}.$$ Componentwise
this takes the form
$$\begin{array}{c}x - a_1 = pu_1  + qv_1, \\ y - a_2 = pu_2  + qv_2, \\ z - a_3 = pu_3  + qv_3. \end{array} $$

\end{thm}


Multiplying the first equation by $u_2v_3-u_3v_2$, the second by
$u_3v_1-u_1v_3$, and the third by $u_1v_2-u_2v_1$, we obtain,
$$\begin{array}{c}(u_2v_3-u_3v_2)(x - a_1) = (u_2v_3-u_3v_2)(pu_1  + qv_1), \\
(u_3v_1-u_1v_3)(y - a_2) = (u_3v_1-u_1v_3)(pu_2  + qv_2), \\
(u_1v_2-u_2v_1)(z - a_3) = (u_1v_2-u_2v_1)(pu_3  + qv_3).
\end{array}
$$
Adding gives,
$$(u_2v_3-u_3v_2)(x - a_1)+ (u_3v_1-u_1v_3)(y - a_2)+(u_1v_2-u_2v_1)(z - a_3)=0.   $$
Put $$a=u_2v_3-u_3v_2, \qquad b=u_3v_1-u_1v_3, \qquad
c=u_1v_2-u_2v_1,$$and $$d = a_1(u_2v_3-u_3v_2)+a_2(u_3v_1-u_1v_3) +
a_3(u_1v_2-u_2v_1).
$$ Since $\vector{v}$ is linearly independent from $\vector{u}$, not all of $a, b, c$ are zero.
This gives the following theorem.
\begin{thm}\label{thm:cartesian-eq-of-plane}
The equation of the plane in space can be written in the form
$$ax+by+cz=d,  $$
which is the {\em Cartesian equation} of the plane. Here $a^2 + b^2
+ c^2 \neq 0$, that is, at least one of the coefficients is
non-zero. Moreover, the vector $\vector{n}=\colvec{a\\ b \\ c}$ is
normal to the plane with Cartesian equation $ax + by + cz = d$.
\end{thm}
\begin{pf}We have already proved the first statement. For the second
statement, observe that if  $\vector{u}$ and $\vector{v}$ are
non-parallel vectors and  $\vector{r} - \vector{a} = p\vector{u} +
q\vector{v}$ is the equation of the plane containing the point
$\point{a}$ and parallel to the vectors $\vector{u}$ and
$\vector{v}$, then if $\vector{n}$ is simultaneously perpendicular
to $\vector{u}$ and $\vector{v}$ then $(\vector{r} - \vector{a})\bp
\vector{n} = 0$ for $\dotprod{u}{n} = 0 = \dotprod{v}{n}$. Now,
since  at least one of $a, b, c$ is non-zero, we may  assume $a \neq
0$. The argument is similar if one of the other letters is non-zero
and $a = 0$. In this case we can see that
$$ x =\frac{d}{a} -\frac{b}{a}y - \frac{c}{a}z.
$$ Put $y = s$ and $z = t$. Then
$$\colpoint{x - \frac{d}{a}\\ y \\ z} = s\colvec{-\frac{b}{a} \\ 1 \\ 0} + t\colvec{-\frac{c}{a} \\ 0 \\ 1}   $$
is a parametric equation for the plane.  We have $$
a\left(-\dfrac{b}{a}\right) +b   \left(1\right) +c \left(0\right)
=0, \qquad a \left(-\dfrac{c}{a}\right) +b \left(0\right) +c
\left(1\right) =0,
$$and so $\colvec{a\\ b \\ c}$ is simultaneously perpendicular to $\colvec{-\frac{b}{a} \\ 1 \\ 0}$
and $\colvec{-\frac{c}{a} \\ 0 \\ 1} $, proving the second
statement.\end{pf}

\begin{exa}
The equation of the plane passing through the point $\colpoint{1\\
-1\\ 2}$ and normal to the vector  $\dis{\colvec{-3\\  2\\ 4}}$ is
$$-3(x - 1) + 2(y + 1) + 4(z - 2) = 0 \implies -3x+2y+4z=3.$$
\end{exa}


\begin{exa}\label{exa:eqn_of_plane1}
Find both the parametric equation and the Cartesian equation of the
plane parallel to the vectors $\colvec{1
\\ 1 \\ 1}$ and $\colvec{1 \\ 1\\ 0}$ and passing through the
point $\colpoint{0 \\ -1\\ 2}$.
\end{exa}


\begin{solu} The desired parametric equation is
$$ \colpoint{x \\ y + 1 \\ z-2} = s\colvec{1\\ 1\\ 1} + t\colvec{1\\ 1\\ 0}.    $$
This gives $$s = z-2, \qquad  t = y+1 - s = y + 1 -z+2 = y-z + 3$$
and $$x = s + t = z-2 + y-z+3 = y+1.$$ Hence the Cartesian equation
is $x-y =1$.
\end{solu}
\begin{df} If $\vector{n}$ is perpendicular to plane $\Pi _1$ and
$\vector{n}'$ is perpendicular to plane $\Pi _2$, the {\em angle
between the two planes} is the angle between the two vectors
$\vector{n}$ and  $\vector{n}'$.
\end{df}
\vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{4cm}
\centering \psset{unit=4pc} \pstThreeDCoor[IIIDticks=true,xMin=
0,xMax=1.5,yMin=0,yMax=1.5,zMin=0,zMax=1.5]
\psplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    linecolor=blue,%
    yPlotpoints=50,xPlotpoints=50,%
    linewidth=0.2pt, hiddenLine=true](0,1)(0,1){%
    1 x -1 mul add}
\vspace*{1cm}\footnotesize \hangcaption{The plane
$z=1-x$.}\label{fig:plane1}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=4pc} \pstThreeDCoor[IIIDticks=true,xMin=
0,xMax=1.5,yMin=0,yMax=1.5,zMin=0,zMax=1.5]
\psplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    fillstyle=solid,%
    linecolor=cyan,
    yPlotpoints=50,xPlotpoints=50,%
    linewidth=0.2pt, hiddenLine=true](0,1)(0,1){%
    1 y -1 mul add}
%\pstThreeDSquare[fillcolor=yellow](1,-2,0)(1,2,0)(1,-2,1)
\vspace*{1cm}\footnotesize \hangcaption{The plane $z=1-y$.}
\label{fig:plane2}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=4pc} \pstThreeDCoor[IIIDticks=true,xMin=
0,xMax=1.5,yMin=0,yMax=1.5,zMin=0,zMax=1.5]
\pstThreeDTriangle[fillcolor=blue,fillstyle=solid,%
linecolor=blue,linewidth=1.5pt](1,0,0)(1,1, 0)( 0, 0,1)
\pstThreeDTriangle[fillcolor=cyan,fillstyle=solid,%
linecolor=blue,linewidth=1.5pt](0,1,0)(1,1, 0)( 0, 0,1)
\pstThreeDSquare[fillcolor=red](0,0,0)(1,0,0)(0,1,0)
\vspace*{1cm}\footnotesize \hangcaption{Solid bounded by the planes
$z=1-x$ and $z=1-y$ in the first octant.}\label{fig:plane3}
\end{minipage}
\end{figure}

\begin{exa}\label{exa:2-inter-planes}
\noindent
\begin{enumerate}
\item Draw the intersection of the  plane  $z=1-x$ with the first
octant.
\item Draw the intersection of the  plane  $z=1-y$ with the first
octant.
\item Find the angle between the planes $z=1-x$ and
$z=1-y$.
\item Draw the solid $\mathscr{S}$ which results from the intersection of the  planes $z=1-x$ and  $z=1-y$ with the first
octant.
\item Find the volume of the solid $\mathscr{S}$.
\end{enumerate}
\end{exa}
\begin{solu}
\noindent
\begin{enumerate}
\item This appears in figure \ref{fig:plane1}.
\item This appears in figure \ref{fig:plane2}.
\item The vector $\colvec{1\\ 0 \\ 1}$ is normal to the plane $x+z=1$, and
the vector $\colvec{0\\ 1 \\ 1}$ is normal to the plane $y+z=1$. If
$\theta$  is the angle between these two vectors, then
$$\cos \theta = \dfrac{1\cdot 0 + 0 \cdot 1 + 1\cdot 1}{\sqrt{1^2+1^2} \cdot \sqrt{1^2+1^2}} \implies
\cos \theta = \dfrac{1}{2} \implies \theta = \dfrac{\pi}{3}. $$
\item This appears in figure \ref{fig:plane3}.
\item The resulting solid is a pyramid with square base of area $A=1\cdot 1
=1$. Recall that the volume of a pyramid is given by the formula
$V=\dfrac{Ah}{3}$, where $A$ is area of  the base of the pyramid and
$h$ is its height. Now, the height of this pyramid is clearly $1$,
and hence the volume required is $\dfrac{1}{3}$.
\end{enumerate}
\end{solu}

\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900


\begin{pro}
Vectors $\vector{a}$, $\vector{b}$ satisfy $\norm{\vector{a}} = 13$,
$\norm{\vector{b}} = 19$, $\norm{\vector{a}+\vector{b}} = 24$. Find
$\norm{\vector{a}-\vector{b}}$.
\begin{answer}
Observe that, in general,
$$\begin{array}{lll} \norm{\vector{a}-\vector{b}}^2+\norm{\vector{a}+\vector{b}}^2  & = &
\norm{\vector{a}}^2-2\dotprod{a}{b}+\norm{\vector{b}}^2 +\norm{\vector{a}}^2+2\dotprod{a}{b}+\norm{\vector{b}}^2\\
& = & 2\norm{\vector{a}}^2+2\norm{\vector{b}}^2,
\end{array}
$$whence
$$ \norm{\vector{a}-\vector{b}}= \sqrt{2\norm{\vector{a}}^2+2\norm{\vector{b}}^2-\norm{\vector{a}+\vector{b}}}=\sqrt{2(13)^2+2(19)^2-(24)^2} =22.$$
\end{answer}

\end{pro}
\begin{pro}
Find the equation of the line passing through $\colpoint{1 \\ 2\\
3}$ in the direction of $\colvec{-2\\ -1 \\ 0}$.

\begin{answer}
$\colpoint{x \\ y \\ z} =  \colpoint{1 \\
2\\ 3} + t\colvec{-2\\ -1 \\ 0} .$
\end{answer}

\end{pro}

\begin{pro}
Find the equation of plane  containing the point $\colpoint{1\\ 1\\
1}$ and perpendicular to the line $x = 1 + t, y = -2t, z = 1 - t$.
\begin{answer} The vectorial form of the equation of the line is
$$\vector{r} = \colvec{1 \\ 0 \\ 1} + t\colvec{1 \\ -2 \\ -1}.$$
Since the line follows the direction of $\colvec{1 \\ -2 \\ -1}$,
this means that $\colvec{1 \\ -2 \\ -1}$ is normal to the plane, and
thus the equation of the desired plane is
$$(x - 1) - 2(y - 1) - (z - 1) = 0.$$
\end{answer}
\end{pro}
\begin{pro}
Find the equation of plane  containing the point $\colpoint{1\\ -1\\
-1}$ and containing the line $x = 2y = 3z$.
\begin{answer} Observe that $\colpoint{0\\ 0\\ 0}$ (as $0 = 2(0) = 3(0)$) is on the
line, and hence on the plane. Thus the vector
$$\colvec{1 - 0 \\ -1 - 0 \\ -1 - 0} = \colvec{1 \\ -1 \\
-1}$$lies on the plane. Now, if $x = 2y = 3z = t$, then $x = t, y =
t/2, z = t/3$. Hence, the vectorial form of the equation of the line
is
$$\vector{r} = \colvec{0 \\ 0 \\ 0} + t\colvec{1 \\ 1/2 \\ 1/3} = t\colvec{1 \\ 1/2 \\ 1/3}.$$
This means that $\colvec{1 \\ 1/2 \\ 1/3}$ also lies on the plane,
and thus
$$\colvec{1 \\ -1 \\
-1} \cross \colvec{1 \\ 1/2 \\ 1/3} =  \colvec{1/6\\ -4/3\\
3/2}$$is normal to the plane. The desired equation is thus
$$\frac{1}{6}x  - \frac{4}{3}y + \frac{3}{2}z = 0.$$
\end{answer}
\end{pro}


\begin{pro}[Putnam Exam 1984] Let $A$ be a solid $a\times b \times c$
rectangular brick in three dimensions, where $a > 0, b > 0, c > 0$.
Let $B$ be the set of all points which are at distance at most $1$
from some point of $A$ (in particular, $A \subseteq B$). Express the
volume of $B$ as a polynomial in $a, b, c$. \begin{answer} The set
$B$ can be decomposed into the following subsets:
\begin{dingautolist}{202}
\item The set $A$ itself, of volume $abc$. \item Two $a\times b
\times 1$ bricks, two $b\times c \times 1$ bricks, and two $c\times
a \times 1$ bricks, \item Four quarter-cylinders of length $a$ and
radius $1$, four quarter-cylinders of length $b$ and radius 1, and
four quarter-cylinders of length $c$ and radius $1$, \item Eight
eighth-of-spheres of radius $1$.
\end{dingautolist}
Thus the required formula for the volume is
$$abc + 2(ab + bc + ca) + \pi (a + b + c) + \frac{4\pi}{3}.$$
\end{answer}
\end{pro}
\begin{pro}
It is known that $\norm{\vector{a}}= 3$, $\norm{\vector{b}}= 4$,
$\norm{\vector{c}}= 5$ and that $\vector{a}+\vector{b} + \vector{c}
= \vector{0}$. Find
$$\dotprod{a}{b}+\dotprod{b}{c}+\dotprod{c}{a}.$$
\begin{answer}
We have,
$$ \norm{\vector{a}+\vector{b} + \vector{c}}^2=(\vector{a}+\vector{b} + \vector{c})\bullet (\vector{a}+\vector{b} + \vector{c}) =
\norm{\vector{a}}^2+\norm{\vector{b}}^2+\norm{\vector{c}}^2 +2(\dotprod{a}{b}+\dotprod{b}{c}+\dotprod{c}{a}), $$
from where we deduce that
$$\dotprod{a}{b}+\dotprod{b}{c}+\dotprod{c}{a} = \dfrac{-3^2-4^2-5^2}{2}=-25.   $$
\end{answer}

\end{pro}

\begin{pro} Find the equation of the line perpendicular to the plane $ax +
a^2y + a^3z = 0,\ \
 a \neq 0$ and passing through the point $\colpoint{0\\ 0\\ 1}$.
 \begin{answer} A vector normal to the plane is $ \colvec{a \\ a^2 \\
 a^2}$. The line sought has the same direction as this vector,
 thus the equation of the line is $$ \colvec{x \\ y \\
 z} = \colvec{0\\ 0 \\
 1} + t\colvec{a \\ a^2 \\
 a^2}, \ \ \ t\in\reals. $$
 \end{answer}
\end{pro}
 \begin{pro} Find the equation of the plane perpendicular to
 the line $ax = by = cz,\ \ \ abc \neq 0$ and passing through the
 point $\colpoint{1\\ 1\\ 1}$ in $\reals^3$.
\begin{answer}  Put  $ax = by = cz = t$, so $x = t/a; y = t/b; z
=
t/c$. The parametric equation of the line is $$\colvec{x \\ y \\
z} = t\colvec{1/a \\ 1/b \\
1/c}, \ \ \ t\in \reals.
$$ Thus the vector $\colvec{1/a \\ 1/b \\
1/c}$ is perpendicular to the plane. Therefore, the equation of
the plane is $$\colvec{1/a \\ 1/b \\
1/c}\bp \colvec{x - 1 \\ y - 1 \\
z - 1}  = \colvec{0 \\ 0\\
0},  $$ or $$ \frac{x}{a} + \frac{y}{b} + \frac{z}{c} = \frac{1}{a}
+ \frac{1}{b} + \frac{1}{c}.  $$ We may also write this as $$bcx +
cay + abz = ab + bc + ca.   $$
\end{answer}
\end{pro}
\begin{pro}
Find  the (shortest) distance from the point $(1,2,3)$ to the plane $x-y+z=1$.
\begin{answer}
The vector  $\colvec{1\\ -1\\ 1}$ is perpendicular to the plane. Hence, the shortest distance from $(1,2,3)$ is obtained by the perpendicular
line to the plane that pierces the plane, this perpendicular line to the plane has equation $$\colpoint{x\\ y \\ z} = \colpoint{1\\ 2 \\3 }+t\colvec{1\\ -1 \\ 1}
\implies x=1+t, y = 2-t, z = 3+t. $$
The intersection of the line and the plane occurs when
$$ 1+t -(2-t)+(3+t)=1\implies t=-\dfrac{1}{3}. $$
The closest point on the plane to $(1,2,3)$ is therefore $\left(\dfrac{2}{3},\dfrac{7}{3},\dfrac{8}{3}\right)$, and the distance sought is
$$ \sqrt{(1-\frac{2}{3})^2+(2-\frac{7}{3})^2+(3-\frac{8}{3})^2}=\dfrac{\sqrt{3}}{3}.  $$
\end{answer}
\end{pro}


\begin{pro}
Determine whether the lines
$$L_1: \colpoint{x\\ y\\ z}=\colpoint{1\\ 1 \\ 1} + t\colvec{2 \\ 1 \\ 1}, $$
$$ L_2:  \colpoint{x\\ y\\ z}= \colpoint{0\\ 0 \\ 1} + t\colvec{2 \\ -1 \\ 1}, $$
intersect. Find the angle between them.
\begin{answer}
If the lines intersected, there would be a value $t'$ for which
$$ \colpoint{1\\ 1 \\ 1} + t'\colvec{2 \\ 1 \\ 1} =    \colpoint{0\\ 0 \\ 1} + t'\colvec{2 \\ -1 \\ 1}
\implies \colvec{1-0 \\ 1 -0 \\ 1-1 } = t'\colvec{2-2\\ -1-1 \\ 1-1} \implies \colvec{1\\ 1\\ 0} = t'\colvec{0\\ -2 \\ 0}, $$
which is clearly impossible, and so the lines are skew. Let $\theta$ be the angle between them. Then
$$\cos\theta = \dfrac{2\cdot 2 + 1\cdot (-1)+1\cdot 1}{\sqrt{(2)^2+(1)^2+(1)^2}\sqrt{(2)^2+(-1)^2+(1)^2}}=\dfrac{4}{\sqrt{6}\sqrt{6}}
\implies \theta = \arccos\left(\dfrac{2}{3}\right). $$

\end{answer}
\end{pro}
\begin{pro}\label{pro:ineq-from-CBS3d}
Let $a, b, c$ be arbitrary real numbers. Prove that $$(a^2+b^2+c^2)^2
\leq 3(a^4+b^4+c^4).
$$
\begin{answer}
Observe the CBS Inequality in $\reals^3$ given the vectors
$\vector{x}=(x_1,x_2,x_3)$, $\vector{y}=(y_1,y_2,y_3)$  let $\theta$
be the angle between them. Then
$$ \dotprod{x}{y} = \norm{\vector{x}}\norm{\vector{y}}\cos\theta \implies |x_1y_1 + x_2y_2+x_3y_3|\leq \sqrt{x_1 ^2+x_2 ^2 +x_3 ^2} \sqrt{y_1 ^2+y_2 ^2 +y_3 ^2}. $$
Now take $x_1=a^2, x_2=b^2, x_3 = c^2$ and $y_1=y_2=y_3=1$. This
gives (since squares are positive, we don't need the absolute
values)
$$|x_1y_1 + x_2y_2+x_3y_3|\leq \sqrt{x_1 ^2+x_2 ^2 +x_3 ^2} \sqrt{y_1 ^2+y_2 ^2 +y_3 ^2}
\implies (a^2+b^2+c^2)^2 \leq (a^4+b^4+c^4)(3),   $$ which proves
the claim at once.
\end{answer}
\end{pro}

\begin{pro}
Let $a>0,b>0,c>0$ be the lengths of the sides of $\triangle ABC$.
(Vertex $A$ is opposite to the side measuring $a$, etc.) Recall that
by Heron's Formula, the area of this triangle is
$S(a,b,c)=\sqrt{s(s-a)(s-b)(s-c)}$, where $s=\dfrac{a+b+c}{2}$ is
the semiperimeter of the triangle. Prove that $f(a, b,
c)=\dfrac{S(a, b, c)}{a^2+b^2+c^2}$ is maximised when $\triangle
ABC$ is equilateral, and find this maximum.
\begin{answer}
First observe that
$$\begin{array}{lll}S(a,b,c) & = & \sqrt{s(s-a)(s-b)(s-c)}\\ & = & \dfrac{1}{4}\sqrt{(a+b+c)(b+c-a)(c+a-b)(a+b-c)}\\
&  = &  \dfrac{1}{4}\sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)}\\
\end{array}
$$
Hence
$$\dfrac{S(a, b, c)}{a^2+b^2+c^2} = \dfrac{1}{4}\sqrt{1-2\dfrac{a^4+b^4+c^4}{(a^2+b^2+c^2)^2}},  $$
and thus maximising $f$ is equivalent to minimising
$2\dfrac{a^4+b^4+c^4}{(a^2+b^2+c^2)^2}$. From problem
\ref{pro:ineq-from-CBS3d},
$$\dfrac{a^4+b^4+c^4}{(a^2+b^2+c^2)^2}\geq \dfrac{1}{3},$$
which in turn gives
$$\dfrac{S(a, b, c)}{a^2+b^2+c^2}  \leq \dfrac{1}{4}\sqrt{1-\dfrac{2}{3}}=\dfrac{1}{4\sqrt{3}} = \dfrac{\sqrt{3}}{12},$$
the desired maximum.
\end{answer}
\end{pro}

\begin{pro}
Let $x, y, z$ be strictly positive numbers. Prove that $$
\dfrac{\sqrt{x+y}+\sqrt{y+z}+\sqrt{z+x}}{\sqrt{x+y+z}}\leq \sqrt{6}.
$$
\end{pro}
\begin{pro}
Let $x, y, z$ be strictly positive numbers. Prove that $$x+y+z\leq
2\left(\dfrac{x^2}{y+z}+\dfrac{y^2}{z+x}+\dfrac{z^2}{x+y}\right).
$$
\end{pro}

\begin{pro}Find the Cartesian equation of the plane passing through
$\colpoint{1\\ 0 \\ 0}$, $\colpoint{0\\ 1 \\ 0}$ and $\colpoint{0\\
0 \\ 1}$. Draw this plane and its intersection with the first
octant. Find the volume of the tetrahedron with vertices at
$\colpoint{0\\ 0 \\ 0}$,
$\colpoint{1\\ 0 \\ 0}$, $\colpoint{0\\ 1 \\ 0}$ and $\colpoint{0\\
0 \\ 1}$.
\begin{answer}$x+y+z=1$. $\dfrac{1}{6}$. \end{answer}
\end{pro}
\begin{pro}
Prove that there do not exist three unit vectors in $\reals^3$ such
that the angle between any two of them be $> \dfrac{2\pi}{3}$.
\begin{answer}
Assume contrariwise that $\vector{a}$, $\vector{b}$, $\vector{c}$
are three unit vectors in $\reals^3$ such that the angle between any
two of them is $> \dfrac{2\pi}{3}$. Then $\dotprod{a}{b} <
-\dfrac{1}{2}$, $\dotprod{b}{c} < -\dfrac{1}{2}$, and
$\dotprod{c}{a} < -\dfrac{1}{2}$. Thus
$$\begin{array}{lll} \norm{\vector{a} + \vector{b} + \vector{c}}^2 & = &  \norm{\vector{a}}^2 + \norm{\vector{b}}^2 + \norm{\vector{c}}^2\\
& & \qquad + 2\dotprod{a}{b}  + 2\dotprod{b}{c}  + 2\dotprod{c}{a} \\
& < & 1 + 1 + 1 -1-1-1 \\
& = & 0,
\end{array} $$which is impossible, since a norm of vectors is
always $\geq 0$.
\end{answer}
\end{pro}
\begin{pro}
\label{thm:distance_point_planeR3}\index{distance!between a point
and a plane} Let $(\vector{r} - \vector{a})\bp\vector{n} = 0$ be a
plane passing through the point $\point{a}$ and perpendicular to
vector $\vector{n}$. If $\point{b}$ is not a point on the plane,
then the distance from $\point{b}$ to the plane is
$$\frac{\left|(\vector{a} -
\vector{b})\bp\vector{n}\right|}{\norm{\vector{n}}}.$$

\begin{answer}Let $\proj{t}{s} =
\dfrac{\dotprod{t}{s}}{(\norm{s})^2}\vector{s}$ be the projection of
$\vector{t}$ over $\vector{s}\neq \vector{0}$. Let $\point{x_0}$ be
the point on the plane that is nearest to $\point{b}$. Then
$\vector{bx_0} = \vector{x_0} - \vector{b}$ is orthogonal to the
plane, and the distance we seek is
$$ ||\proj{\vector{r_0} - \vector{b}}{n}|| = \left|\left| \frac{(\vector{r_0} - \vector{b})\bp\vector{n}}{\norm{\vector{n}}^2}\vector{n}\right|\right| =
\frac{|(\vector{r_0} -
\vector{b})\bp\vector{n}|}{\norm{\vector{n}}}.$$ Since $R_0$ is on
the plane, $\dotprod{r_0}{n} = \dotprod{a}{n},$ and so
$$ ||\proj{\vector{r_0} - \vector{b}}{n}|| = \frac{|\dotprod{r_0}{n} -
\dotprod{b}{n}|}{\norm{\vector{n}}|} = \frac{|\dotprod{a}{n} -
\dotprod{b}{n}|}{\norm{\vector{n}}} = \frac{|(\vector{a} -
\vector{b})\bp\vector{n}|}{\norm{\vector{n}}},$$ as we wanted to
shew.
\end{answer}
\end{pro}

\begin{pro}[Putnam Exam 1980] Let $S$ be the solid in three-dimensional space consisting
of all points $\colpoint{x\\ y\\ z}$ satisfying the following system
of six conditions:
$$x \geq 0, \ \ \ y \geq 0, \ \ \ z \geq 0,$$
$$x + y + z \leq 11,$$
$$2x + 4y + 3z \leq 36,$$
$$2x + 3z \leq 24.$$Determine the number of vertices and the
number of edges of $S$. \label{pro:putnam1980}\begin{answer} There
are $7$ vertices ($V_0 = (0, 0, 0), V_1 = (11, 0, 0)$, $V_2 = (0, 9,
0), V_3 = (0, 0, 8)$, $V_4 = (0, 3, 8)$, $V_5 = (9, 0, 2)$, $V_6 =
(4, 7, 0)$) and $11$ edges ($V_0V_1$, $V_0V_2$, $V_0V_3$, $V_1V_5$,
$V_1V_6$, $V_2V_4$, $V_2V_6$, $V_3V_4$, $V_3V_5$, $V_4V_5$, and
$V_4V_6$).


\vspace*{3cm}
\begin{figure}[htpb]
\centering \psset{unit=.6pc} \pstThreeDCoor[IIIDticks=false,xMin=
0,xMax=12,yMin=0,yMax=12,zMin=0,zMax=12]
\pstThreeDLine[linewidth=2pt,linecolor=magenta](0,0,0)(11,0,0)%V_0V_1
\pstThreeDLine[linewidth=2pt,linecolor=magenta](0,0,0)(0,9,0) %V_0V_2
\pstThreeDLine[linewidth=2pt,linecolor=magenta](0,0,0)(0,0,8) %V_0V_3
\pstThreeDLine[linewidth=2pt,linecolor=blue](11,0,0)(9,0,2)%V_1V_5
\pstThreeDLine[linewidth=2pt,linecolor=cyan](11,0,0)(4,7,0)%V_1V_6
\pstThreeDLine[linewidth=2pt,linecolor=brown](0,9,0)(0,3,8)%V_2V_4
\pstThreeDLine[linewidth=2pt,linecolor=brown](0,0,8)(0,3,8)%V_3V_4
\pstThreeDLine[linewidth=2pt,linecolor=orange](0,0,8)(9,0,2)%V_3V_5
\pstThreeDLine[linewidth=2pt,linecolor=black](0,3,8)(9,0,2)%V_4V_5
\pstThreeDLine[linewidth=2pt,linecolor=magenta](0,3,8)(4,7,0)%V_4V_6
\pstThreeDLine[linewidth=2pt,linecolor=magenta](0,9,0)(4,7,0)%V_2V_6
%\psplotThreeD[%
%    plotstyle=curve,%
%    drawStyle=xyLines,%
%    linecolor=blue,%
%    yPlotpoints=50,xPlotpoints=50,%
%    linewidth=0.2pt, hiddenLine=true](0,1)(0,1){%
%    1 x -1 mul add}
\vspace*{1cm}\footnotesize \hangcaption{Problem
\ref{pro:putnam1980}.}\label{fig:putnam1980}
\end{figure}

\end{answer}
\end{pro}
\begin{pro}
Given a polyhedron with $n$ faces, consider  $n$ vectors, each normal to a face of the polyhedron, and length equal to the area of the face.
Prove that the sum of these vectors is $\vector{0}$.
\end{pro}
\end{multicols}
\section{Cross Product}
We now define the standard  cross product in $\reals^3$ as a product
satisfying the following properties.

\begin{df} Let $\vector{x}, \vector{y}, \vector{z}$ be vectors in $\reals^3$, and let  $\alpha \in
\reals$ be a scalar. The cross  product $\cross$ is a closed binary
operation satisfying
\begin{dingautolist}{202}
\item {\bf Anti-commutativity:} $\vector{\bf x} \cross\vector{\bf
y} = -(\vector{\bf y} \cross\vector{\bf x})$ \item {\bf
Bilinearity:} $$(\vector{\bf x} + \vector{z}) \cross\vector{\bf y} =
\vector{\bf x} \cross\vector{\bf y} + \vector{z} \cross\vector{\bf
y} \ \ \ \mathrm{and} \ \ \ \ \vector{\bf x} \cross ( \vector{z}  +
\vector{\bf y}) = \vector{\bf x} \cross\vector{z} + \vector{\bf x}
\cross\vector{\bf y}$$ \item {\bf Scalar homogeneity:}
$(\alpha\vector{\bf x}) \cross\vector{\bf y} = \vector{\bf x} \cross
(\alpha \vector{\bf y}) = \alpha(\vector{\bf x} \cross\vector{\bf
y})$ \item $\vector{\bf x} \cross\vector{\bf x} = \vector{{\bf 0}}$
\item {\bf Right-hand Rule:}
$$\crossprod{i}{j} = \vector{k}, \ \
\crossprod{j}{k} = \vector{i}, \ \ \crossprod{k}{i} = \vector{j}.$$
\end{dingautolist}
\end{df}

It follows that the cross product is an operation that, given two
non-parallel vectors on a plane, allows us to ``get out'' of that
plane.

\begin{exa}
Find $$ \colvec{1 \\ 0 \\ -3} \cross \colvec{0 \\ 1 \\ 2}.$$
 \label{exa:wedge1}\end{exa}
\begin{solu} We have
$$\begin{array}{lll}
(\vector{i} - 3\vector{k}) \cross (\vector{j} + 2\vector{k}) & = &
\crossprod{i}{j} + 2\crossprod{i}{k} - 3\crossprod{k}{j} -
6\crossprod{k}{k} \\
& = & \vector{k} - 2 \vector{j} + 3 \vector{i} + 6\vector{0} \\
& = & 3\vector{i} - 2\vector{j} + \vector{k}.
\end{array}$$
Hence $$ \colvec{1 \\ 0 \\ -3} \cross \colvec{0 \\ 1 \\ 2} =
\colvec{3 \\ -2 \\  1}.$$

\end{solu}
\begin{rem}
The cross product of vectors in $\reals^3$ is not associative, since
$$\vector{i}\cross (\crossprod{i}{j}) = \crossprod{i}{k} =
-\vector{j}$$ but $$(\crossprod{i}{i})\cross\vector{j} =
\crossprod{0}{j} = \vector{{\bf 0}}.$$
\end{rem}

\vspace*{3cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering\psset{unit=4pc} \psset{viewpoint=1 1.5 1}
\ThreeDput[normal=1 0 0](0,0,0){
%%This draws the vector (1,0,0)
\psline[linewidth=2pt]{->}(0,0)(0,1)
\uput[u](0,1){$\crossprod{x}{y}$}
%%This draws the vector (0,1,0)
\psline[linewidth=2pt]{->}(0,0)(1,0) \uput[u](1,0){$\vector{y}$} }
%%
\ThreeDput[normal=0 1 0](0,0,0){
%%This draws the vector (1,0,0)
\psline[linewidth=2pt]{->}(0,0)(-1,0) \uput[u](-1,0){$\vector{x}$}}
\ThreeDput[normal=0 0 1](0,0,0){
%%This draws the grid
\psframe[fillstyle=solid, fillcolor=magenta](0,0)(1,1) }
\vspace*{1.2cm} \footnotesize\hangcaption{Theorem
\ref{thm:sineanglebetweenc}.}\label{fig:sineanglebetweenc}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=1.3pc}
\pstGeonode[PointName=none,PointSymbol=none](0,0){A}(4,0){B}(6,5){C}(2,5){D}(2,0){E}
\pscustom[fillcolor=yellow,fillstyle=solid]{\pstLineAB{A}{B}\pstLineAB{B}{C}\pstLineAB{C}{D}\pstLineAB{D}{A}}
\pstLineAB[linewidth=2pt,
arrows={->},arrowscale=2]{A}{B}\bput{:U}{$\norm{\vector{x}}$}
\pstLineAB[linewidth=2pt,
arrows={->},arrowscale=2]{A}{D}\aput{:U}{$\norm{\vector{y}}$}
\pstMarkAngle{B}{A}{D}{$\theta$}
\pstLineAB{D}{E}\aput{:D}{$\norm{\vector{x}}\norm{\vector{y}}\sin\theta$}
\vspace*{1.2cm}\footnotesize\hangcaption{Area of a
parallelogram}\label{fig:area-paral}
\end{minipage}
\end{figure}



Operating as in example \ref{exa:wedge1} we obtain
\begin{thm}
Let $\vector{x} = \colvec{x_1 \\ x_2 \\ x_3}$ and $\vector{y} =
\colvec{y_1 \\ y_2 \\ y_3}$ be vectors in $\reals^3$. Then
$$\crossprod{x}{y} = (x_2y_3 - x_3y_2 )\vector{i}
+ (x_3y_1 - x_1y_3 )\vector{j} + (x_1y_2 - x_2y_1 )\vector{k}.$$
\end{thm}
\begin{pf}
Since $\crossprod{i}{i}=
\crossprod{j}{j}=\crossprod{k}{k}=\vector{0}$, we only worry about
the mixed products, obtaining,
$$\begin{array}{lll}
\crossprod{x}{y} & = & (x_1\vector{i} + x_2\vector{j}+ x_3\vector{k})\cross (y_1\vector{i} + y_2\vector{j}+ y_3\vector{k})\\
& = & x_1y_2\crossprod{i}{j}+x_1y_3\crossprod{i}{k}+ x_2y_1\crossprod{j}{i}+x_2y_3\crossprod{j}{k}\\
& & \qquad +x_3y_1\crossprod{k}{i}+x_3y_2\crossprod{k}{j}\\
& = & (x_1y_2-y_1x_2)\crossprod{i}{j} + (x_2y_3-x_3y_2)\crossprod{j}{k}+ (x_3y_1-x_1y_3)\crossprod{k}{i}\\
& = & (x_1y_2-y_1x_2)\vector{k} + (x_2y_3-x_3y_2)\vector{i}+ (x_3y_1-x_1y_3)\vector{j},\\
\end{array} $$proving the theorem.
\end{pf}



Using the cross product, we may obtain a third vector simultaneously perpendicular to two other vectors in space.
\begin{thm}
$\vector{\bf x}\perp (\vector{\bf x} \cross\vector{\bf y}) $ and
$\vector{\bf y}\perp (\vector{\bf x} \cross\vector{\bf y})$, that
is, the cross product of two vectors is simultaneously perpendicular
to both original vectors.
\end{thm}
\begin{pf}
We will only check the first assertion, the second verification is
analogous.
$$\begin{array}{lll}
\vector{\bf x}\bp(\crossprod{\bf x}{\bf y}) & = &
(x_1\vector{i} + x_2 \vector{j} + x_3\vector{k})\bp ((x_2y_3 - x_3y_2 )\vector{i} \\
& & \qquad + (x_3y_1 - x_1y_3 )\vector{j} + (x_1y_2 -
x_2y_1 )\vector{k} ) \\
& = & x_1x_2y_3 - x_1x_3y_2 + x_2x_3y_1 - x_2x_1y_3 + x_3x_1y_2 -
x_3x_2y_1 \\
 & = & 0,
\end{array}$$
completing the proof.
\end{pf}
Although the cross product is not associative, we have, however, the
following theorem.
\begin{thm}
$$\vector{\bf a}\cross (\crossprod{\bf b}{c}) = (\dotprod{\bf a}{c})\vector{\bf b} - (\dotprod{\bf a}{\bf b})\vector{c}.$$
\end{thm}
\begin{pf}
$$\begin{array}{lll}
\vector{\bf a}\cross (\crossprod{\bf b}{c}) & = &
(a_1\vector{i} + a_2 \vector{j} + a_3\vector{k})\cross ((b_2c_3 - b_3c_2 )\vector{i} +   \\
& & \qquad  + (b_3c_1 - b_1c_3)\vector{j} + (b_1c_2 -
b_2c_1)\vector{k} ) \\
& = &   a_1(b_3c_1 - b_1c_3)\vector{k} - a_1(b_1c_2 -
b_2c_1)\vector{j} - a_2(b_2c_3 - b_3c_2 )\vector{k}\\
&  & \qquad + a_2(b_1c_2 - b_2c_1)\vector{i} + a_3(b_2c_3 - b_3c_2
)\vector{j} - a_3(b_3c_1 - b_1c_3)\vector{i} \\
& = & (a_1c_1 + a_2c_2 + a_3c_3)(b_1\vector{i} + b_2\vector{j} +
b_3\vector{i}) + \\
& & \qquad
(-a_1b_1 - a_2b_2 - a_3b_3)(c_1\vector{i} + c_2\vector{j} + c_3\vector{i})\\
 & = &  (\dotprod{\bf a}{c})\vector{\bf b} - (\dotprod{\bf a}{\bf b})\vector{c}, \\
\end{array}$$
completing the proof.
\end{pf}


\vspace*{4cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering \psset{unit=2pc} \rput(0,-2){
\pstGeonode[PointSymbol=none,PointName=none](0,0){O}(4,0){A}(4;70){C}(3.3;40){B}(0,6){D}
\pstLineAB[linewidth=2pt,linecolor=red,arrowscale=2,arrows={->}]{O}{A}\bput{:U}{$\vector{a}$}
\pstLineAB[linewidth=2pt,linecolor=red,arrowscale=2,arrows={->}]{O}{C}\bput{:U}{$\vector{c}$}
\pstLineAB[linewidth=2pt,linecolor=red,arrowscale=2,arrows={->}]{O}{D}
\aput{:U}{$\crossprod{a}{b}$}
\pstLineAB[linewidth=2pt,linecolor=red,arrowscale=2,arrows={->},linestyle=dotted]{O}{B}\bput{:U}{$\vector{b}$}
\pstTranslation[PointName=none]{O}{A}{B}[B']
\pstTranslation[PointName=none]{O}{A}{C}[C']
\pstLineAB[linewidth=2pt,linecolor=red,linestyle=dotted]{B}{B'}
\pstLineAB[linewidth=2pt,linecolor=red,linestyle=dotted]{C}{C'}
\pstTranslation[PointName=none]{O}{B}{C}[C'']
\pstLineAB[linewidth=2pt,linecolor=red,linestyle=dotted]{C}{C''}
\pstLineAB[linewidth=2pt,linecolor=red,linestyle=dotted]{A}{C'}
\pstLineAB[linewidth=2pt,linecolor=magenta]{A}{B'}
\pstTranslation[PointName=none]{O}{A}{C''}[C''']
\pstLineAB[linewidth=2pt,linecolor=magenta]{C''}{C'''}
\pstLineAB[linewidth=2pt,linecolor=magenta]{C'}{C'''}
\pstLineAB[linewidth=2pt,linestyle=dotted,linecolor=red]{C''}{B}
\pstLineAB[linewidth=2pt,linecolor=magenta]{B'}{C'''}
\pstMarkAngle{C}{O}{D}{$\theta$}}
\vspace*{4cm}\footnotesize\hangcaption{Theorem
\ref{thm:vol-parallelepiped}.}\label{fig:vol-paral}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=4.2pc}\pstThreeDCoor[IIIDticks=false,xMin=
0,xMax=2.5,yMin=0,yMax=3.5,zMin=0,zMax=2.5]
\pstThreeDNode(.6667,2,.6667){N} \pstThreeDNode(0,0,2){P}
  \pstThreeDNode(0,0,0){D}
  \pstThreeDNode(0,0,1){D'}
  \pstThreeDNode(2,0,0){A}
  \pstThreeDNode(2,3,0){B}
  \pstThreeDNode(0,3,0){C}
  \pstThreeDNode(2,0,1){A'}
  \pstThreeDNode(2,3,1){B'}
  \pstThreeDNode(0,3,1){C'}
  \pstMiddleAB[PosAngle=-90]{B}{C}{M}
\pspolygon*[linecolor=magenta](A)(D')(M)
  \pstLineAB[linestyle=dashed]{M}{N}
  \pspolygon[linewidth=2pt](A)(A')(B')(B)
  \pspolygon[linewidth=2pt](B)(B')(C')(C)
  \pspolygon[linewidth=2pt](A')(D')(C')(B')
   \pstLineAB[linestyle=dashed]{D}{D'}
  \pstLineAB[linestyle=dashed]{A}{C'}
   \pstLineAB[linestyle=dashed]{D}{P}
    \pstLineAB[linestyle=dashed]{A}{D}
     \pstLineAB[linestyle=dashed]{D}{C}
      \pstLineAB[linewidth=2pt,linecolor=red]{M}{P}
   \newcounter{lettrus}
  \multido{\i=1+1}{3}{%
    \setcounter{lettrus}{\i}
    \psdot[linecolor=red](\Alph{lettrus})
    \uput[-90](\Alph{lettrus}){\Alph{lettrus}}
  }
  \psdot[linecolor=red](D) \uput[-90](D){$D$}
  \psdot[linecolor=red](A') \uput[90](A'){$A'$}
  \psdot[linecolor=red](B') \uput[75](B'){$B'$}
  \psdot[linecolor=blue](N) \uput[45](N){$N$}
  \psdot[linecolor=red](C') \uput[90](C'){$C'$}
\psdot[linecolor=red](D') \uput[135](D'){$D'$}
\psdot[linecolor=red](P) \uput[0](P){$P$}
  \vspace*{4cm}\footnotesize\hangcaption{Example \ref{pro:parallelepiped-1}.}
\label{fig:parallelepiped-1}
\end{minipage}
\end{figure}


 \begin{thm}
Let $\anglebetween{x}{y}\in [0;\pi]$ be the convex  angle between
two vectors $\vector{\bf x}$ and $\vector{\bf y}$. Then
$$||\vector{\bf x}\cross\vector{\bf y}|| = ||\vector{\bf x}||||\vector{\bf y}||\sin\anglebetween{x}{y} .$$
\label{thm:sineanglebetweenc}\end{thm}
\begin{pf}We have
$$\begin{array}{lll}
||\vector{\bf x}\cross\vector{\bf y}||^2 & = &    (x_2y_3 - x_3y_2
)^2 + (x_3y_1 - x_1y_3 )^2 + (x_1y_2 -
x_2y_1 )^2        \\
& = & y^2 y_3^2  - 2x_2y_3x_3y_2  + z^2 y_2 ^2 + z^2 y_1
^2 - 2x_3y_1x_1y_3 +  \\
& & \qquad + x^2y_3 ^2 + x^2 y_2 ^2 - 2x_1y_2x_2y_1
+ y^2y_1 ^2 \\
& = & (x^2 + y^2 + z^2)(y_1 ^2 + y_2 ^2 + y_3 ^2) -
(x_1y_1 + x_2y_2 + x_3y_3)^2 \\
& = & ||\vector{\bf x}||^2||\vector{{\bf y}}||^2 -
(\vector{{\bf x}}\bp \vector{{\bf y}})^2 \\
& = & ||\vector{\bf x}||^2||\vector{{\bf y}}||^2 -
||\vector{\bf x}||^2||\vector{{\bf y}}||^2\cos^2\anglebetween{x}{y}  \\
& = & ||\vector{\bf x}||^2||\vector{{\bf
y}}||^2\sin^2\anglebetween{x}{y},
\end{array}
$$whence the theorem follows.
\end{pf}

Theorem \ref{thm:sineanglebetweenc} has the following geometric
significance: $\norm{\crossprod{x}{y}}$ is the area of the
parallelogram formed when the tails of the vectors are joined. See
figure \ref{fig:area-paral}.


The following corollaries easily follow from Theorem
\ref{thm:sineanglebetweenc}.
\begin{cor}
Two non-zero vectors $\vector{\bf x}, \vector{\bf y}$ satisfy
$\vector{\bf x}\cross \vector{\bf y} = \vector{{\bf 0}}$ if and only
if they are parallel.
\end{cor}
\begin{cor}[Lagrange's Identity]
$$||\crossprod{\bf x}{\bf y}||^2 = \norm{\bf x}^2\norm{\bf y}^2 - (\dotprod{\bf x}{\bf y})^2.$$
\end{cor}

The following result mixes the dot and the cross product.

\begin{thm}\label{thm:vol-parallelepiped}
Let $\vector{a}$, $\vector{b}$, $\vector{c}$, be linearly
independent vectors in $\reals^3$. The signed volume of the
parallelepiped spanned by them is $(\crossprod{a}{b})\bullet
\vector{c}$.
\end{thm}
\begin{pf}
See figure \ref{fig:vol-paral}. The area of the base of the
parallelepiped is  the area of the parallelogram determined by the
vectors $\vector{a}$ and  $\vector{b}$, which has area
$\norm{\crossprod{a}{b}}$. The altitude of the parallelepiped is
$\norm{\vector{c}}\cos\theta$ where $\theta$ is the angle between
$\vector{c}$ and $\crossprod{a}{b}$. The volume of the
parallelepiped is thus
$$\norm{\crossprod{a}{b}}\norm{\vector{c}}\cos\theta = (\crossprod{a}{b})\bullet \vector{c},  $$
proving the theorem.
\end{pf}
\begin{rem}
Since we may have used any of the faces of the parallelepiped, it
follows that
$$(\crossprod{a}{b})\bullet \vector{c}= (\crossprod{b}{c})\bullet \vector{a}=(\crossprod{c}{a})\bullet \vector{b}.  $$
In particular, it is possible to ``exchange'' the cross and dot
products:
$$ \vector{a}\bullet
(\crossprod{b}{c})=(\crossprod{a}{b})\bullet \vector{c} $$
\end{rem}

\begin{exa}
\label{pro:parallelepiped-1} Consider the rectangular parallelepiped
$ABCDD'C'B'A'$ (figure \ref{fig:parallelepiped-1}) with vertices
$A(2,0,0)$, $B(2,3,0)$, $C(0,3,0)$, $D(0,0,0)$, $D'(0,0,1)$,
$C'(0,3,1)$, $B'(2,3,1)$, $A'(2,0,1)$. Let $M$ be the midpoint of
the line segment joining the vertices $B$ and $C$.
\begin{enumerate}
\item Find the Cartesian equation of the plane containing the points $A$, $D'$,
and $M$.
\item Find the area of $\triangle AD'M$.
\item Find the parametric equation of the line $\line{AC'}$.
\item Suppose that a line through $M$ is drawn cutting  the line segment $[AC']$
in $N$ and the line  $\line{DD'}$ in $P$. Find the parametric
equation of $\line{MP}$.
\end{enumerate}
\end{exa}
\begin{solu}
\noindent
\begin{enumerate}
\item Form the following vectors and find their cross product:
$$\vector{AD'}= \colvec{-2\\ 0 \\ 1}, \qquad  \vector{AM}= \colvec{-1\\ 3 \\ 0 } \implies \crossprod{AD'}{AM} = \colvec{-3\\ -1\\ -6}.  $$The
equation of the plane is thus
$$ \colvec{x-2\\ y - 0 \\ z-0}\bullet \colvec{-3 \\ -1\\ -6} =0\implies  3(x-2)+1(y) +6z =0 \implies 3x+y+6z=6.$$
\item The area of the triangle is
$$ \dfrac{\norm{\crossprod{AD'}{AM}}}{2} = \dfrac{1}{2}\sqrt{3^2+1^2+6^2} = \dfrac{\sqrt{46}}{2}.  $$
\item We have $\vector{AC'}=\colvec{-2\\ 3\\ 1}$, and hence the line $\line{AC'}$ has parametric equation
$$ \colpoint{x\\ y \\ z} = \colpoint{2\\ 0 \\ 0} + t\colvec{-2\\ 3 \\ 1} \implies x=2-2t, \ y = 3t, \ z=t.$$
\item  Since $P$ is on the $z$-axis, $P=\colpoint{0\\ 0  \\ z'}$ for some real number $z'>0$. The parametric equation of the line $\line{MP}$ is thus
$$\colpoint{x\\ y \\ z} = \colpoint{1\\ 3\\ 0} + s\colvec{-1\\ -3\\ z'}\implies x= 1-s\qquad y =3-3s, \qquad z =sz'.  $$
Since $N$ is on both $\line{MP}$ and $\line{AC'}$ we must have
$$ 2-2t = 1-s,\  3t= 3-3s, \ t = sz'. $$ Solving the first two  equations gives $s=\dfrac{1}{3}, t=\dfrac{2}{3}$. Putting this into the third  equation we deduce $z'=2$. Thus $P=\colpoint{0\\ 0 \\ 2}$ and the desired equation is
$$\colpoint{x\\ y \\ z} = \colpoint{1\\ 3\\ 0} + s\colvec{-1 \\ -3 \\ 2} \implies x=1-s, \quad y = 3-3s, \qquad z=2s.  $$
\end{enumerate}
\end{solu}




\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\bigskip
\begin{pro}
Prove that  $$(\vector{a} - \vector{b})\cross (\vector{a} +
\vector{b})=2\crossprod{a}{b}.$$
\end{pro}

\begin{pro}
Prove that $\crossprod{x}{x} = \vector{0}$ follows from the
anti-commutativity of the cross product.
\begin{answer}
We have $\crossprod{x}{x} = -\crossprod{x}{x}$ by letting
$\vector{y} = \vector{x}$ in \ref{cp:anti_commutativity}. Thus
$2\crossprod{x}{x} = \vector{0}$ and hence $\crossprod{x}{x} =
\vector{0}$.
\end{answer}

\end{pro}

\begin{pro}
If $\vector{b}-\vector{a}$ and $\vector{c}-\vector{a}$ are parallel
and it is known that $\crossprod{c}{a} = \vector{i} - \vector{j}$
and $\crossprod{a}{b} = \vector{j} +\vector{k}$, find
$\crossprod{b}{c}$.
\begin{answer}
One has$$ (\vector{b}-\vector{a})\cross (\vector{c}-\vector{a}) =
\vector{0} \implies \crossprod{a}{b}+\crossprod{b}{c} +
\crossprod{c}{a} = \vector{0} $$ This gives $$  \crossprod{b}{c} =
-(\crossprod{a}{b}+\crossprod{c}{a}) = -(\vector{j}+\vector{k} +
\vector{i}-\vector{j}) = -\vector{i}-\vector{k}. $$
\end{answer}
\end{pro}

\begin{pro}Redo example \ref{exa:eqn_of_plane1},
 that is, find  the Cartesian
equation of the plane parallel to the vectors $\colvec{1
\\ 1 \\ 1}$ and $\colvec{1 \\ 1\\ 0}$ and passing through the
point $(0,-1,2)$, by finding a normal to the plane.

\begin{answer} The vector $\colvec{1
\\ 1 \\ 1}\cross \colvec{1 \\ 1\\ 0} = \colvec{-1\\ 1 \\ 0}$ is normal to the
plane. The plane has thus equation $$ \colvec{x \\
y + 1 \\ z-2}\bp \colvec{-1\\ 1 \\ 0} = 0 \implies -x + y+ 1 = 0
\implies x-y= 1,
$$as obtained before.
\end{answer}
\end{pro}
\begin{pro}
Find the equation of the plane passing through the points $(a,0,a)$,
$(-a,1,0)$, and $(0,1,2a)$ in $\reals^3$.
\begin{answer}
The vectors $$\colvec{a - (-a) \\ 0 - 1 \\ a - 0} = \colvec{2a \\
-1 \\ a}
$$ and $$\colvec{0 - (-a) \\ 1 - 1 \\ 2a - 0} = \colvec{a \\
0 \\ 2a}
$$lie on the plane. A vector normal to the plane is
$$ \colvec{2a \\
-1 \\ a} \cross   \colvec{a \\
0 \\ 2a} =  \colvec{-2a\\
-3a^2 \\ a}. $$ The equation of the plane is thus given by
$$ \colvec{-2a\\
-3a^2 \\ a}\bp \colvec{x - a\\
y - 0 \\ z - a} = 0,        $$ that is,
$$2ax +3a^2y - az   = a^2.   $$
\end{answer}
\end{pro}



\begin{pro}
Let $a\in\reals$. Find a vector of unit length simultaneously
perpendicular to $\vector{v} = \begin{bmatrix} 0 \cr -a \cr a \cr
\end{bmatrix}$ and  $\vector{w}  =\begin{bmatrix} 1 \cr a \cr 0 \cr
\end{bmatrix}$.

\begin{answer} Either of $\frac{\vector{v} \cross \vector{w}
}{||\vector{v} \cross \vector{w}||}$ or  $-\frac{\vector{v} \cross
\vector{w} }{||\vector{v} \cross \vector{w}||}$ will do. Now
$$\begin{array}{lll}\vector{v}\cross\vector{w} & = & (-a\vector{j} + a\vector{k})\cross (\vector{i} + a\vector{j}) \\
 & = &
-a(\vector{j}\cross\vector{i}) -a^2(\vector{j}\cross\vector{j}) + a(\vector{k}\cross\vector{i}) + a^2(\vector{k}\cross\vector{j}) \\
& = & a\vector{k} + a\vector{j} - a^2\vector{i} \\
& = & \begin{pmatrix} -a^2 \cr a \cr a\end{pmatrix},
\end{array}$$
and $||\vector{v}\cross\vector{w}|| = \sqrt{a^4 + a^2 + a^2} =
\sqrt{2a^2 + a^4}$. Hence we may take either
$$\frac{1}{\sqrt{2a^2 + a^4}}\begin{pmatrix} -a^2 \cr a \cr a\end{pmatrix}$$ or
$$-\frac{1}{\sqrt{2a^2 + a^4}}\begin{pmatrix} -a^2 \cr a \cr a\end{pmatrix}.$$
\end{answer}
\end{pro}
\begin{pro}[Jacobi's Identity] Let $\vector{a}$, $\vector{b}$, $\vector{c}$ be vectors in $\reals^3$. Prove that
$$\vector{\bf a}\cross (\crossprod{\bf b}{c}) + \vector{\bf b}\cross (\crossprod{c}{\bf a}) + \vector{c}\cross (\crossprod{\bf a}{\bf b})  = \vector{{\bf 0}}.$$
\begin{answer}From Theorem \ref{thm:semi_associative_cross_prod} we
have $$\vector{ a}\cross (\crossprod{ b}{c}) = (\dotprod{\bf
a}{c})\vector{ b} - (\dotprod{\bf a}{\bf b})\vector{c},     $$
$$\vector{ b}\cross (\crossprod{ c}{a}) = (\dotprod{ b}{a})\vector{
c} - (\dotprod{ b}{ c})\vector{a},     $$
$$\vector{ c}\cross (\crossprod{ a}{b}) = (\dotprod{c}{b})\vector{
a} - (\dotprod{c}{a})\vector{b},     $$ and adding yields the
result.
\end{answer}
\end{pro}
\begin{pro}
Let $\vector{\bf x}\in \reals^3, \norm{\bf x} = 1$. Find
$$||\crossprod{\bf x}{i}||^2 + ||\crossprod{\bf x}{j}||^2 + ||\crossprod{\bf x}{k}||^2.$$
\begin{answer} By Lagrange's Identity,
$$||\crossprod{\bf x}{i}||^2  =  \norm{\vector{x}}^2\norm{\vector{i}}^2 - (\dotprod{x}{i})^2 = 1 - (\dotprod{\bf x}{i})^2,$$
$$||\crossprod{\bf x}{k}||^2  =  \norm{\vector{x}}^2\norm{\vector{j}}^2 - (\dotprod{x}{j})^2 = 1 - (\dotprod{\bf x}{j})^2,$$
$$||\crossprod{\bf x}{j}||^2  =  \norm{\vector{x}}^2\norm{\vector{k}}^2 - (\dotprod{x}{k})^2 = 1 -
(\dotprod{x}{k})^2,$$and since $(\dotprod{x}{i})^2 +
(\dotprod{x}{j})^2 + (\dotprod{x}{k})^2 = \norm{\vector{x}}^2 = 1$,
the desired sum equals $3 - 1 = 2$.
\end{answer}
\end{pro}
\begin{pro}
The vectors $\vector{a}, \vector{b}$ are constant vectors. Solve the
equation $$\vector{a}\cross (\crossprod{x}{b}) = \vector{b} \cross
(\crossprod{x}{a}).$$
\begin{answer}
$$\vector{a}\cross (\crossprod{x}{b}) = \vector{b}
\cross (\crossprod{x}{a}) \iff (\dotprod{a}{b})\vector{x} -
(\dotprod{a}{x})\vector{b} = (\dotprod{b}{a})\vector{x} -
(\dotprod{b}{x})\vector{a} \iff \dotprod{a}{x} = \dotprod{b}{x} = 0.
$$The answer is thus $\{\vector{x}: \vector{x}\in
\reals\crossprod{a}{b}\}$.
\end{answer}
\end{pro}
\begin{pro}
If $\vector{a}+\vector{b}+\vector{c}= \vector{0}$, prove that
$$\crossprod{a}{b}=\crossprod{b}{c}=\crossprod{c}{a}.$$
\end{pro}
\begin{pro}
Assume $\vector{a}\bullet (\crossprod{b}{c})\neq 0$ and that
$$\vector{x}=\alpha \vector{a}+\beta\vector{b}+\gamma
\vector{c}.$$Find $\alpha$, $\beta$, and $\gamma$ in terms of
$\vector{a}\bullet (\crossprod{b}{c})$.
\end{pro}

\begin{pro}
The vectors $\vector{a}, \vector{b}, \vector{c}$ are constant
vectors. Solve the system of equations
$$2\vector{x} + \crossprod{y}{a} = \vector{b}, \ \ \ 3\vector{y} + \crossprod{x}{a} = \vector{c},   $$
\begin{answer} $$\vector{x} = \dfrac{(\dotprod{a}{b})\vector{a} + 6\vector{b} + 2\crossprod{a}{c}}{12 + 2\norm{\vector{a}}^2}$$
 $$\vector{y} = \dfrac{(\dotprod{a}{c})\vector{a} + 6\vector{c} + 3\crossprod{a}{b}}{18 + 3\norm{\vector{a}}^2}$$    \end{answer}

\end{pro}

\begin{pro}
Let $\vector{a}, \vector{b}, \vector{c}, \vector{d}$ be vectors in
$\reals^3$. Prove the following vector identity,
$$(\crossprod{a}{b})\bullet (\crossprod{c}{d}) = (\dotprod{a}{c})(\dotprod{b}{d})-(\dotprod{a}{d})(\dotprod{b}{c}).$$
\begin{answer}
First observe that  $$\vector{x}\bullet
(\crossprod{y}{z})=(\crossprod{x}{y})\bullet \vector{z} .
$$This is so because both sides give the volume of the parallelogram spanned by
$\vector{x}$, $\vector{y}$, $\vector{z}$. Now, putting $\vector{x} =
\crossprod{a}{b}$, $\vector{y}=\vector{c}$ and
$\vector{z}=\vector{d}$ we gather that
$$\begin{array}{lll}(\crossprod{a}{b})\bullet (\crossprod{c}{d}) & =
& ((\crossprod{a}{b})\cross \vector{c}) \bullet \vector{d}.
  \end{array}$$
Now, again,
$$ (\crossprod{a}{b})\cross \vector{c} = - \vector{c}\cross (\crossprod{a}{b}) = -((\dotprod{c}{b})\vector{a}- (\dotprod{c}{a})\vector{b})
=  (\dotprod{c}{a})\vector{b} -  (\dotprod{c}{b})\vector{a}. $$ This
gives
$$  ((\crossprod{a}{b})\cross \vector{c}) \bullet \vector{d} = ( (\dotprod{c}{a})\vector{b} -  (\dotprod{c}{b})\vector{a})\bullet \vector{d}
=(\dotprod{c}{a})(\dotprod{b}{d})-(\dotprod{c}{b})(\dotprod{a}{d}),$$proving
the identity.
\end{answer}
\label{pro:vector-id1}
\end{pro}
\begin{pro}
Let $\vector{a}$, $\vector{b}$, $\vector{c}$, $\vector{d}$, be
vectors in $\reals^3$. Prove that
$$\begin{array}{lll}(\crossprod{b}{c})\bullet
(\crossprod{a}{d}) & & \\ \qquad & +(\crossprod{c}{a})\bullet
(\crossprod{b}{d}) & \\ &+(\crossprod{a}{b})\bullet
(\crossprod{c}{d})  &  \\
 & = & 0.
\end{array}$$
\begin{answer}
By problem \ref{pro:vector-id1},
$$ (\crossprod{x}{y})\bullet (\crossprod{u}{v}) = (\dotprod{x}{u})\bullet (\dotprod{y}{v})-(\dotprod{x}{v})\bullet (\dotprod{y}{u}).  $$
Using this three times:
$$\begin{array}{lll}
(\crossprod{b}{c})\bullet
(\crossprod{a}{d}) & = &  (\dotprod{b}{a})\bullet (\dotprod{c}{d})-(\dotprod{b}{d})\bullet (\dotprod{c}{d})\\
(\crossprod{c}{a})\bullet
(\crossprod{b}{d}) & = & (\dotprod{c}{b})\bullet (\dotprod{a}{d})-(\dotprod{c}{d})\bullet (\dotprod{a}{b})\\
(\crossprod{a}{b})\bullet (\crossprod{c}{d}) & = & (\dotprod{a}{c})\bullet (\dotprod{b}{d})-(\dotprod{a}{d})\bullet (\dotprod{b}{c})\\
\end{array}
$$
Adding these three equalities, and using the fact that the dot
product is commutative, we see that all the terms on the dextral
side cancel out and we obtain $0$, as required.

\end{answer}

\end{pro}
\begin{pro}\label{pro:plane-cube1}
Consider the plane $\Pi$ passing through the points
 $A(6,0,0)$,  $B(0,4,0)$ and $C(0,0,3)$, as shewn in  figure \ref{fig:plane-cube}
 below. The plane $\Pi$ intersects  a $3\times 3 \times 3$ cube, one
 of
 whose vertices is at the origin  and that has three of its edges on
 the coordinate axes, as in the figure. This intersection forms a
 pentagon $CPQRS$.
\begin{enumerate}
\item  Find $\crossprod{CA}{CB}$.
\item Find $\norm{\crossprod{CA}{CB}}$.
\item Find the parametric equation of the line $L_{CA}$ joining $C$ and $A$, with a parameter $t\in \reals$.
\item Find the parametric equation of the line $L_{DE}$ joining $D$ and $E$, with a parameter $s\in \reals$.
\item  Find the intersection point between the lines $L_{CA}$ and $L_{DE}$.
\item Find the equation of the plane $\Pi$.
\item  Find the area of $\triangle ABC$.
\item Find the coordinates of the points $P$, $Q$,
$R$, and $S$.
\item Find the area of the pentagon $CPQRS$.
\end{enumerate}
\begin{answer}
\noindent

\begin{enumerate}
\item We have $$ \vector{CA} = \colvec{6\\ 0 \\ -3}, \quad
\vector{CB}=\colvec{0\\ 4 \\ -3} \implies \crossprod{CA}{CB}=
(6\vector{i}-3\vector{k})\cross (4\vector{j} -3\vector{k})= 24
\vector{k}+18\vector{j}+12\vector{i} = \colvec{12\\ 18\\ 24}.
$$
\item  We have $$\norm{\crossprod{CA}{CB}}=
\sqrt{12^2+18^2+24^2}=\sqrt{1044}=6\sqrt{29}.$$

\item  The desired line has equation
$$ \colpoint{x\\ y \\ z} = \colpoint{0\\ 0 \\ 3}+t\colvec{6\\ 0\\ -3} \implies x=6t, \quad y = 0, \quad z =3-3t. $$

\item  The desired line has equation
$$ \colpoint{x\\ y \\ z} = \colpoint{3\\ 0 \\ 0}+s\colvec{0\\ 0\\ -3} \implies x=3, \quad y = 0, \quad z =-3s. $$

\item  From the preceding items, the line $L_{CA}$ is $x=6t, \ y = 0, \ z =3-3t$   and the line $L_{DE}$ is
$ x=3, \ y = 0, \ z =-3s$. If the line intersect then $6t=3,\ 0=0, \
3-3t=-3s$ gives $t=\dfrac{1}{2}$ and $s=-\dfrac{1}{2}$. The point of
intersection is thus $\left(3,0,\frac{3}{2}\right)$. item The area
is
$$\dfrac{1}{2} \norm{\crossprod{CA}{CB}} =\dfrac{1}{2}\cdot 6\sqrt{29}=3\sqrt{29}.   $$
\item Observe that
$$ P = \colpoint{3\\ 0 \\ z}, \quad Q = \colpoint{3\\ y \\ 0}, \quad R = \colpoint{x\\ 3\\ 0}, \quad S=\colpoint{0\\ 3\\ z}.  $$
Since all this points lie on the plane $2x+3y+4z=12$, we find
$$ 2(3)+3(0)+4z=12 \implies  P = \colpoint{3\\ 0 \\ \frac{3}{2}},  $$
$$ 2(3)+3y+4(0)=12 \implies  Q = \colpoint{3\\ 2 \\ 0},  $$
$$ 2x+3(3)+4(0)=12 \implies  R = \colpoint{\frac{3}{2}\\ 3 \\ 0},  $$
$$ 2(0)+3(3)+4z=12 \implies  S = \colpoint{0\\ 3 \\ \frac{3}{4}}.  $$
\item A possible way is to decompose the pentagon into three triangles, say $\triangle CPQ$, $\triangle CQR$ and $\triangle CRS$
and find their areas. Another way would be to subtract from the area
of $\triangle ABC$ the areas of $\triangle APQ$ and $\triangle RSB$.
I will follow the second approach. Let $[\triangle APQ], [\triangle
RSB]$ denote the areas of $\triangle APQ$ and $\triangle RSB$
respectively. Then
$$ [\triangle APQ] = \dfrac{1}{2}\norm{\crossprod{PA}{PQ}} = \dfrac{1}{2}\norm{\colvec{3\\ 0 \\ \frac{3}{2}}\cross \colvec{0\\ 2\\ -\frac{3}{2}}} =\dfrac{1}{2}\norm{\colvec{-3\\ \frac{9}{2}\\ 6}} = \dfrac{1}{2}\sqrt{9+\dfrac{81}{4}+36} = \dfrac{3}{4}\sqrt{29},  $$
$$ [\triangle RSB] = \dfrac{1}{2}\norm{\crossprod{SR}{SB}} = \dfrac{1}{2}\norm{\colvec{\frac{3}{2}\\ 0 \\ -\frac{3}{4}}\cross \colvec{0\\ 1\\ -\frac{3}{4}}} =\dfrac{1}{2}\norm{\colvec{\frac{3}{4}\\ \frac{9}{8}\\ \frac{3}{2}}} = \dfrac{1}{2}\sqrt{\dfrac{9}{16}+\dfrac{81}{64}+\frac{9}{4}} = \dfrac{3}{16}\sqrt{29}.  $$
Hence the area of the pentagon is
$$ 3\sqrt{29}-\dfrac{3}{4}\sqrt{29}-\dfrac{3}{16}\sqrt{29} = \dfrac{33}{16}\sqrt{29}. $$
\end{enumerate}

\end{answer}
\end{pro}
\vspace{2cm}
\begin{figurehere}
\centering \psset{unit=1.5pc}
\psset{dotscale=0.75, arrowscale=1.2, linewidth=1pt}%
  \psset{xMin=0,yMin=0,zMin=0,Alpha=50, Beta=15,Dx=1,Dy=1,Dz=1,subticks=5,arrowsize=.2}%
  \pstThreeDLine[arrows=->,linewidth=1.5pt,linecolor=red](0,0,0)(7,0,0)%
  \pstThreeDLine[arrows=->,linewidth=1.5pt,linecolor=red](0,0,0)(0,5,0)%
  \pstThreeDLine[arrows=->,linewidth=1.5pt,linecolor=red](0,0,0)(0,0,4)%
  \pstThreeDPut(6.8,0,-0.3){\color{red}$x$}%
  \pstThreeDPut(0,4.8,-0.3){\color{red}$y$}%
  \pstThreeDPut(0.6,0,3.8){\color{red}$z$}%
  \pstThreeDPlaneGrid[planeGrid=xy,linewidth=0.1pt,linecolor=gray!70,ysubticks=5,xsubticks=7](0,0)(7,5)%
  \pstThreeDPlaneGrid[planeGrid=xz,linewidth=0.1pt,linecolor=gray!70,ysubticks=4,xsubticks=7](0,0)(7,4)%
  \pstThreeDPlaneGrid[planeGrid=yz,linewidth=0.1pt,linecolor=gray,ysubticks=4](0,0)(5,4)%
  \pstThreeDNode(0,0,0){O}  \pstThreeDNode(3,0,0){P1}%
  \pstThreeDNode(0,3,0){P2} \pstThreeDNode(0,0,3){P3}%
  \pstThreeDNode(3,0,3){P4} \pstThreeDNode(0,3,3){P5}%
  \pstThreeDNode(3,3,0){P6} \pstThreeDNode(3,3,3){P7}%
  \pspolygon[style=tCyanl](O)(P1)(P4)(P3)  \pspolygon[style=tCyanl](O)(P2)(P5)(P3)%
  \pspolygon[style=tCyanl](O)(P1)(P6)(P2)  \pspolygon[style=tCyanl](P1)(P6)(P7)(P4)%
  \pspolygon[style=tCyanl](P4)(P7)(P5)(P3) \pspolygon[style=tCyanl](P2)(P6)(P7)(P5)%
%
\pstThreeDPut(3,-.2,1.5){$P$} \pstThreeDPut(3,2,-.2){$Q$}
\pstThreeDPut(1.5,3,-.2){$R$} \pstThreeDPut(0,3.2,1){$S$}
\pstThreeDPut(6,.1,-.1){$A$} \pstThreeDPut(.2,4,-.1){$B$}
\pstThreeDPut[origin=rt](-.1,.35,3.2){$C$}
  \pstThreeDNode(6,0,0){A} \pstThreeDNode(0,4,0){B} \pstThreeDNode(0,0,3){C}%
  \pspolygon[style=tGelb](A)(B)(C)
%  Schnittpunkte
  \pstThreeDNode(3,0,1.5){S1}  \pstThreeDNode(3,2,0){S2}%
  \pstThreeDNode(1.5,3,0){S3}  \pstThreeDNode(0,3,0.75){S4}%
  \pcline[linecolor=blue!60](S1)(S2)%
  \pcline[linecolor=blue!60](S2)(S3)%
  \pcline[linecolor=blue!60](S3)(S4)%
  \pcline[linecolor=blue!60](S4)(P3)%
  \pcline[linecolor=blue!60](P3)(S1)%
  \pspolygon[style=tRot](S1)(S2)(S3)(S4)(P3)%
  \pcline(P6)(P7)%
  \pcline(P7)(P4)%
  \pcline(P7)(P5)%
\vspace{2cm} \footnotesize\hangcaption{Problem
\ref{pro:plane-cube1}..} \label{fig:plane-cube}
\end{figurehere}
\end{multicols}




\section{Matrices in three dimensions}
We will briefly introduce $3\times 3$ matrices. Most of the material
will flow like that for $2\times 2$ matrices.

\begin{df}
A {\em linear transformation} $T:\reals^3\rightarrow \reals^3$ is a
function such that
$$T(\point{a}+\point{b}) =  T(\point{a})+T(\point{b}), \qquad    T(\lambda\point{a}) = \lambda
T(\point{a}),$$ for all points $\point{a},\point{b}$ in $\reals^3$
and all scalars $\lambda$. Such a linear transformation has a
$3\times 3$ matrix representation whose columns are the vectors
$T(\point{i})$, $T(\point{j})$, and $T(\point{k})$.
\end{df}

\begin{exa}
Consider $L:\reals^3 \rightarrow \reals^3$, with
$$L\left(\colpoint{x_1 \\ x_2 \\ x_3}\right) = \colpoint{x_1 - x_2 - x_3 \\ x_1 + x_2 + x_3 \\ x_3 } .$$

\begin{dingautolist}{202}
\item  Prove that $L$ is a linear transformation. \item  Find the
matrix corresponding to $L$ under the standard basis.
\end{dingautolist}
\end{exa}
\begin{solu}\noindent
\begin{dingautolist}{202}
\item   Let $\alpha\in \reals$ and let $\point{u}, \point{v}$ be points in $\reals^3$. Then
$$\begin{array}{lll}
L(\point{u} + \point{v})& = &  L\left(\colpoint{u_1 +  v_1\\ u_2 + v_2 \\
u_3 + v_3}\right) \\
& = & \colpoint{(u_1 + v_1) - (u_2 + v_2) - (u_3 + v_3) \\
(u_1 + v_1) + (u_2 + v_2) + (u_3 + v_3) \\  u_3 + v_3} \\
& = & \colpoint{u_1 - u_2 - u_3 \\ u_1 + u_2 + u_3 \\ u_3 } +
\colpoint{v_1 - v_2 - v_3 \\ v_1 + v_2 + v_3\\ v_3 } \\
& = & L\left(\colpoint{u_1 \\ u_2 \\ u_3}\right) +  L\left(\colpoint{v_1 \\ v_2 \\ v_3}\right) \\
& = & L(\point{u}) + L(\point{v}),\\
\end{array}$$
and also
$$\begin{array}{lll}
L(\alpha\point{u}  )& = &  L\left(\colpoint{\alpha u_1 \\ \alpha u_2  \\
\alpha u_3 }\right) \\
& = & \colpoint{\alpha (u_1) - \alpha (u_2) - \alpha (u_3) \\
\alpha (u_1) + \alpha (u_2) + \alpha (u_3) \\  \alpha u_3} \\
& = & \alpha \colpoint{u_1 - u_2 - u_3 \\ u_1 + u_2 + u_3 \\ u_3 }\\
& = & \alpha L\left(\colpoint{u_1 \\ u_2 \\ u_3}\right)  \\
& = &\alpha  L(\point{u}) ,\\
\end{array}$$
proving that $L$ is a linear transformation.
\item We have $L\colpoint{ 1 \\ 0  \\ 0 } = \colpoint{ 1 \\ 1 \\
0 }$, $L\colpoint{ 0 \\ 1 \\ 0 } = \colpoint{ -1 \\ 1 \\ 0}$, and $L\colpoint{0 \\
0\\ 1} = \colpoint{-1 \\ 1 \\ 1}$, whence the desired matrix is
$$\begin{bmatrix} 1 & -1 & -1 \cr 1 & 1 & 1 \cr 0 & 0 & 1 \cr\end{bmatrix}.$$
\end{dingautolist}
\end{solu}
Addition, scalar multiplication, and matrix multiplication are
defined for $3\times 3$ matrices in a manner analogous to those
operations for $2\times 2$ matrices.

\begin{df}
Let $A, B$ be $3\times 3$ matrices. Then we define
$$A+B=[a_{ij}+b_{ij}], \qquad \alpha A = [\alpha a_{ij}], \qquad AB= \left[ \sum _{k=1} ^3 a_{ik}b_{kj}\right].$$
\end{df}
\begin{exa}
If $A = \begin{bmatrix} 1 & 2 & 3 \cr 4 & 5 & 0 \cr 6 & 0 & 0 \cr
\end{bmatrix}$, and $B=\begin{bmatrix} a & b &  c \cr a & b & 0 \cr a & 0 & 0 \cr
\end{bmatrix}$, then
$$A+B = \begin{bmatrix} 1+a & 2+b & 3+c \cr 4+a & 5+b & 0 \cr 6+a & 0 & 0 \cr
\end{bmatrix}, \qquad 3A = \begin{bmatrix} 3 & 6 & 9 \cr 12 & 15 & 0 \cr 18 & 0 & 0 \cr
\end{bmatrix}, $$  $$BA = \begin{bmatrix}  a+4b+6c&2a+5b&3a \cr a+4b&2a+5b& 3a\cr a&2a&3a
\end{bmatrix}, \qquad AB = \begin{bmatrix}  6a&3b&c\cr 9a&9b&4c\cr 6a&6b&6c
\end{bmatrix}.  $$
\end{exa}

\begin{df}
A {\em scaling matrix} is one of the form $$S_{a, b, c}
=\begin{bmatrix} a & 0 & 0 \cr 0 & b & 0 \cr 0 & 0 & c \cr
\end{bmatrix},
$$where $a>0$, $b>0$, $c>0$.
\end{df}
It is an easy exercise to prove that the product of two scaling
matrices commutes.
\begin{df}
A {\em rotation matrix} about the $z$-axis  by an angle $\theta$ in
the counterclockwise sense  is
$$R_{z}(\theta) =  \begin{bmatrix} \cos\theta & -\sin\theta & 0 \cr \sin\theta & \cos\theta & 0 \cr 0 & 0 & 1 \cr
\end{bmatrix}. $$
A {\em rotation matrix} about the $y$-axis   by an angle $\theta$ in
the counterclockwise sense  is
$$R_{y}(\theta) =  \begin{bmatrix} \cos\theta & 0  & -\sin\theta \cr    0 & 1 & 0 \cr \sin\theta & 0 & \cos\theta  \cr
\end{bmatrix}. $$
A {\em rotation matrix} about the $x$-axis by an angle $\theta$ in
the counterclockwise sense  is
$$R_{x}(\theta) =  \begin{bmatrix} 1 & 0 & 0 \cr  0 & \cos\theta & -\sin\theta  \cr  0 &   \sin\theta & \cos\theta  \cr
\end{bmatrix}. $$
\end{df}
Easy to find counterexamples should convince the reader that the
product of two rotations in space does not necessarily commute.

\begin{df}
A {\em reflexion matrix} about the $x$-axis is
$$R_{x} =  \begin{bmatrix} -1 & 0 & 0 \cr 0 & 1 & 0 \cr 0 & 0 & 1 \cr
\end{bmatrix}. $$
A {\em reflexion matrix} about the $y$-axis   is
$$R_{y} =  \begin{bmatrix} 1 & 0 & 0 \cr 0 & -1 & 0 \cr 0 & 0 & 1 \cr
\end{bmatrix}. $$
A {\em reflexion matrix} about the $z$-axis  is
$$R_{z} =  \begin{bmatrix} 1 & 0 & 0 \cr 0 & 1 & 0 \cr 0 & 0 & -1 \cr
\end{bmatrix}. $$
\end{df}

\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Let $A = \begin{bmatrix}1 & 0 & 0 \cr 1 & 1 & 0 \cr 1 & 1 & 1 \cr
\end{bmatrix}$. Find $A^2$, $A^3$ and $A^4$. Conjecture and, prove by
induction, a general formula for $A^n$.
\end{pro}
\begin{pro}
Let $A\in\mat{3\times 3}{\reals}$ be given by$$A =
\begin{bmatrix} 1 & 1 & 1 \cr 1 & 1 & 1 \cr 1 & 1 & 1 \cr
\end{bmatrix}.$$Demonstrate, using induction, that  $A^n = 3^{n - 1}A$ for $n \in \BBN , n \geq
1$.\begin{answer} The assertion is trivial for $n = 1$. Assume its
truth for $n -1$, that is, assume $A^{n - 1} = 3^{n - 2}A$. Observe
that
$$A^2 = \begin{bmatrix} 1 & 1 & 1 \cr 1 & 1 & 1 \cr 1 & 1 & 1 \cr
\end{bmatrix}\begin{bmatrix} 1 & 1 & 1 \cr 1 & 1 & 1 \cr 1 & 1 & 1 \cr
\end{bmatrix} = \begin{bmatrix} 3 & 3 & 3 \cr 3 & 3 & 3 \cr 3 & 3 & 3 \cr
\end{bmatrix} = 3A.$$Now
$$A^n = AA^{n - 1} = A(3^{n - 2}A) = 3^{n - 2}A^2 = 3^{n - 2}3A = 3^{n - 1}A, $$
and so the assertion is proved by induction.
\end{answer}
\end{pro}
\begin{pro}
 Consider the $n\times n$ matrix
$$ A = \begin{bmatrix} 1 & 1 & 1 & 1 & \ldots & 1 & 1 \cr
 0 & 1 & 1 & 1 & \ldots   & 1 & 1 \cr
  0 & 0 & 1 & 1 & \ldots & 1  & 1 \cr
   \ldots & \ldots & \vdots & \vdots &  \vdots & \ldots & \ldots \cr
    0 & 0 & 0 & 0 & \ldots  & 0  & 1 \cr         \end{bmatrix}. $$
Describe $A^2$ and $A^3$ in terms of $n$.

\begin{answer}
First, we will prove that
$$ A^2 = \begin{bmatrix} 1 & 2 & 3 & 4 & \ldots & n-1 & n \cr
 0& 1 & 2 & 3 & \ldots   & n-2 & n-1 \cr
  0 & 0 & 1 & 2 & \ldots & n-3  & n-2 \cr
   \ldots & \ldots & \vdots & \vdots &  \vdots & \ldots & \ldots \cr
    0 & 0 & 0 & 0 & \ldots  & 0  & 1 \cr         \end{bmatrix}. $$



 Observe that $A=[a_{ij}]$, where $a_{ij}=1$ for
$i \leq j$ and $a_{ij}=0$ for $i >j$.

\bigskip

  Put $A^2=[b_{ij}]$. Assume first that $i \leq
j$. Then
$$b_{ij}=\sum _{k=1} ^n a_{ik}a_{kj} = \sum _{k=i} ^j 1 = j-i +1.  $$
Assume now that $i>j$. Then
$$b_{ij}=\sum _{k=1} ^n a_{ik}a_{kj} = \sum _{k=1} ^n 0 = 0,  $$
proving the first statement. Now, we will prove that
$$ A^3 = \begin{bmatrix} 1 & 3 & 6 & 10 & \ldots & \dfrac{(n-1)n}{2} &  \dfrac{n(n+1)}{2} \cr
 0& 1 & 3 & 6 & \ldots   &  \dfrac{(n-2)(n-1)}{2} &  \dfrac{(n-1)n}{2} \cr
  0 & 0 & 1 & 3 & \ldots &  \dfrac{(n-3)(n-2)}{2}  &  \dfrac{(n-2)(n-1)}{2} \cr
   \ldots & \ldots & \vdots & \vdots &  \vdots & \ldots & \ldots \cr
    0 & 0 & 0 & 0 & \ldots  & 0  & 1 \cr         \end{bmatrix}.
    $$
For the second part, you need to know how to sum arithmetic
progressions. In our case, we need to know how to sum (assume $i\leq
j$),
$$S_1= \sum _{k=i} ^j a, \quad S_2= \sum _{k=i} ^j k.
$$The first sum is trivial: there are $j-i+1$ integers in the
interval $[i;j]$, and hence
$$S_1= \sum _{k=i} ^j a = S_1= a\sum _{k=i} ^j 1 = a(j-i+1). $$
For the second sum, we use Gau\ss\ trick: summing the sum forwards
is the same as summing the sum backwards, and so, adding the first
two rows below,
$$\begin{array}{llcllllllllll} S_2 &  =  & i& +  & i + 1& +  & i + 2 & + &
\cdots & +  & j-1 & + & j \\
 S_2 &  =  & j& +  & j-1& +  & j-2 & + &
\cdots & +  & i-1 & + & i \\
 \hline 2S_2 &  =  & (i+j)& +  & (i + j)& +  & (i + j) & + &
\cdots & +  & (i+j) & + & (i+j) \\
\hline 2S_2 &  =  & (i+j)(j-i+1)&   & &   &  &  &
\cdots &   & &  &  \\
\end{array},
$$which gives $S_2 = \dfrac{(i+j)(j-i+1)}{2}$.

\bigskip

Put  now $A^3=[c_{ij}]$. Assume first that $i \leq j$. Since
$A^3=A^2A$,
$$\begin{array}{lll}c_{ij} & = & \sum _{k=1} ^n b_{ik}a_{kj} \\
& = &  \sum _{k=i} ^j (k-i +1) \\
&   =  &  \sum _{k=i} ^j k - \sum _{k=i} ^j i + \sum _{k=i} ^j 1 \\
& = &  \dfrac{(j+i)(j-i+1)}{2} -i(j-i+1) + (j-i+1) \\
&  = &  \dfrac{( j-i+1 )(j-i+2) }{2}.
\end{array}$$ Assume now that $i>j$. Then
$$c_{ij}=\sum _{k=1} ^n b_{ik}a_{kj} = \sum _{k=1} ^n 0 = 0.  $$
This finishes the proof.
\end{answer}
\end{pro}
\begin{pro}
Let $x$ be a real number, and put $$m(x) = \begin{bmatrix}1 & 0 &
x\cr -x & 1 & -\dfrac{x^2}{2} \cr 0 &0 &1\cr \end{bmatrix}.  $$If
$a, b$ are real numbers, prove that
\begin{enumerate}
\item $m(a)m(b)=m(a+b)$.
\item $m(a)m(-a)={\bf I}_3$, the $3\times 3$ identity matrix.
\end{enumerate}
\begin{answer}
For the first part, observe that $$\begin{array}{lll}m(a)m(b) & = &
\begin{bmatrix}1 & 0 & a\cr -a & 1 & -\dfrac{a^2}{2} \cr 0 &0 &1\cr
\end{bmatrix}\begin{bmatrix}1 & 0 & b\cr
-b & 1 & -\dfrac{b^2}{2} \cr 0 &0 &1\cr \end{bmatrix}  \\
& = & \begin{bmatrix}1 & 0 & a+b\cr -a-b & 1 &
-\dfrac{a^2}{2}-\dfrac{b^2}{2}+ab \cr 0 &0
&1\cr \end{bmatrix}\\
 \\
& = & \begin{bmatrix}1 & 0 & a+b\cr -(a+b) & 1 & -\dfrac{(a+b)^2}{2}
\cr 0 &0
&1\cr \end{bmatrix}\\

& = & m(a+b)\end{array}$$ For the second part, observe that using
the preceding part of the problem, $$m(a)m(-a)= m(a-a) = m(0)
=\begin{bmatrix}1 & 0 & 0\cr -0 & 1 & -\dfrac{0^2}{2} \cr 0 &0 &1\cr
\end{bmatrix} ={\bf I}_3,$$giving the result.
\end{answer}
\end{pro}
\end{multicols}


\section{Determinants in three dimensions}
We now define the notion of {\em determinant} of a $3 \times 3$
matrix. Consider now the vectors $\vector{a}=\colvec{a_1\\ a_2 \\ a_3}$, $\vector{b}=\colvec{b_1\\
b_2 \\ b_3}$,  $\vector{c}=\colvec{c_1\\ c_2 \\ c_3}$, in
$\reals^3$, and the $3\times 3$ matrix $A= \begin{bmatrix}a_1 & b_1
& c_1 \cr a_2 & b_2 & c_2 \cr a_3 & b_3 & c_3 \cr
\end{bmatrix}$. Since thanks to Theorem
\ref{thm:vol-parallelepiped}, the volume of the parallelepiped
spanned by these vectors is $\vector{a}\bullet (\crossprod{b}{c})$,
we {\em define} the determinant of $A$, $\det A$, to be
\begin{equation}\label{eq:det3by3} D(\vector{a}, \vector{b}, \vector{c}) =
\det\begin{bmatrix}a_1 & b_1 & c_1 \cr a_2 & b_2 & c_2 \cr a_3 & b_3
& c_3 \cr
\end{bmatrix}=  \vector{a}\bullet (\crossprod{b}{c}).  \end{equation}

We now establish that the properties of the determinant of a
$3\times 3$ as defined above are analogous to those of the
determinant of  $2\times 2$ matrix defined in the preceding chapter.
\begin{thm}
The determinant of a $3\times 3$ matrix $A$ as defined by
(\ref{eq:det3by3}) satisfies the following properties:
\begin{enumerate}
\item $D$ is linear in each of its arguments.
\item If the parallelepiped is flat then the volume is $0$, that is, if $\vector{a}$, $\vector{b}$, $\vector{c}$, are linearly
dependent, then $ D(\vector{a}, \vector{b}, \vector{c}) =0$.
\item  $D(\vector{i}, \vector{j}, \vector{k}) =1$, and accords with the right-hand rule.
\end{enumerate}
\end{thm}
\begin{pf}
\noindent
\begin{enumerate}
\item If $D(\vector{a}, \vector{b}, \vector{c})= \vector{a}\bullet (\crossprod{b}{c})$, linearity of the first component
follows by the distributive law for the dot product:
$$\begin{array}{lll}D(\vector{a}+ \vector{a}', \vector{b}, \vector{c}) & = &
(\vector{a}+ \vector{a}')\bullet (\crossprod{b}{c}) \\ & = &
\vector{a}\bullet (\crossprod{b}{c}) + \vector{a}'\bullet
(\crossprod{b}{c})\\ &   = &  D(\vector{a}, \vector{b}, \vector{c})+
D(\vector{a}', \vector{b}, \vector{c}),
\end{array}
$$ and if $\lambda\in\reals$,
$$D(\lambda\vector{a}, \vector{b}, \vector{c}) = (\lambda \vector{a})\bullet (\crossprod{b}{c}) = \lambda ((\vector{a})\bullet (\crossprod{b}{c})) =
\lambda D(\vector{a}, \vector{b}, \vector{c}).     $$
 The linearity on
the second and third component can be established by using the
distributive law of the cross product. For example, for the second
component we have,
$$\begin{array}{lll}D(\vector{a}, \vector{b}+ \vector{b}', \vector{c}) & = &  \vector{a}\bullet ((\vector{b}+\vector{b}')\cross
\vector{c}) \\
& = &  \vector{a}\bullet (\crossprod{b}{c}+\crossprod{b'}{c})\\
&  = &  \vector{a}\bullet (\crossprod{b}{c}) + \vector{a}\bullet
(\crossprod{b'}{c})\\
&  = &  D(\vector{a}, \vector{b}, \vector{c})+ D(\vector{a},
\vector{b'}, \vector{c}),
\end{array}$$ and if $\lambda\in\reals$,
$$D(\vector{a}, \lambda\vector{b}, \vector{c}) = \vector{a}\bullet ((\lambda\vector{b})\cross \vector{c}) =
\lambda (\vector{a}\bullet (\crossprod{b}{c}))=
 \lambda D(\vector{a}, \vector{b}, \vector{c}).     $$
\item If $\vector{a}$, $\vector{b}$, $\vector{c}$, are linearly
dependent, then they lie on the same plane and the parallelepiped
spanned by them is flat, hence,$ D(\vector{a}, \vector{b},
\vector{c}) =0$.
\item  Since $\crossprod{j}{k}=\vector{i}$, and $\dotprod{i}{i}=1$, $$
D(\vector{i}, \vector{j}, \vector{k}) = \vector{i} \bullet
(\crossprod{j}{k})=\dotprod{i}{i}=1.$$
\end{enumerate}
\end{pf}
Observe that \begin{eqnarray}\det\begin{bmatrix}a_1 & b_1 & c_1 \cr
a_2 & b_2 & c_2 \cr a_3 & b_3 & c_3 \cr
\end{bmatrix} & = &   \vector{a}\bullet (\crossprod{b}{c}) \\
& = & \vector{a}\bullet \left((b_2c_3-b_3c_2)\vector{i} +
(b_3c_1-b_1c_3)\vector{j}+(b_1c_2-b_2c_1)\vector{k}\right)\\
& = & a_1(b_2c_3-b_3c_2) + a_2(b_3c_1-b_1c_3)+a_3(b_1c_2-b_2c_1)\\
& = & a_1\det \begin{bmatrix} b_2 & c_2 \cr b_3 & c_3 \cr
\end{bmatrix} -a_2\det \begin{bmatrix} b_1 & c_1 \cr b_3 & c_3 \cr
\end{bmatrix} + a_3\det \begin{bmatrix} b_1 & c_1 \cr b_2 & c_2 \cr
\end{bmatrix}, \label{eq:3x3determinant}
\end{eqnarray}which reduces the computation of $3\times 3$
determinants to $2\times 2$ determinants.
\begin{exa}
Find $\det\begin{bmatrix} 1 & 2 & 3 \cr 4 & 5 & 6 \cr  7 & 8 & 9 \cr
\end{bmatrix}.$
\end{exa}
\begin{solu} Using (\ref{eq:3x3determinant}), we have \begin{eqnarray*}\det A  & = & 1\det
\begin{bmatrix} 5 & 6 \cr 8 & 9 \end{bmatrix} -4\det
\begin{bmatrix} 2& 3 \cr 8 & 9 \end{bmatrix} + 7\det
\begin{bmatrix} 2 & 3 \cr 5 & 6 \end{bmatrix} \\ &  =  & 1(45 - 48) -
4(18 - 24) + 7(12 - 15 )\\
& = & -3+24-21 \\ & = &  0. \end{eqnarray*}
\end{solu}




Again, we may use the Maple\TM packages \verb+linalg+,
\verb+LinearAlgebra+, or \verb+Student[VectorCalculus]+ to perform
many of the vector operations. An example follows with
\verb+linalg+.

\bigskip

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(linalg):}{}
\mapleinline{active}{1d}{a:=vector([-2,0,1]);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[a := [-2, 0,1]\]}
\end{maplelatex}
\mapleinline{active}{1d}{b:=vector([-1,3,0]);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[b := [-1, 3,0]\]}
\end{maplelatex}
\mapleinline{active}{1d}{crossprod(a,b);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[ [-3,-1,-6 ]\]}
\end{maplelatex}
\mapleinline{active}{1d}{dotprod(a,b);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[2\]}
\end{maplelatex}
\mapleinline{active}{1d}{angle(a,b);}{} \mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{}{\[\arccos\left(\dfrac{\sqrt{50}}{25}\right)\]}
\end{maplelatex}
\end{mapleinput}
\end{maplegroup}





\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900


\begin{pro}
Prove that
$$\det \begin{bmatrix}
     1 & 1 & 1 \cr a & b & c \cr a^2 & b^2 & c^2\cr
\end{bmatrix}=(b-c)(c-a)(a-b).$$
\end{pro}
\begin{pro}
Prove that $$ \det \begin{bmatrix}
     a & b & c \cr b & c & a \cr c & a& b\cr
\end{bmatrix} = 3abc-a^3-b^3-c^3.$$
\end{pro}
\end{multicols}

\section{Some Solid Geometry}
In this section we examine some examples and prove some theorems of
three-dimensional geometry.


\vspace*{2cm}

\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering \psset{unit=4.2pc}
  \pstThreeDNode(0,0,0){D}
  \pstThreeDNode(0,0,1){D'}
  \pstThreeDNode(1,0,0){A}
  \pstThreeDNode(1,1,0){B}
  \pstThreeDNode(0,1,0){C}
  \pstThreeDNode(1,0,1){A'}
  \pstThreeDNode(1,1,1){B'}
  \pstThreeDNode(0,1,1){C'}
  \pstMiddleAB[PosAngle=10]{B}{B'}{M}
    \pstMiddleAB[PosAngle=-10]{B'}{C'}{N}
\pscustom[fillstyle=solid,fillcolor=yellow]{\pstLineAB{A}{D'}\pstLineAB{D'}{N}\pstLineAB{N}{M}\pstLineAB{M}{A}}
  \pspolygon[linewidth=2pt](A)(A')(B')(B)
  \pspolygon[linewidth=2pt](B)(B')(C')(C)
  \pspolygon[linewidth=2pt](A')(D')(C')(B')
  \pstLineAB[linestyle=dashed]{A}{D'}
   \pstLineAB[linestyle=dashed]{D}{D'}
    \pstLineAB[linestyle=dashed]{A}{D}
     \pstLineAB[linestyle=dashed]{D}{C}
   \newcounter{lettre}
  \multido{\i=1+1}{3}{%
    \setcounter{lettre}{\i}
    \psdot[linecolor=red](\Alph{lettre})
    \uput[-90](\Alph{lettre}){\Alph{lettre}}
  }
  \psdot[linecolor=red](D) \uput[0](D){$D$}
  \psdot[linecolor=red](A') \uput[90](A'){$A'$}
  \psdot[linecolor=red](B') \uput[75](B'){$B'$}
  \psdot[linecolor=red](C') \uput[90](C'){$C'$}
\psdot[linecolor=red](D') \uput[90](D'){$D'$}
  \vspace*{2cm}\footnotesize\hangcaption{Example \ref{exa:cube-1}.}
\label{fig:cube-1}
\end{minipage}
\begin{minipage}{7cm}
\centering
\pstGeonode[PosAngle={180,0,90,90}](-2,-1){D'}(2,-1){A}(1,1){M}(-1,1){N}
\pstLineAB[linewidth=2pt]{D'}{A}\pstLineAB[linewidth=2pt]{A}{M}
\pstLineAB[linewidth=2pt]{M}{N} \pstLineAB[linewidth=2pt]{N}{D'}
\pstProjection{D'}{A}{M}[P]\pstProjection{D'}{A}{N}[Q]
\pstLineAB[linestyle=dashed]{M}{P}\pstLineAB[linestyle=dashed]{N}{Q}
  \vspace*{2cm}\footnotesize\hangcaption{Example \ref{exa:cube-1}.}
\label{fig:cube-1-1}
\end{minipage}
\end{figure}



\begin{exa}\label{exa:cube-1}
Cube $\point{ABCDD'C'B'A}$ in figure \ref{fig:cube-1} has side of
length $a$. $\point{M}$ is the midpoint of edge $[\point{BB'}]$ and
$\point{N}$ is the midpoint of edge $[\point{B'C'}]$. Prove that
$\vector{AD'}\parallel \vector{MN}$ and find the area of the
quadrilateral $\point{MND'A}$.
\end{exa}
\begin{solu}By the Pythagorean Theorem, $\norm{\vector{AD'}} =
a\sqrt{2}$. Because they are diagonals that  belong to parallel
faces of the cube, $\vector{AD'}\parallel \vector{BC'}$. Now, $M$
and $N$ are the midpoints of the sides $[B'B]$ and $[B'C']$ of
$\triangle B'C'B$, and hence $\vector{MN}\parallel \vector{BC'}$ by
example \ref{exa:recta-media-triangulo}. The aforementioned example
also gives $\norm{\vector{MN}} = \dfrac{1}{2}\norm{\vector{AD'}} =
\dfrac{a\sqrt{2}}{2}$. In consequence, $\vector{AD'}\parallel
\vector{MN}$. This means that the four points $\point{A},
\point{D'}, \point{M}, \point{N}$ are all on the same plane. Hence
$\point{MND'A}$ is a trapezoid with bases of length $ a\sqrt{2}$ and
$\dfrac{a\sqrt{2}}{2}$ (figure \ref{fig:cube-1-1}). From the figure
$$\norm{\vector{D'Q}} = \norm{\vector{AP}} = \dfrac{1}{2}\left(\norm{\vector{AD'}} - \norm{\vector{MN}}\right) =  \dfrac{a\sqrt{2}}{4}.     $$
Also, by the Pythagorean Theorem,
$$ \norm{\vector{D'N}} = \sqrt{\norm{\vector{D'C'}}^2+\norm{\vector{C'N}}^2}=\sqrt{a^2+\dfrac{a^2}{4}} = \dfrac{a\sqrt{5}}{2}. $$
 The height of this trapezoid is thus
 $$\norm{\vector{NQ}}=\sqrt{\dfrac{5a^2}{4}-\dfrac{a^2}{8}} = \dfrac{3a}{2\sqrt{2}}.   $$
The area of the trapezoid is finally,
$$  \dfrac{3a}{2\sqrt{2}}\cdot \left(\dfrac{a\sqrt{2}+ \dfrac{a\sqrt{2}}{2}}{2}\right) = \dfrac{9a^2}{8}. $$
\end{solu}

Let us prove  a three-dimensional version of Thales' Theorem.
\begin{thm}[Thales' Theorem]\label{thm:thales3d}
Of two lines are cut by three parallel planes, their corresponding
segments are proportional.
\end{thm}
\begin{pf}
See figure \ref{fig:thales3d}. Given the lines $\line{AB}$ and
$\line{CD}$, we must prove that
$$ \dfrac{\dd{AE}}{\dd{EB}} =  \dfrac{\dd{CF}}{\dd{FD}}.  $$
Draw line $\line{AD}$ cutting plane $P2$ in $G$. The plane
containing points $\point{A}$, $\point{B}$, and $\point{D}$
intersects plane $P2$ in the line $\line{EG}$. Similarly the plane
containing points $\point{A}$, $\point{C}$, and $\point{D}$
intersects plane $P2$ in the line $\line{GF}$. Since $P2$ and $P3$
are parallel planes, $\line{EG}\parallel \line{BD}$, and so by
Thales' Theorem on the plane (theorem \ref{thm:thales}),
$$\dfrac{\dd{AE}}{\dd{EB}} =  \dfrac{\dd{AG}}{\dd{GD}}.   $$
Similarly,  since $P1$ and $P2$ are parallel, $\line{AC}\parallel
\line{GF}$ and
$$\dfrac{\dd{CF}}{\dd{FD}} =  \dfrac{\dd{AG}}{\dd{GD}}.   $$
It follows that
$$\dfrac{\dd{AE}}{\dd{EB}} = \dfrac{\dd{CF}}{\dd{FD}},$$as needed to
be shewn.
\end{pf}
\vspace*{3cm}
\begin{figure}[htpb]
\begin{minipage}{5.5cm}
\centering \psset{unit=1.2pc} \pstLineAB{A}{B}\pstLineAB{A}{C}
\ThreeDput[normal=0 .2
1](-1,0,3){\pscustom[fillcolor=magenta,fillstyle=solid]{\psline(-3,-3)(3,-3)(3,1)(-3,1)(-3,-3)}}
\ThreeDput[normal=0 .2
1](1,0,0){\pscustom[fillcolor=yellow,fillstyle=solid]{\psline(-3,-3)(3,-3)(3,1)(-3,1)(-3,-3)}}
\ThreeDput[normal=0 .2
1](0,4,-7){\pscustom[fillcolor=cyan,fillstyle=solid]{\psline(-3,-3)(3,-3)(3,1)(-3,1)(-3,-3)}}
\pstGeonode[PosAngle={90,180,90,0}](-1,3){A}(0,0){E}(1,0){G}(0,4){C}
\pstLineAB{A}{E}
\pstTranslation[PosAngle=180]{A}{E}{E}[B]\pstTranslation[PosAngle=0]{A}{G}{G}[D]
\pstTranslation[PosAngle=45,DistCoef=.5]{C}{D}{C}[F]
\pstLineAB[linecolor=red]{E}{B}
\pstLineAB[linecolor=blue]{E}{G}\pstLineAB[linecolor=blue]{B}{D}
\pstLineAB[linecolor=brown]{C}{D}\pstLineAB[linecolor=brown]{C}{A}
\pstLineAB[linecolor=brown]{G}{F}
\pstLineAB[linestyle=dashed,linewidth=1.6pt]{A}{D}
\pstGeonode[PosAngle=180,PointSymbol=none](-8,4){P1}(-6,0){P2}(-5,-3){P3}
%\psgrid[gridlabels=.4](-10,-10)(10,10)
\vspace*{4cm}\footnotesize\hangcaption{Thales' Theorem in 3D.}
\label{fig:thales3d}
\end{minipage}
\begin{minipage}{5.5cm}
 \centering \psset{unit=4.2pc, viewpoint=1 .2 1.2}
 \rput(1,0){
  \pstThreeDNode(0,0,0){D}
  \pstThreeDNode(0,0,1){D'}
  \pstThreeDNode(1,0,0){A}
  \pstThreeDNode(1,1,0){B}
  \pstThreeDNode(0,1,0){C}
  \pstThreeDNode(1,0,1){A'}
  \pstThreeDNode(1,1,1){B'}
  \pstThreeDNode(0,1,1){C'}
  \pstTranslation[DistCoef=.55,PosAngle=-90]{A}{B'}{A}[M]
  \pstTranslation[DistCoef=.45,PosAngle=-45]{B}{C'}{B}[N]
  \pspolygon[linewidth=2pt](A)(A')(B')(B)
  \pspolygon[linewidth=2pt](B)(B')(C')(C)
  \pspolygon[linewidth=2pt](A')(D')(C')(B')
   \pstLineAB[linestyle=dashed]{D}{D'}
    \pstLineAB[linestyle=dashed]{A}{D}
     \pstLineAB[linestyle=dashed]{D}{C}
     \pstLineAB[linestyle=dotted,linewidth=1.4pt]{A}{B'}
     \pstLineAB[linestyle=dotted,linewidth=1.4pt]{B}{C'}
     \pstLineAB[linewidth=2pt,linecolor=red]{M}{N}
   \newcounter{lettr}
  \multido{\i=1+1}{3}{%
    \setcounter{lettr}{\i}
    \psdot[linecolor=red](\Alph{lettr})
    \uput[-90](\Alph{lettr}){\Alph{lettr}}
  }
  \psdot[linecolor=red](D) \uput[0](D){$D$}
  \psdot[linecolor=red](A') \uput[90](A'){$A'$}
  \psdot[linecolor=red](B') \uput[75](B'){$B'$}
  \psdot[linecolor=red](C') \uput[90](C'){$C'$}
\psdot[linecolor=red](D') \uput[90](D'){$D'$}}
\vspace*{4cm}\footnotesize\hangcaption{Example \ref{exa:cube-2}.}
\label{fig:cube-2}
\end{minipage}
\begin{minipage}{5.5cm}
 \centering\psset{unit=4.2pc}
  \rput(1.5,0){ \pstThreeDNode(0,0,0){D}
  \pstThreeDNode(0,0,1){D'}
  \pstThreeDNode(1,0,0){A}
  \pstThreeDNode(1,1,0){B}
  \pstThreeDNode(0,1,0){C}
  \pstThreeDNode(1,0,1){A'}
  \pstThreeDNode(1,1,1){B'}
  \pstThreeDNode(0,1,1){C'}
\pstMiddleAB[PosAngle=180]{A}{A'}{A''}
  \pstMiddleAB[PosAngle=-15]{B}{B'}{B''}
  \pstMiddleAB[PosAngle=0]{C}{C'}{C''}
  \pstMiddleAB[PosAngle=60]{D}{D'}{D''}
\pscustom[fillstyle=solid,fillcolor=yellow]{\pspolygon(A'')(B'')(C'')(D'')}
  \pspolygon[linewidth=2pt](A)(A')(B')(B)
  \pspolygon[linewidth=2pt](B)(B')(C')(C)
  \pspolygon[linewidth=2pt](A')(D')(C')(B')
   \pstLineAB[linestyle=dashed]{D}{D'}
    \pstLineAB[linestyle=dashed]{A}{D}
     \pstLineAB[linestyle=dashed]{D}{C}
     \pstMiddleAB[PosAngle=-90]{A}{B'}{M}
  \pstMiddleAB[PosAngle=-30]{B}{C'}{N}
      \newcounter{lettr1}
  \multido{\i=1+1}{3}{%
    \setcounter{lettr1}{\i}
    \psdot[linecolor=red](\Alph{lettr1})
    \uput[-90](\Alph{lettr1}){\Alph{lettr1}}
  }
  \psdot[linecolor=red](D) \uput[0](D){$D$}
  \psdot[linecolor=red](A') \uput[90](A'){$A'$}
  \psdot[linecolor=red](B') \uput[75](B'){$B'$}
  \psdot[linecolor=red](C') \uput[90](C'){$C'$}
\psdot[linecolor=red](D') \uput[90](D'){$D'$} }
\vspace*{4cm}\footnotesize\hangcaption{Example \ref{exa:cube-2}.}
\label{fig:cube-2-1}
\end{minipage}
\end{figure}




\begin{exa}\label{exa:cube-2}
In cube $\point{ABCDD'C'B'A'}$ of edge of length  $a$,  the points
$\point{M}$ and $\point{N}$ are located on diagonals $[\point{AB'}]$
and $[\point{BC'}]$ such that $\vector{MN}$ is parallel to the face
$\point{ABCD}$ of the cube. If $\norm{\vector{MN}} =
\dfrac{\sqrt{5}}{3}\norm{\vector{AB}}$, find the ratios
$\dfrac{\norm{\vector{AM}}}{\norm{\vector{AB'}}}$ and
$\dfrac{\norm{\vector{BN}}}{\norm{\vector{BC'}}}$.
\end{exa}
\begin{solu}
There is a unique plane parallel $P$ to face $\point{ABCD}$ and
containing $\point{M}$. Since $\vector{MN}$ is parallel to face
$\point{ABCD}$ , $P$ also contains $\point{N}$. The intersection of
$P$ with the cube produces a lamina $\point{A''B''C''D''}$, as in
figure \ref{fig:cube-2-1}.

\bigskip

First notice that $\norm{\vector{AB'}}=\norm{\vector{BC'}} =
a\sqrt{2}$. Put
$$\dfrac{\norm{\vector{AM}}}{\norm{\vector{AB'}}}=x\implies
 \dfrac{\norm{\vector{MB'}}}{\norm{\vector{AB'}}} = \dfrac{\norm{\vector{AB'}}-\norm{\vector{AM}}}{\norm{\vector{AB'}}} = 1-x.  $$
Now, as $\triangle B'AB \sim \triangle B'MB'' $ and $\triangle
BC'B' \sim \triangle BNB''$,
$$\begin{array}{lll}\dfrac{\norm{\vector{MB'}}}{\norm{\vector{AB'}}} =
\dfrac{\norm{\vector{B''B'}}}{\norm{\vector{BB'}}},\qquad
\dfrac{\norm{\vector{MB'}}}{\norm{\vector{AB'}}} =
\dfrac{\norm{\vector{MB''}}}{\norm{\vector{AB}}}& \implies  &
\norm{\vector{MB''}} = (1-x)a,
\end{array}
$$
$$\begin{array}{lll}\dfrac{\norm{\vector{BB''}}}{\norm{\vector{BB'}}} =
\dfrac{\norm{\vector{AM}}}{\norm{\vector{AB'}}},\qquad
\dfrac{\norm{\vector{B''N}}}{\norm{\vector{B'C'}}} =
\dfrac{\norm{\vector{BB''}}}{\norm{\vector{BB'}}}& \implies  &
\norm{\vector{B''N}} = xa.
\end{array}
$$
Since $\norm{\vector{MN}} = \dfrac{\sqrt{5}}{3}a$, by the
Pythagorean Theorem,
$$\norm{\vector{MN}}^2 = \norm{\vector{MB''}}^2 + \norm{\vector{B''N}}^2
\implies\dfrac{5}{9} a^2 = (1-x)^2a^2 +  x^2a^2  \implies
  x\in\left\{\dfrac{1}{3}, \dfrac{2}{3}\right\}.$$
There are two possible positions for the segment, giving the
solutions
$$\dfrac{\norm{\vector{AM}}}{\norm{\vector{AB'}}}=
\dfrac{\norm{\vector{BN}}}{\norm{\vector{BC'}}}=\dfrac{1}{3}, \qquad
\dfrac{\norm{\vector{AM}}}{\norm{\vector{AB'}}}=
\dfrac{\norm{\vector{BN}}}{\norm{\vector{BC'}}}=\dfrac{2}{3}.$$


\end{solu}



\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
In a regular tetrahedron with vertices $A, B, C, D$ and with $\norm{\vector{AB}}=a$, points $M$ and $N$ are the midpoints of the edges $[AB]$ and $[CD]$,
respectively.
\begin{enumerate}
\item Find the length of the segment $[MN]$.
\item Find the angle between the lines $[MN]$ and $[BC]$.
\item Prove that $\vector{MN}\perp \vector{AB}$ and $\vector{MN}\perp\vector{CD}$.
\end{enumerate}
\begin{answer}$\dfrac{a}{\sqrt{2}}$, $\dfrac{\pi}{4}$.
\end{answer}
\end{pro}
\begin{pro}
In a tetrahedron $ABCD$, $\norm{\vector{AB}}=\norm{\vector{BC}}$, $\norm{\vector{AD}}=\norm{\vector{DC}}$. Prove that
$\vector{AC}\perp \vector{BD}$.
\end{pro}
\begin{pro}
In cube $\point{ABCDD'C'B'A'}$ of edge of length  $a$, find the distance between the lines that contain the diagonals
$[A'B]$ and $[AC]$.
\begin{answer}
$\dfrac{a}{\sqrt{3}}$
\end{answer}
\end{pro}

\end{multicols}

\section{Cavalieri, and the Pappus-Guldin Rules}


\begin{thm}[Cavalieri's Principle] All planar regions with cross sections of proportional length at the same height have  area in the same proportion.
All solids with cross sections of proportional areas at the same height
have their volume in the same proportion.
\end{thm}
\begin{pf}We only provide the proof for the second statement, as the proof for the first is similar.
Cut any  two such solids by horizontal planes that produce cross
sections of  area $A(x)$ and $cA(x)$, where $c>0$ is the constant of proportionality, at an arbitrary height $x$ above a
fixed base. From elementary calculus, we know that $\int _{x_1}
^{x_2}A(x)\d{x}$ and $\int _{x_1}
^{x_2}cA(x)\d{x}$  give the volume of the portion of each solid cut
by all horizontal planes as $x$ runs over some interval $[x_1;x_2]$.
As $\int _{x_1}
^{x_2}A(x)\d{x}=c\int _{x_1}
^{x_2}A(x)\d{x}$ the corresponding
volumes must also be proportional.
\end{pf}



\begin{exa}
Use Cavalieri's Principle in order to deduce that the area enclosed by the ellipse with equation $\dfrac{x^2}{a^2}+\dfrac{y^2}{b}=1$, $a>0, b>0$,
is $\pi ab$.
\end{exa}
\begin{solu}
Consider the circle with equation $x^2+y^2=a^2$, as in figure \ref{fig:ellipse-circle}. Then, for $y>0$,
$$y = \sqrt{a^2-x^2}, \qquad y =\dfrac{b}{a}\sqrt{a^2-x^2}.  $$The corresponding ordinate for the ellipse and the circle are proportional, and hence, the corresponding
chords for the ellipse and the circle will be proportional. By Cavalieri's first principle,
$$ \begin{array}{lll} \mathrm{Area\ of\ the\ ellipse}  & = &  \frac{b}{a}\mathrm{Area\ of\ the\ circle}\\
   & = & \frac{b}{a}\pi a^2 \\
   & = & \pi ab.\end{array}$$
\end{solu}

\vspace{4cm}
\begin{figure}[htpb]

\begin{minipage}{5cm}
\centering \psset{unit=2pc}
\rput(0,2){\psaxes[labels=none,ticks=none,
arrows={->}](0,0)(-2.3,-2.3)(2.3,2.3)
\pstGeonode[PointName=none](0,0){O}(2,0){A}(2;60){B}(2;-60){B'}
\pstCircleOA[linewidth=2pt,linecolor=green]{O}{A}
\psellipse[linewidth=2pt,linecolor=red](O)(2,.75)} \psline(B)(B')
\vspace{1cm}\footnotesize\hangcaption{Ellipse and circle.}
\label{fig:ellipse-circle}
\end{minipage}\hfill
\begin{minipage}{5cm}
\centering \psset{unit=4pc}
\pstGeonode[PointName=none](0,0){O}(-1.5,1.5){A}(1.5,1.5){A'}(-1.5,0){B}(1.5,0){B'}(0,1){C}(.95,1){D}
\pstGeonode[PointName=none,PointSymbol=none](0,1.5){E}
\psellipse(O)(1.5,.25) \psellipse*[linecolor=cyan](C)(1.5,.45)
\psellipse*[linecolor=yellow](C)(.95,.25) \psellipse(E)(1.5,.35)
\psline(O)(A)\psline(O)(A')
\psline(B)(A)\pcline{|-|}(B')(A')\lput*{:D}{$a$}
\ncline{D}{C}\ncput*{$x$} \pcline{|-|}(O)(C)\lput*{:D}{$x$}
\pcline{|-|}(O)(B')\mput*{$a$}
\vspace{1cm}\footnotesize\hangcaption{Punctured cylinder.}
\label{fig:punctured-cyl}
\end{minipage}\hfill
\begin{minipage}{5cm}
\centering \psset{unit=4pc}
\pstGeonode[PointName=none](0,0){O}(-1.5,0){B}(1.5,0){B'}(0,1){C}(1.1,1){D}
\pstGeonode[PointName=none,PointSymbol=none](0,1.5){E}
\psellipse(O)(1.5,.25) \psellipse*[linecolor=cyan](C)(1.1,.2)
\pcline{|-|}(O)(C)\lput*{:D}{$x$} \pcline{|-|}(O)(B')\mput*{$a$}
\pcline{|-|}(C)(D)\mput*{$r$} \pcline{|-|}(O)(D)\mput*{$a$}
\pstArcOAB{O}{B'}{B}
\vspace{1cm}\footnotesize\hangcaption{Hemisphere.}
\label{fig:hemisphere}
\end{minipage}
\end{figure}


\begin{exa}
Use Cavalieri's Principle in order to deduce that the volume of a sphere with radius $a$ is $\dfrac{4}{3}\pi a^3$.
\end{exa}
\begin{solu}
The following method is due to Archimedes, who was so proud of it that he wanted a sphere inscribed in a cylinder on his tombstone. We need to recall that the
volume of a right circular cone with base radius $a$ and height $h$ is $\dfrac{\pi a^2h}{3}$.

\bigskip

Consider a hemisphere of radius $a$, as in figure \ref{fig:hemisphere}. Cut a horizontal slice at height $x$, producing a circle of radius $r$. By the Pythagorean Theorem,
$ x^2+r^2=a^2  $, and so this circular slab has area $\pi r^2 = \pi (a^2-x^2)$. Now, consider a punctured cylinder of base radius $a$ and height $a$,
as in figure \ref{fig:punctured-cyl}, with a cone of height $a$ and base radius $a$ cut from it. A horizontal slab  at height $x$ is an annular region of area
$\pi a^2 - \pi x^2$, which agrees with a horizontal slab for the sphere at the same height. By Cavalieri's Principle,
$$ \begin{array}{lll} \mathrm{Volume\ of\ the\ hemisphere} & = &  \mathrm{Volume\ of\ the\ punctured\ cylinder}\\
   & = & \pi a^3 - \dfrac{\pi a^3}{3} \\
   & = & \dfrac{2\pi a^3}{3}.\end{array}$$It follows that the volume of the sphere is $2\left(\dfrac{2\pi a^3}{3}\right)=\dfrac{4\pi a^3}{3}$.
\end{solu}



Essentially the same method of proof as Cavalieri's Principle gives the next result.

\begin{thm}[Pappus-Guldin Rule] The area of the lateral surface of a
solid of revolution is equal to the product of the length of the
generating curve on the side of the axis of revolution and the
length of the path described by the centre of gravity of the
generating curve under a full revolution. The volume of a
solid of revolution is equal to the product of the area of the
generating plane on one side of the revolution axis and the length
of the path described by the centre of gravity of the area under a
full revolution about the axis.
\end{thm}
\vspace{2cm}

\begin{figure}[htpb]
\definecolor{light}{rgb}{0.4,0.2,0.5}
\def\drawtorus{%
  \parametricplotThreeD[xPlotpoints=100,linecolor=light,linewidth=0.1pt,](0,360)(0,360){%
    /k 2 def /k2 4 def
    t cos k mul 3 u sin k mul add mul
    t sin k mul 3 u sin k mul add mul
    u cos k2 mul
  }
  \parametricplotThreeD[yPlotpoints=75,linecolor=light,linewidth=0.1pt,](0,360)(0,360){%
    /k 2 def /k2 4 def
    u cos k mul 3 t sin k mul add mul
    u sin k mul 3 t sin k mul add mul
    t cos k2 mul
  }
  \parametricplotThreeD[yPlotpoints=2,linecolor=red,linewidth=2pt](0,360)(0,360){%
    /k 2 def /k2 4 def
    u cos k mul 3 t sin k mul add mul
    u sin k mul 3 t sin k mul add mul
    t cos k2 mul
  }
} \centering \psset{Beta=20,Alpha=50,unit=.5pc} \drawtorus
  \pstGeonode[PointName=none,dotscale=1.1](0,0){O}(-4,-2){A}(-4,1.8){B}
  \pcline(O)(A)\mput*{$R$}
  \pcline(A)(B)\mput*{$r$}
\vspace{2cm}\footnotesize\hangcaption{A torus.}\label{fig:torus1}
  \end{figure}

\begin{exa}\label{exa:torus-sur-vol}
Since the centre of gravity of a circle is at its centre, by the Pappus-Guldin Rule, the surface area of the torus
with the generating circle having radius $r$, and  radius of gyration $R$ (as in figure \ref{fig:torus1})
is $(2\pi r)(2\pi R) = 4\pi^2 rR$.  Also, the volume of the solid torus is $(\pi r^2) (2\pi R) = 2\pi^2 r^2 R$.
\end{exa}

\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Use the Pappus-Guldin Rule to find the lateral area and the volume
of a right circular cone with base radius $r$ and height $h$.
\begin{answer}


Consider a right triangle $\triangle ABC$ rectangle at $A$ with legs
of length $CA=h$ and $AB=r$, as in figure \ref{fig:generating-cone}.
The cone is generated when the triangle rotates about $CA$. The
gyrating curve is the hypotenuse, whose centroid is its centre. The
length of the generating curve is thus $\sqrt{r^2+h^2}$ and the
length of curve described by the centre of gravity is $2\pi
\left(\dfrac{r}{2}\right)=\pi r$. The lateral area is thus $\pi
r\sqrt{r^2+h^2}$.


\vspace{4cm}
\begin{figure}[!hptb]
\centering\psset{unit=1.5pc}
\pstGeonode[PosAngle={225,90,0}](0,0){A}(3,0){B}(0,4){C}
\pstMiddleAB[PointName=none]{C}{A}{M}
\pstMiddleAB[PointName=none]{B}{C}{M'}
\psline(A)(M')\pstCGravABC{A}{B}{C}{G}
\pstProjection[PosAngle=-45]{C}{A}{G}[G']\pcline[offset=12pt]{|-|}(A)(G')\mput*[:U]{$h/3$}
\pcline(M)(M')\mput*{$r/2$}
\pstRightAngle{C}{A}{B}\pspolygon(A)(B)(C)
\psline[linewidth=5pt,linecolor=red,hooklength=5mm,hookwidth=3mm]{<-H}(-1,-1)(0,-1)
\vspace{1cm} \footnotesize\hangcaption{Generating a
cone.}\label{fig:generating-cone}
\end{figure}
\vspace{2cm}
\bigskip

To find the volume, we gyrate the whole right triangle, whose area is $\dfrac{rh}{2}$. We need to find the centroid of the triangle. But from example
\ref{exa:medianas-concurren1}, we know that the centroid $G$ of the triangle is is two thirds of the way from $A$ to the midpoint of $BC$. If $G'$ is the
perpendicular projection of $G$ onto $[CA]$, then this means that
$G'$ is at a vertical height of $\dfrac{h}{2}\cdot \dfrac{2}{3} = \dfrac{h}{3}$. By similar triangles $\dfrac{GG'}{r}=\dfrac{h/3}{h}\implies GG'=\dfrac{r}{3}$. Hence, the
length of the curve described by the centre of gravity of the triangle is $\dfrac{2}{3}\pi r$. The volume of the cone is thus
$\dfrac{2}{3}\pi r \cdot \dfrac{rh}{2} = \dfrac{\pi}{3}r^2h$.

\end{answer}
\end{pro}
\end{multicols}


\section{Dihedral Angles and Platonic Solids}

\begin{df}
When two half planes intersect in space they intersect on a line.
The portion of space bounded by the half planes and the line is
called the {\em dihedral angle}. The intersecting line is called the
{\em edge} of the dihedral angle and each of the two half planes of
the dihedral angle is called a {\em face}. See figure
\ref{fig:dihedral1}.
\end{df}
\vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering\psset{unit=1pc}
\pstGeonode[PointName=none,PointSymbol=none](1,0){B}(1,3){E}(-2.5,4){G}(-2.5,1){H}(5.5,4){I}(5.5,1){J}
\pstRotation[RotAngle=180,PointName=none,PointSymbol=none]{E}{I}[D]\pstRotation[RotAngle=-180,PointName=none,PointSymbol=none]{E}{G}[F]
\pstRotation[RotAngle=-180,PointName=none,PointSymbol=none]{B}{H}[C]\pstRotation[RotAngle=180,PointName=none,PointSymbol=none]{B}{J}[A]
\pspolygon[fillcolor=yellow,fillstyle=solid,linewidth=2pt](D)(A)(B)(C)(F)(E)
\psline[linewidth=2pt](B)(E)\psline[linestyle=dashed](B)(H)\psline[linestyle=dashed](G)(H)
\psline[linestyle=dashed](B)(J)
\psline(G)(E)\psline(E)(I)\psline(I)(J) \vspace*{1cm}
\footnotesize\hangcaption{Dihedral Angles.} \label{fig:dihedral1}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering\psset{unit=1pc}
\pstGeonode[PointName=none,PointSymbol=none](-1,4){A}(2,0){O}(6,0){C}(4,2){B}
\pstTranslation[PointName=none,PointSymbol=none]{O}{B}{A}[A']
\pstTranslation[PointName=none,PointSymbol=none]{O}{B}{A'}[A'']
\pstTranslation[PointName=none,PointSymbol=none]{O}{B}{C}[C']
\pstTranslation[PointName=none,PointSymbol=none]{O}{B}{C'}[C'']
\pstTranslation[PointName=none,PointSymbol=none]{O}{B}{B}[B'']
 \psline[linewidth=2pt](A')(B)(C')
\psline[linewidth=2pt](A'')(B'')(C'')
\psline[linewidth=2pt](A)(O)(C) \psline(A)(A'') \psline(C)(C'')
\psline[linecolor=magenta,linewidth=2pt](O)(B'')
\pstMarkAngle[linewidth=2pt,linecolor=red,
MarkAngleRadius=1]{C'}{B}{A'}{} \vspace*{1cm}
\footnotesize\hangcaption{Rectilinear of a Dihedral Angle.}
\label{fig:dihedral2}
\end{minipage}

\end{figure}
\begin{df}  The {\em rectilinear angle} of a dihedral angle is the
angle whose sides are perpendicular to the edge of the dihedral
angle at the same point, each on each of the faces.  See figure
\ref{fig:dihedral2}.
\end{df}

All the rectilinear angles of a dihedral angle measure the same.
Hence the {\em measure} of a dihedral angle is the measure of any
one of its rectilinear angles.

\bigskip

In analogy to dihedral angles we now define polyhedral angles.







\begin{df}
The opening of three or more planes that meet at a common point is
called a {\em polyhedral angle} or {\em solid angle}. In the
particular case of three planes, we use the term {\em trihedral
angle}. The common point is called the {\em vertex} of the
polyhedral angle. Each of the intersecting lines of two consecutive
planes is called an {\em edge} of the polyhedral angle. The portion
of the planes lying between consecutive edges are called the {\em
faces} of the polyhedral angle. The angles formed by adjacent edges
are called {\em face angles}. A polyhedral angle is said to be {\em
convex}  if the section made by a plane cutting all its edges forms
a convex  polygon.
\end{df}



In the trihedral angle of figure \ref{fig:trihedral2}, $V$ is the
vertex, $\triangle VAB$,  $\triangle VBC$, $\triangle VCA$ are
faces. Also, notice that in any polyhedral angle, any two adjacent
faces form a dihedral angle.



\vspace*{3cm}
\begin{figure}[htpb]
\begin{minipage}{5.5cm}
\centering\psset{unit=1pc}
\rput(5,0){\pstGeonode[PosAngle={90,90,0,200}](0,4){V}(-3,0){A}(2,0){C}(-1,-1){B}
\pspolygon*[linecolor=green](A)(B)(C)
\pstLineAB[nodesepB=-1,linewidth=2pt, arrows={*-}]{V}{B}
\pstLineAB[nodesepB=-1, arrows={*-}]{V}{A}\pstLineAB[nodesepB=-1,
arrows={*-}]{V}{C}
\pstTranslation[DistCoef=.3,PosAngle=45]{C}{A}{C}[D]
\pstTranslation[DistCoef=.3,PosAngle=-90]{V}{A}{A}[X]
\pstTranslation[DistCoef=.3,PosAngle=-90]{V}{B}{B}[Y]
\pstTranslation[DistCoef=.3,PosAngle=-90]{V}{C}{C}[Z]
\pstTranslation[DistCoef=.3,PosAngle=-90]{V}{D}{D}[W]
\pstLineAB[nodesepB=-2,
arrows={*-},linestyle=dotted]{V}{D}}\vspace*{2cm}
\footnotesize\hangcaption{Trihedral Angle.} \label{fig:trihedral2}
\end{minipage}
\begin{minipage}{5.5cm}
\centering\psset{unit=1pc}
\rput(1,0){\pstGeonode[PosAngle={90}](8,5){V}(0,0){P}
\pstGeonode[PosAngle={180,0,0,90,135}](3;-112){A_1}(3;-40){A_2}(3;32){A_3}(3;104){A_4}(3;186){A_5}
\pspolygon*[linecolor=green](A_1)(A_2)(A_3)(A_4)(A_5)
\pstLineAB[nodesepB=-1,linewidth=2pt, arrows={*-}]{V}{A_2}
\pstLineAB[nodesepB=-1,
arrows={*-},linewidth=2pt]{V}{A_1}\pstLineAB[nodesepB=-1,
arrows={*-},linestyle=dashed]{V}{A_3} \pstLineAB[nodesepB=-1,
arrows={*-},linewidth=2pt]{V}{A_4}\pstLineAB[nodesepB=-1,
arrows={*-},linewidth=2pt]{V}{A_5}}\vspace*{2cm}
\footnotesize\hangcaption{Polyhedral Angle.} \label{fig:polyhedral}
\end{minipage}
\begin{minipage}{5.5cm}
\centering\psset{unit=1pc} \pstGeonode[PosAngle={90}](0,4){V}
\pstGeonode[PosAngle={-90},PtNameMath=false,PointName=$A_k$](-3,0){A}
\pstGeonode[PosAngle={-90},PtNameMath=false,PointName=$A_{k-1}$](2,0){A'}
\pstGeonode[PosAngle={-90},PtNameMath=false,PointName=$A_{k+1}$](-1,-1){A''}
\pspolygon*[linecolor=green](A)(A')(A'')
\pstLineAB[linewidth=2pt]{V}{A} \pstLineAB{V}{A'}\pstLineAB{V}{A''}
\vspace*{2cm} \footnotesize\hangcaption{$A$, $A_k$, $A_{k+1}$ are
three consecutive vertices.} \label{fig:polyhedral2}
\end{minipage}
\end{figure}






\begin{thm}\label{thm:angles-in-trihedral}
The sum of any two face angles of a trihedral angle is greater than
the third face angle.
\end{thm}
\begin{pf} Consider
 figure \ref{fig:trihedral2}. If $\angle ZVX$ is smaller or equal to in size than either $\angle XVY$ or $YVZ$, then we are
 done, so assume that, say, $\angle ZVX > XVY$.
 We must demonstrate that $$\angle XVY +
\angle YVZ > \angle ZVX.
$$Since we are assuming that $\angle ZVX > XVY$, we may draw, in $\angle XVY$ the line segment $[VW]$ such that $\angle XVW = \angle
XVY$.

\bigskip

Through any point $D$ of the segment $[VW]$, draw $\triangle ADC$ on
the plane $P$ containing the points $V$, $X$, $Z$. Take the point
$B\in [VY]$ so that  $VD=VB$. Consider now the plane containing the
line segment $[AC]$ and the point $B$. Observe that $\triangle AVD
\cong AVB$. Hence $AD=AB$. Now, by the triangle inequality in
$\triangle ABC$, $AB+BC>CA$. This implies that $\angle BVC>\angle
DVC$. Hence $$\begin{array}{llll}\angle AVB+ \angle BVC   & = &
\angle AVD+ \angle BVC \\
& > &\angle AVD+\angle DVC \\ & = & \angle AVC,\end{array}
$$which proves that $\angle XVY +
\angle YVZ > \angle ZVX $, as wanted.
\end{pf}


\begin{thm}\label{thm:face-angles-in-polyhedron}
The sum of the face angles of any convex polyhedral angle is less
than $2\pi$ radians.
\end{thm}
\begin{pf}Let the polyhedral angle have $n$ faces and vertex $V$. Let the faces be
cut by a plane, intersecting the edges at the points $A_1$, $A_2$,
\ldots $A_n$, say. An illustration can be seen in figure
\ref{fig:polyhedral}, where for convenience, we have depicted only
five edges. Observe that the polygon $A_1A_2\cdots A_n$ is convex
and that the sum of its interior angles is $\pi (n-2)$. We would
like to prove that
$$\angle A_1VA_2 + \angle A_2VA_3  + \angle A_3VA_4   + \cdots +\angle A_{n-1}VA_n +\angle A_nVA_1   < 2\pi .  $$

\bigskip

Now, let $A_{k-1}$, $A_{k}$, $A_{k+1}$ be three consecutive vertices
of of the polygon $A_1A_2\cdots A_n$.  This notation means that
$A_{k-1}A_{k}A_{k+1}$ represents any of the  $n$ triplets
$A_1A_2A_3$, $A_2A_3A_4$, $A_3A_4A_5$, \ldots , $A_{n-2}A_{n-1}A_n$,
$A_{n-1}A_{n}A_1$, $A_{n}A_{1}A_2$, that is, we let $A_{0}=A_n$,
$A_{n+1}=A_1, A_{n+2}=A_2$, etc. Consider the trihedral angle with
vertex $A_k$ and whose face angles at $A_k$ are $\angle
A_{k-1}A_kA_{k+1}$, $\angle VA_kA_{k-1}$, and $\angle VA_kA_{k+1}$,
as in figure \ref{fig:polyhedral2}. Observe that as $k$ ranges from $1$
through $n$, the sum
$$\sum _{1\leq k \leq n}\angle A_{k-1}A_kA_{k+1} = \pi (n-2),$$
being the sum of the interior angles of the polygon $A_1A_2\cdots
A_n$. By Theorem \ref{thm:angles-in-trihedral},
$$\angle
VA_kA_{k-1}+  \angle VA_kA_{k+1} >\angle A_{k-1}A_kA_{k+1}.$$ Thus
$$\sum _{1\leq k
\leq n}VA_kA_{k-1}+  \angle VA_kA_{k+1}  > \sum _{1\leq k \leq
n}\angle A_{k-1}A_kA_{k+1} = \pi (n-2).$$ Also,
$$\sum _{1\leq k
\leq n}VA_kA_{k+1}+  \angle VA_{k+1}A_{k} +   \angle A_kVA_{k+1} =
\pi n,
$$since this is summing the sum of the angles of the $n$ triangles
of the faces. But clearly
$$ \sum _{1\leq k
\leq n}VA_kA_{k+1}= \sum _{1\leq k \leq n} \angle VA_{k+1}A_{k} ,
$$since one sum adds the angles in one direction and the other in
the opposite direction. For the same reason,
$$\sum _{1\leq k
\leq n}VA_kA_{k-1}=\sum _{1\leq k \leq n}  \angle VA_kA_{k+1}.  $$
Hence
$$\begin{array}{lll}\sum _{1\leq k
\leq n} \angle A_kVA_{k+1}  & =  & \pi n - \sum _{1\leq k \leq
n}\left(VA_kA_{k+1}+  \angle VA_{k+1}A_k\right)\\
& =  & \pi n - \sum _{1\leq k \leq
n}\left(VA_kA_{k+1}+  \angle VA_{k}A_{k-1}\right)\\
& <  & \pi n - \pi (n-2)\\
& = & 2\pi,
\end{array} $$
as we needed to shew.
\end{pf}

\begin{df}
A {\em Platonic solid} is a polyhedron having congruent regular
polygon as faces and having the same number of edges meeting at each
corner.
\end{df}
Suppose a regular polygon with $n\geq 3$ sides is a face of a
platonic solid with $m\geq 3$ faces meeting at a corner. Since each
interior angle of this polygon measures $\dfrac{\pi (n-2)}{n}$, we
must have in view of Theorem \ref{thm:face-angles-in-polyhedron},
$$m\left(\dfrac{\pi (n-2)}{n}\right) < 2\pi \implies m(n-2)<2n \implies (m-2)(n-2)<4.  $$
Since $n \geq 3$ and $m\geq 3$, the above inequality only holds for
 five pairs $(n, m)$. Appealing to Euler's Formula for polyhedrons, which states that $V+F=E+2$, where $V$ is the number of vertices,
 $F$ is the number of faces, and $E$ is the number of edges of a polyhedron, we obtain the values in the following table.

\begin{center}
\begin{tabular}{|c|c|c|c|c|l|}
\hline
$m$&$n$&$S$&$E$&$F$&\multicolumn{1}{c|}{Name of regular Polyhedron.}\\[1ex]
\hline
3&3&4&6&4&Tetrahedron or regular Pyramid.\\[1ex]
4&3&8&12&6&Hexahedron or Cube.\\[1ex]
3&4&6&12&8&Octahedron.\\[1ex]
5&3&20&30&12&Dodecahedron.\\[1ex]
3&5&12&30&20&Icosahedron.\\[1ex]
\hline
\end{tabular}
\end{center}

Thus there are at most five Platonic solids. That there are exactly
five can be seen by explicit construction. Figures
\ref{fig:platonic-solids1} through \ref{fig:platonic-solids5} depict
the Platonic solids.


\vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{3cm}\centering
\psset{unit=.5pc} \psSolid[object=tetrahedron, r=3, linecolor=blue,
action=draw]%
\vspace*{2cm}\footnotesize\hangcaption{Tetrahedron.}\label{fig:platonic-solids1}\end{minipage}
\hfill
  \begin{minipage}{3cm}\centering\psset{unit=1pc}
  \psset{unit=.5pc}
  \psSolid[object=cube,
a=2, action=draw*, fillcolor=magenta!20]
%
  \vspace*{2cm}\footnotesize\hangcaption{Cube or hexahedron.}\label{fig:platonic-solids2}\end{minipage}
  \hfill
 \begin{minipage}{3cm}\centering
\psset{unit=.5pc} \psSolid[object=octahedron, a=3, linecolor=blue,
fillcolor=green]%
\vspace*{1cm}\footnotesize\hangcaption{Octahedron.}\label{fig:platonic-solids3}
\end{minipage}
  \hfill
 \begin{minipage}{3cm}\centering
 \psset{unit=.5pc}
 \psSolid[object=dodecahedron,
a=2.5,RotZ=90, action=draw*,
fillcolor=green]%
 \vspace*{2cm}\footnotesize\hangcaption{Dodecahedron}\label{fig:platonic-solids4}\end{minipage}
\hfill
 \begin{minipage}{3cm} \centering
 \psset{unit=.5pc}
 \psSolid[object=icosahedron,
a=3, action=draw*,
fillcolor=green!50]%
 \vspace*{2cm}\footnotesize\hangcaption{Icosahedron.}\label{fig:platonic-solids5}\end{minipage}
\end{figure}



\section{Spherical Trigonometry}
Consider a point $B(x,y,z)$ in Cartesian coordinates. From $O(0,0,0)$ we draw a straight line to $B(x,y,z)$, and let its distance be $\rho$. We
measure its inclination from the positive
$z$-axis, let us say it is an angle of $\phi$, $\phi \in [0;\pi]$ radians, as in figure \ref{fig:spherical-coor}. Observe that $z=\rho \cos \phi$.
We now project the line segment $[OB]$ onto the $xy$-plane in order to find the polar coordinates of $x$ and $y$. Let $\theta$ be angle that
this projection makes with the positive $x$-axis. Since $OP=\rho\sin\phi$ we find
$x=\rho\cos\theta\sin\phi$, $y=\rho\sin\theta\sin\phi$.

\begin{df}
Given a point $(x,y,z)$ in Cartesian coordinates, its {\em spherical
coordinates} are given by
$$x=\rho\cos\theta\sin\phi, \quad y = \rho\sin\theta\sin\phi , z=\rho\cos\phi .   $$Here
$\phi$ is the {\em polar angle}, measured from the positive
$z$-axis, and $\theta$ is the {\em azimuthal angle}, measured from
the positive $x$-axis. By convention, $0 \leq \theta \leq 2\pi$ and
$0 \leq \phi \leq \pi$.
\end{df}


Spherical coordinates are extremely useful when considering regions
which are symmetric about a point.



\begin{df}
If a plane intersects with a sphere, the intersection will be a
circle. If this circle contains the centre of the sphere, we call it
a {\em great circle}. Otherwise we talk of a {\em small circle.} The
{\em axis} of any circle on a sphere is the diameter of the sphere
which is normal to the plane containing the circle. The endpoints of
such a diameter are called the {\em poles} of the circle.
\end{df}
\begin{rem}
The radius of a great circle is the radius of the sphere. The poles
of a great circle are equally distant from the plane of the circle,
but this is not the case in a small circle. By  {\em the pole} of a
small circle, we mean the closest pole to the plane containing the
circle. A pole of a circle is equidistant from every point of the
circumference of the circle.
\end{rem}
\begin{df}
Given the centre of the sphere, and any two points of the surface of
the  sphere, a plane can be drawn. This plane will be unique if and
only if the points are not diametrically opposite. In the case where
the two points are not diametrically opposite, the great circle
formed is split into a larger and a smaller arc by the two points.
We call the smaller arc the {\em geodesic} joining the two points.
If the two points are diametrically opposite then every plane
containing the line forms with the sphere  a great circle, and the
arcs formed  are then of equal length. In this case we take any such
arc as a geodesic.
\end{df}





\begin{df}
A {\em spherical triangle} is a triangle on the surface of a sphere
all whose vertices are connected by geodesics. The three arcs of
great circles which form a spherical triangle are called the
\textit{sides} of the spherical triangle; the angles formed by the
arcs at the points where they meet are called the {\em angles} of
the spherical triangle.
\end{df}


\vspace{5cm}
\begin{figure}[!hptb]
\centering \psset{unit=2.2pc}
\pstGeonode[PointName=none,PointSymbol=none](0,0){O}(4,0){A}(0,5){Y}(5,0){X}(5;-155){R}(5;-25){S}(5;90){T}
\pstGeonode[PosAngle=0](1.5,2.645751311){B}\pstGeonode[PosAngle=-90](2.3;-45){P}
\psellipticarc[linewidth=2pt,linecolor=red,linestyle=dotted](O)(4,2){0}{180}
\psellipticarc[linewidth=2pt,linecolor=red,linestyle=dotted](O)(4,2){180}{0}
\pstMarkAngle[LabelSep=1.8,MarkAngleRadius=1.2]{B}{O}{Y}{$\phi$}
\psline(O)(P) \psline{->}(O)(R) \psline{->}(O)(S) \psline{->}(O)(T)
\pstMarkAngle[LabelSep=.7]{R}{O}{P}{$\theta$}
\psellipticarc[linewidth=2pt,linecolor=blue](O)(2,4){40}{90}
\psline(P)(B)\pstCircleOA[linewidth=2pt]{O}{A}
\pstTranslation[PointName=none,PointSymbol=none,DistCoef=.14]{P}{O}{P}[u] %u<-P
\pstTranslation[PointName=none,PointSymbol=none,DistCoef=.14]{P}{B}{P}[v] %u^_P
\pstTranslation[PointName=none,PointSymbol=none,DistCoef=.14]{P}{O}{v}[w] %w<-v
\psline(u)(w)(v) \pcline[linewidth=2pt](O)(B) \lput*{:U}{$\rho$}
\pcline[linewidth=2pt](O)(P) \lput*{:U}{$\rho\sin\phi$}
\pcline[linewidth=2pt](P)(B) \lput*{:U}{$\rho\cos\phi$} \vspace{4cm}
\footnotesize\hangcaption{Spherical
Coordinates.}\label{fig:spherical-coor}
\end{figure}


If $A$, $B$, $C$ are the vertices of a spherical triangle, it is
customary to label the opposite arcs with the same letter name, but
in lowercase.

\begin{rem}
A spherical triangle has then six angles: three vertex angles $\angle {A}$, $\angle {B}$, $\angle {C}$, and three arc angles,
 $\angle {a}$, $\angle {b}$, $\angle {c}$. Observe that if $O$ is the centre of the sphere then
 $$ \angle{a} = \ang{\vector{OB},\vector{OC}}, \quad  \angle {b} = \ang{\vector{OC},\vector{OA}}, \quad  \angle {c} = \ang{\vector{OA},\vector{OB}},  $$
 and
$$ \angle {A} = \ang{\crossprod{OA}{OB},\crossprod{OA}{OC}}, \quad  \angle {B} = \ang{\crossprod{OB}{OC},\crossprod{OB}{OA}}, \quad
\angle {C} = \ang{\crossprod{OC}{OA},\crossprod{OC}{OB}}.  $$
\end{rem}



\begin{thm}
Let $\triangle ABC$ be a spherical triangle. Then
$$
\cos a \cos b + \sin a \sin b \cos C = \cos c.
$$
\end{thm}
\begin{pf}
Consider a spherical triangle
$ABC$ with $A(x_1,y_1,z_1)$,  $B(x_2,y_2,z_2)$, and let $O$ be the centre and $\rho$ be the radius of the sphere. In spherical coordinates this is,
say,
\begin{align*}
z_1 &= \rho \cos \theta_1, &x_1 &= \rho  \sin \theta_1 \cos \phi_1, &y_1 &= \rho \sin \theta_1 \sin \phi_1, \\
z_2 &= \rho \cos \theta_2, &x_2 &= \rho  \sin \theta_2 \cos \phi_2, &y_2 &= \rho  \sin \theta_2 \sin \phi_2;
\end{align*}
By a rotation we may assume that the $z$-axis passes through $C$. Then the following  quantities give the
square of the distance of the line segment  $[AB]$:
$$
  (x_1 - x_2)^2 +
  (y_1 - y_2)^2 +
  (z_1 - z_2)^2,
  \quad \rho^2 + \rho^2 - 2\rho^2 \cos \ang{AOB}.$$
Since $x_1^2 + y_1^2 + z_1^2 = \rho^2$, $x_2^2 + y_2^2 + z_2^2 = \rho^2$, we gather that
$$
x_1x_2 + y_1y_2 + z_1z_2 = \rho^2 \cos \ang{AOB}.$$
Therefore  we obtain
\[
\cos \theta_2 \cos \theta_1 + \sin \theta_2 \sin \theta_1 \cos (\phi_1 - \phi_2) = \cos \ang{AOB},
\]
that is,
\[
\cos a \cos b + \sin a \sin b \cos C = \cos c.
\]
\end{pf}





\begin{figure}[htp]
\centering
\includegraphics[width=5.0cm]{todhunter/images/126fc}
\vspace{1cm}\footnotesize\hangcaption{Theorem
\ref{thm:dihedral-polyhedron}. }\label{fig:dihedral-polyhedron}
\end{figure}

\begin{thm}\label{thm:dihedral-polyhedron}
Let $I$ be the dihedral angle of two adjacent faces of a regular
polyhedron. Then
$$ \sin \dfrac{I}{2} = \dfrac{\cos \frac{\pi}{n}}{\sin \frac{\pi}{m}}. $$
\end{thm}

\begin{pf}See figure \ref{fig:dihedral-polyhedron}.
Let $AB$ be the edge common to the two adjacent faces, $C$ and $D$
the centres of the faces; bisect $AB$ at $E$, and join $CE$ and
$DE$; $CE$ and $DE$ will be perpendicular to $AB$, and the angle
$CED$ is the angle of inclination of the two adjacent faces; we
shall denote it by $I$. In the plane containing $CE$ and $DE$ draw
$CO$ and $DO$ at right angles to $CE$ and $DE$ respectively, and
meeting at $O$; about $O$ as centre describe a sphere meeting $OA$,
$OC$, $OE$ at $a$, $c$, $e$ respectively, so that $cae$ forms a
spherical triangle. Since $AB$ is perpendicular to $CE$ and $DE$, it
is perpendicular to the plane $CED$, therefore the plane $AOB$ which
contains $AB$ is perpendicular to the plane $CED$; hence the angle
$cea$ of the spherical triangle is a right angle. Let $m$ be the
number of sides in each face of the polyhedron, $n$ the number of
the plane angles which form each solid angle. Then the angle
$ace=ACE=\dfrac{2\pi}{2m}=\dfrac{\pi}{m}$; and the angle $cae$ is
half one of the $n$ equal angles formed on the sphere round $a$,
that is, $cae=\dfrac{2\pi}{2n}=\dfrac{\pi}{n}$. From the
right-angled triangle $cae$
\[
\cos{cae}=\cos{cOe}\sin{ace},
\]
\begin{flalign*}
&\text{that is }&
  \cos{\frac{\pi}{n}}
&=\cos{\left( \frac{\pi}{2} - \frac{I}{2} \right)}
  \sin{\frac{\pi}{m}}; &&
\\[1ex]
&\text{therefore }&
  \sin{\frac{I}{2}}
&=\frac{\cos \dfrac{\pi}{n}}
       {\sin{\dfrac{\pi}{m}}}. &\phantom{therefore }&
\end{flalign*}
\end{pf}
\begin{thm}Let $r$ and $R$ be, respectively, the radii of the inscribed and circumscribed
spheres of a regular polyhedron. Then
$$r=\frac{a}{2}\cot{\frac{\pi}{m}}\tan{\frac{I}{2}}, \qquad  R= \frac{a}{2} \tan{\frac{I}{2}} \tan{\frac{\pi}{n}}.  $$
Here $a$ is the length of any edge of the polyhedron, and $I$ is the dihedral angle of any two faces.
\end{thm}
\begin{pf}
Let the edge $AB=a$, let $OC=r$ and $OA=R$, so that $r$ is
the radius of the inscribed sphere, and $R$ is the radius of the
circumscribed sphere. Then
\begin{flalign*}
&& CE &= AE\cot{ACE} = \frac{a}{2}\cot{\frac{\pi}{m}}, \\[1.5ex]
&& r  &= CE\tan{CEO} = CE\tan{\frac{I}{2}}
       =\frac{a}{2}\cot{\frac{\pi}{m}}\tan{\frac{I}{2}};
\\[1.5ex]
&\text{also }&
   r  &= R\cos{aOc} = R\cot{eca}\cot{eac}
       = R\cot{\frac{\pi}{m}} \cot{\frac{\pi}{n}};
\\[1.5ex]
&\text{therefore }&
   R  &= r\tan{\frac{\pi}{m}} \tan{\frac{\pi}{n}}
       = \frac{a}{2} \tan{\frac{I}{2}} \tan{\frac{\pi}{n}}.
&\phantom{therefore }&
\end{flalign*}
\end{pf}
From the above formul\ae\ we now easily find that the volume of the pyramid which has one face of the
polyhedron for base and $O$ for vertex is $\dfrac{r}{3}\centerdot\dfrac{ma^2}{4}\cot{\dfrac{\pi}{m}}$, and
therefore the volume of the polyhedron is $\dfrac{mFra^2}{12}\cot{\dfrac{\pi}{m}}$.\\[.5ex]
Furthermore, the area of one face of the polyhedron is $\dfrac{ma^2}{4}\cot{\dfrac{\pi}{m}}$, and
therefore the surface area of the polyhedron is $\dfrac{mFa^2}{4}\cot{\dfrac{\pi}{m}}$.\\[.5ex]

\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
The four vertices of a regular tetrahedron are $$V_1=\colpoint{1\\
0 \\ 0 }, \quad  V_2=\colpoint{-1/2\\ \sqrt{3}/2\\ 0},$$
$$V_3=\colpoint{-1/2\\-\sqrt{3}/2\\ 0}, \quad V_4=\colpoint{0\\
0\\ \sqrt{2}}.$$ What is the cosine of the dihedral angle between
any pair of faces of the tetrahedron?
\begin{answer}
Find a vector $\vector{a}$ mutually perpendicular to
$\vector{V_1V_2}$ and $\vector{V_1V_3}$ and another vector and a
vector $\vector{b}$ mutually perpendicular to $\vector{V_1V_3}$ and
$\vector{V_1V_4}$. Then shew that $\cos \theta = \dfrac{1}{3}$,
where $\theta$ is the angle between $\vector{a}$ and $\vector{b}$.
\end{answer}
\end{pro}
\begin{pro} Consider a tetrahedron whose edge measures $a$. Shew that its
volume is $\dfrac{a^3\sqrt{2}}{12}$,  its surface area is
$a^2\sqrt{3}$, and that the radius of the inscribed sphere is
$\dfrac{a\sqrt{6}}{12}$.
\end{pro}

\begin{pro} Consider a cube whose edge measures $a$. Shew that its
volume is $a^3$,  its surface area is $6a^2$, and that the radius of
the inscribed sphere is $\dfrac{a}{2}$.
\end{pro}
\begin{pro} Consider an  octahedron whose edge measures $a$. Shew that its
volume is $\dfrac{a^3\sqrt{2}}{3}$,  its surface area is
$2a^2\sqrt{3}$, and that the radius of the inscribed sphere is
$\dfrac{a\sqrt{6}}{6}$.
\end{pro}
\begin{pro} Consider a dodecahedron whose edge measures $a$. Shew that its
volume is $\dfrac{a^3}{4}\left(15+7\sqrt{5}\right)$,  its surface
area is $3a^2\sqrt{25+10\sqrt{5}}$, and that the radius of the
inscribed sphere is $\dfrac{a}{4}\sqrt{10+22\sqrt{\dfrac{1}{5}}}$.
\end{pro}
\begin{pro} Consider an icosahedron whose edge measures $a$. Shew that its
volume is $\dfrac{5a^3}{12}\left(3+\sqrt{5}\right)$,  its surface
area is $5a^2\sqrt{3}$, and that the radius of the inscribed sphere
is $\dfrac{a}{12}\left(5\sqrt{3}+\sqrt{15}\right)$.
\end{pro}
\end{multicols}




\section{Canonical Surfaces}
In this section we consider various surfaces that we shall
periodically encounter in subsequent sections. Just like in
one-variable Calculus it is important to identify the equation and
the shape of a line, a parabola, a circle, etc., it will become
important for us to be able to identify certain families of
often-occurring surfaces. We shall explore both their Cartesian and
their parametric form. We remark that in order to parametrise curves
(``one-dimensional entities'') we needed one parameter, and that in
order to parametrise surfaces we shall need to parameters.

\bigskip


Let us start with the plane. Recall that if $a,b,c$ are real
numbers, not all zero, then the Cartesian equation of a plane with
normal vector $\colvec{a\\ b\\ c}$ and passing through the point
$(x_0,y_0,z_0)$ is
$$ a(x-x_0)+b(y-y_0)+c(z-z_0)=0. $$
If we know that the vectors $\vector{u}$ and $\vector{v}$ are on the
plane (parallel to the plane) then with the parameters $p, q$the
equation of the plane is
$$\begin{array}{c}x - x_0 = pu_1  + qv_1, \\ y - y_0 = pu_2  + qv_2, \\ z - z_0 = pu_3  + qv_3. \end{array} $$



\begin{df}
A surface $S$ consisting of all lines parallel to a given line
$\Delta$  and passing through a given curve $\Gamma$ is called a
{\em cylinder}. The line $\Delta$ is called the {\em directrix} of
the cylinder.
\end{df}
\begin{rem}
To recognise whether a given surface is a cylinder we look at its
Cartesian equation. If it is of the form $f(A, B) = 0$, where $A, B$
are secant planes, then the curve is a cylinder. Under these
conditions, the lines generating $S$ will be parallel to the line of
equation $A = 0, B = 0.$ In practice, if one of the variables $x,
y$, or $z$ is missing, then the surface is a cylinder, whose
directrix will be the axis of the missing coordinate.
\end{rem}
\vspace{3cm}
\begin{figure}[!htbp]
\begin{minipage}{7cm} \centering \psset{unit=.25pc}
\psSolid[object=cylindrecreux, h=5,r=2, mode=4, fillcolor=white,
incolor=green!50](0,0,0) \axesIIID(0,0,0)(3.5,3.5,7.5)
 \vspace{1cm}\footnotesize
\hangcaption{Circular cylinder $x ^2 + y^2 =
1$.}\label{fig:cylinder}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=0.5pc} \psSurface[
fillcolor=cyan!50,algebraic,ngrid=.25 .25,incolor=yellow,hue=0 1,
 Zmin=-3,Zmax=3](-1.5,-1.5)(1.5,1.5){%
 y^2}
\axesIIID(0,0,0)(2.5,2.5,3.5)
\vspace{1cm}\footnotesize\hangcaption{The parabolic cylinder
$z=y^2$.} \label{fig:cylinder2}
\end{minipage}
\end{figure}

\begin{exa}
Figure \ref{fig:cylinder} shews the cylinder with Cartesian equation
$x^2+y^2=1$. One starts with the circle $x^2+y^2=1$ on the
$xy$-plane and moves it up and down  the $z$-axis. A parametrisation
for this cylinder is the following:
$$x = \cos v, \qquad y = \sin v, \qquad z = u, \qquad u\in\reals, v\in [0;2\pi].  $$
The Maple\TM commands to graph this surface are:
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):}{}
\mapleinline{active}{1d}{implicitplot3d(x^2+y^2=1,x=-1..1,y=-1..1,z=-10..10);}{}
\mapleinline{active}{1d}{plot3d([cos(s),sin(s),t],s=-10..10,t=-10..10,numpoints=5001);}{}
\end{mapleinput}
\end{maplegroup}

\end{exa}




The method of parametrisation utilised above for the cylinder is
quite useful when doing parametrisations in space. We refer to it as
the method of {\em cylindrical coordinates}. In general, we first
find the polar coordinates of $x,y$ in the $xy$-plane, and then lift
$(x,y,0)$ parallel to the  $z$-axis to $(x,y,z)$:
$$x = r\cos\theta , \qquad y = r\sin\theta, \qquad z=z.  $$
See figure \ref{fig:cylindrical-coord}.
\vspace*{3cm}

\begin{figure}[htpb]
\centering \psset{unit=1pc}
  \pstThreeDCoor[linecolor=red,xMax=7,yMax=7,zMax=7]
   \pstThreeDDot[SphericalCoor,drawCoor](10,45,60)
  \uput[ur](3,5){$(r\cos\theta,r\sin\theta,z)$}
\pstThreeDNode[SphericalCoor](5,45,60){A}\pstThreeDNode(0,0,4){B}
  \pstThreeDNode[SphericalCoor](2,45,0){B}\pstThreeDNode(2,0,0){A}
  \ncarc[angleA=180]{<-}{B}{A}
  \pstThreeDLine[SphericalCoor,linestyle=dashed](0,0,0)(5,45,0)
  \pstThreeDPut[SphericalCoor](2.5,25,0){$\theta$}
 \pstGeonode[PointName=none,PointSymbol=none](0,0){O}(2,-1.9){C}\pcline[linewidth=0pt,offset=5pt](O)(C)\lput*{:U}{$r$}
\vspace*{2cm}\footnotesize \hangcaption{Cylindrical Coordinates.}
\label{fig:cylindrical-coord}\end{figure}

\begin{exa}
Figure \ref{fig:cylinder2} shews the parabolic cylinder with
Cartesian equation $z=y^2$. One starts with the parabola $z=y^2$ on
the $yz$-plane and moves it up and down  the $x$-axis. A
parametrisation for this parabolic cylinder is the following:
$$x = u, \qquad y = v, \qquad z =v^2, \qquad u\in\reals, v\in \reals .  $$

The Maple\TM commands to graph this surface are:
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):}{}
\mapleinline{active}{1d}{implicitplot3d(z=y^2,x=-10..10,y=-10..10,z=-10..10,numpoints=5001);}{}
\mapleinline{active}{1d}{plot3d([t,s,s^2],s=-10..10,t=-10..10,numpoints=5001,axes=boxed);}{}
\end{mapleinput}
\end{maplegroup}

\end{exa}

\begin{exa}
Figure \ref{fig:cylinder3} shews the hyperbolic cylinder with
Cartesian equation $x^2-y^2=1$. One starts with the hyperbola
$x^2-y^2$ on the $xy$-plane and moves it up and down  the $z$-axis.
A parametrisation for this parabolic cylinder is the following:
$$x = \pm\cosh v, \qquad y = \sinh v, \qquad z =u, \qquad u\in\reals, v\in \reals .  $$
We need a choice of sign for each of the portions. We have used the
fact that $\cosh^2v-\sinh^2v=1$. The Maple\TM commands to graph this
surface are:
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):}{}
\mapleinline{active}{1d}{implicitplot3d(x^2-y^2=1,x=-10..10,y=-10..10,z=-10..10,numpoints=5001);}{}
\mapleinline{active}{1d}{plot3d(\{[-cosh(s),sinh(s),t],[cosh(s),sinh(s),t]\},
s=-2..2,t=-10..10,numpoints=5001,axes=boxed);}{}
\end{mapleinput}
\end{maplegroup}
\end{exa}











\begin{df}
Given a point $\Omega \in \reals^3$ (called the {\em apex}) and a
curve $\Gamma$ (called the generating curve), the surface $S$
obtained by drawing rays from $\Omega$ and passing through $\Gamma$
is called a {\em cone}.
\end{df}
\begin{rem}
In practice, if the Cartesian equation of a surface can be put into
the form $f(\dfrac{A}{C},\dfrac{B}{C}) = 0$, where $A, B, C,$ are
planes secant at exactly one point, then the surface is a cone, and
its apex is given by $A = 0, B = 0, C = 0.$
\end{rem}

\begin{exa}
The surface in $\reals^3$ implicitly given  by
$$z ^2 = x ^2 + y ^2$$ is a cone, as its equation can be put in the
form $\left(\dfrac{x}{z}\right)^2 + \left(\dfrac{y}{z}\right)^2 - 1
= 0$. Considering the planes $x = 0,  y = 0, z = 0$, the apex is
located at $(0,0,0)$. The graph is shewn in figure \ref{fig:cone}.
  \label{exa:cone_1}\end{exa}

\begin{df}
A surface  $S$ obtained by making a curve $\Gamma$ turn around a
line $\Delta$ is called a {\em surface of revolution.} We then say
that $\Delta$ is the axis of revolution. The intersection of $S$
with a half-plane bounded by  $\Delta$  is called a {\em meridian}.
\end{df}
\begin{rem}
If the Cartesian equation of $S$ can be put in the form $f(A, \Sigma
) = 0$, where $A$ is a plane and $\Sigma$ is a sphere, then the
surface is of revolution. The axis of $S$ is the line passing
through the centre of $\Sigma$ and perpendicular to the plane $A$.
\end{rem}

\vspace{2cm}
\begin{figure}[htpb]
\begin{minipage}{5cm}
\centering \psset{unit=1pc}
\parametricplotThreeD[plotstyle=curve,linecolor=blue](-2,2)(-2,2){t COSH t SINH u}
\parametricplotThreeD[plotstyle=curve,linecolor=red](-2,2)(-2,2){t COSH -1 mul t SINH -1 mul u}
  \vspace{2cm} \footnotesize \hangcaption{The hyperbolic
cylinder $x ^2 - y ^2 = 1$.}\label{fig:cylinder3}
\end{minipage}
\hfill
\begin{minipage}{5cm}
\centering \psset{unit=.4pc}\psSolid[r1=2.5,r0=1.5, object=tore,
ngrid=18 36, fillcolor=green!30,
action=draw*]%
\vspace{2cm} \footnotesize \hangcaption{The torus.}
\label{fig:torus}
\end{minipage}
\hfill
\begin{minipage}{5cm}
\centering \psset{unit=.8pc}\psset[pst-solides3d]{viewpoint=20 5
10,Decran=50,lightsrc=20 10 5}
% Parametric Surfaces
\defFunction{cone}(u,v){u v Cos mul}{u v Sin mul}{u}
\psSolid[object=surfaceparametree,
   base=-2 2 0 2 pi mul,fillcolor=yellow!50,incolor=green!50,
   function=cone,linewidth=0.5\pslinewidth,
   ngrid=25 40]
%\rput(.1,-.1){\psSurface[ngrid=.25,incolor=magenta,linewidth=0.5\pslinewidth,algebraic,hue](-1.5,-1.5)(1.5,1.5){sqrt(x^2+y^2)}}
%\psSurface[ngrid=.25,incolor=magenta,linewidth=0.5\pslinewidth,algebraic,hue](-1.5,-1.5)(1.5,1.5){-sqrt(x^2+y^2)}
\vspace{2cm}\footnotesize \hangcaption{Cone $\dfrac{x^2}{a^2} +
\dfrac{y^2}{b^2}=\dfrac{z^2}{c^2}$.} \label{fig:cone}
\end{minipage}
\end{figure}
\begin{exa}
Find the equation of the surface of revolution generated by
revolving the hyperbola $$x ^2 - 4z ^2 = 1$$ about the $z$-axis.
\end{exa}
\begin{solu} Let $(x,y,z)$ be a point on $S$. If this
point were on the $xz$ plane,  it would be on the hyperbola, and its
distance to the axis of rotation would be $|x| = \sqrt{1 + 4z^2}$.
Anywhere else, the distance of $(x,y,z)$ to the axis of rotation is
the same as the distance of $(x,y,z)$ to $(0,0,z)$, that is $\sqrt{x
^2 + y ^2}$. We must have
$$\sqrt{x ^2 + y ^2} = \sqrt{1 + 4z ^2}, $$which is to say
$$x ^2 + y ^2 - 4z ^2   =  1.$$
This surface is called a {\em hyperboloid of one sheet}. See figure
\ref{fig:1sheet-hyperboloid}. Observe that when $z=0$, $x^2+y^2=1$
is a circle on the $xy$ plane. When $x=0$, $y^2-4z^2=1$ is a
hyperbola on the $yz$ plane. When $y=0$, $x^2-4z^2=1$ is a hyperbola
on the $xz$ plane.

\bigskip

A parametrisation for this hyperboloid is $$x = \sqrt{1+4u^2}\cos v,
\qquad y =\sqrt{1+4u^2}\sin v, \qquad z = u, \qquad u \in \reals,
v\in [0;2\pi].$$




\end{solu}

\begin{exa}
The circle $(y - a)^2 + z^2 = r^2,$  on the $yz$ plane ($a, r$ are
positive real numbers) is revolved around the $z$-axis, forming a
torus $T$. Find the equation of this torus.
\end{exa}
\begin{solu}Let $(x,y,z)$ be a point on $T$. If this point were on the
$yz$ plane,  it would be on the circle, and the of the distance to
the axis of rotation would be $y = a + \sgn{y - a} \sqrt{r^2 -
z^2}$, where $\sgn{t}$ (with $\sgn{t} = -1$ if $t < 0$, $\sgn{t} =
1$ if $t
> 0$, and  $\sgn{0} = 0$) is the sign of $t$. Anywhere else, the
distance from $(x,y,z)$ to the $z$-axis  is the distance of this
point to the point $(x,y,z)$ : $\sqrt{x^2 + y^2}$. We must have
$$x^2 + y^2 = (a + \sgn{y - a} \sqrt{r^2 - z^2})^2 = a^2 + 2a\sgn{y - a} \sqrt{r^2 - z^2} + r^2 - z^2.$$
Rearranging
$$x^2 + y^2 + z^2 - a^2 - r^2 =  2a\sgn{y - a} \sqrt{r^2 -
z^2}, $$ or
$$(x^2 + y^2 + z^2 - (a^2 + r^2))^2 = 4a^2r^2 - 4a^2z^2$$

since $(\sgn{y - a})^2 = 1,$ (it could not be $0$, why?).
Rearranging again,
$$(x^2 + y^2 + z^2)^2 - 2(a^2 + r^2)(x^2 + y^2) + 2(a^2 - r^2)z^2 + (a^2 - r^2)^2 =
0.$$The equation of the torus thus, is of fourth degree, and its
graph appears in figure \ref{fig:torus}.

\bigskip

 A parametrisation for the torus generated by revolving the
circle $(y - a)^2 + z^2 = r^2$ around the $z$-axis  is
$$x =a\cos \theta + r\cos \theta\cos\alpha, \qquad y=a\sin\theta +
r\sin\theta\cos\alpha, \qquad z =r\sin\alpha,
$$with
$(\theta, \alpha)\in [-\pi;\pi]^2$.

\end{solu}

\vspace*{4cm}

\begin{figure}[htpb]
\begin{minipage}{4cm}
\centering \psset{unit=2pc}
\pstThreeDCoor[xMax=2,yMax=2,zMin=0,zMax=4,IIIDticks=false]%
 \pstParaboloid{3}{1}%
\vspace*{2cm}\footnotesize \hangcaption{Paraboloid $z =
\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2}$.} \label{fig:paraboloid}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=2pc, viewpoint=1 2 1}
\psplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    fillstyle=gradient,%
    yPlotpoints=50,xPlotpoints=50,%
    linewidth=0.2pt, hiddenLine=true](-1,1)(-1,1){%
    x 2 exp y 2 exp 2 mul sub}
    \psplotThreeD[%
    drawStyle=xyLines,
    yPlotpoints=11,
    xPlotpoints=11,linewidth=0.75pt,linecolor=magenta](-1,1)(-1,1){%
    x 2 exp y 2 exp 2 mul sub}
    \pstThreeDCoor[IIIDticks=false,xMin=
-1,xMax=2.5,yMin=-1,yMax=2.5,zMin=-1,zMax=2.5]
\vspace*{2cm}\footnotesize \hangcaption{Hyperbolic paraboloid $z
=\dfrac{x^2}{a^2} - \dfrac{y^2}{b^2} $}
\label{fig:hyperbolic-paraboloid}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=2pc}
    \psplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    fillstyle=gradient,%
    yPlotpoints=101,xPlotpoints=101,%
    linewidth=0.2pt, hiddenLine=true](-1,1)(-1,1){%
    y 2 exp x 2 exp 2 mul add .1 add sqrt}
\psplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    fillstyle=gradient,%
    yPlotpoints=101,xPlotpoints=101,%
    linewidth=0.2pt, hiddenLine=true](-1,1)(-1,1){%
    y 2 exp x 2 exp 2 mul add .1 add sqrt -1 mul}
\psplotThreeD[%
    drawStyle=xyLines,
    yPlotpoints=11,
    xPlotpoints=11,linewidth=0.75pt,linecolor=magenta](-1,1)(-1,1){%
    y 2 exp x 2 exp 2 mul add .1 add sqrt}
\psplotThreeD[%
    drawStyle=xyLines,
    yPlotpoints=11,
    xPlotpoints=11,linewidth=0.75pt,linecolor=magenta](-1,1)(-1,1){%
    y 2 exp x 2 exp 2 mul add .1 add sqrt -1 mul}
    \pstThreeDCoor[IIIDticks=false,xMin=
-2,xMax=2.5,yMin=-2,yMax=2.5,zMin=-2,zMax=2.5]
\vspace*{2cm}\footnotesize \hangcaption{Two-sheet hyperboloid
$\dfrac{z ^2}{c^2}=\dfrac{x^2}{a^2} + \dfrac{y ^2}{b^2}+1$.}
\label{fig:2sheet-hyperboloid}
\end{minipage}
\end{figure}

\begin{exa}
The surface $z=x^2+y^2$ is called an {\em elliptic paraboloid}. The
equation clearly requires that  $z\geq 0$. For fixed $z=c$, $c>0$,
$x^2+y^2=c$ is a circle. When $y=0$, $z=x^2$ is a parabola on the
$xz$ plane. When $x=0$, $z=y^2$ is a parabola on the $yz$ plane. See
figure \ref{fig:paraboloid}. The following is a parametrisation of
this paraboloid:
$$ x=\sqrt{u}\cos v, \qquad y = \sqrt{u}\sin v, \qquad z=u, \qquad u \in [0;+\infty[, v\in [0;2\pi]. $$
\end{exa}

\begin{exa}
The surface $z=x^2-y^2$ is called a {\em hyperbolic paraboloid} or {\em saddle}. If
$z=0$,  $x^2-y^2=0$ is a pair of lines in the $xy$ plane. When
$y=0$, $z=x^2$ is a parabola on the $xz$ plane. When $x=0$, $z=-y^2$
is a parabola on the $yz$ plane. See figure
\ref{fig:hyperbolic-paraboloid}. The following is a parametrisation
of this hyperbolic paraboloid:
$$ x=u, \qquad y = v, \qquad z=u^2-v^2, \qquad u \in \reals , v\in \reals. $$
\end{exa}

\begin{exa}
The surface $z^2=x^2+y^2+1$ is called an {\em hyperboloid of two
sheets}. For  $z^2-1<0$, $x^2+y^2<0$ is impossible, and hence
there is no graph when $-1<z<1$. When $y=0$, $z^2-x^2=1$ is a hyperbola
on the $xz$ plane. When $x=0$, $z^2-y^2=1$ is a hyperbola on the $yz$
plane. When $z=c$ is a constant $c>1$, then the $x^2+y^2=c^2-1$ are circles. See figure \ref{fig:2sheet-hyperboloid}. The following is a
parametrisation for the top sheet  of this hyperboloid of two sheets
$$ x=u\cos v , \qquad y = u\sin v, \qquad z=u^2+1, \qquad u \in \reals , v\in  [0;2\pi] $$
and the following parametrises the bottom sheet,
$$ x=u\cos v , \qquad y = u\sin v, \qquad z=-u^2-1, \qquad u \in \reals , v\in [0;2\pi], $$

\end{exa}
\begin{exa}
The surface $z^2=x^2+y^2-1$ is called an {\em hyperboloid of one
sheet}. For  $x^2+y^2<1$, $z^2<0$ is impossible, and hence
there is no graph when $x^2+y^2<1$. When $y=0$, $z^2-x^2=-1$ is a hyperbola
on the $xz$ plane. When $x=0$, $z^2-y^2=-1$ is a hyperbola on the $yz$
plane. When $z=c$ is a constant, then the $x^2+y^2=c^2+1$ are circles See figure \ref{fig:1sheet-hyperboloid}. The following is a
parametrisation for this hyperboloid of one sheet
$$ x=\sqrt{u^2+1}\cos v , \qquad y = \sqrt{u^2+1}\sin v, \qquad z=u, \qquad u \in \reals , v\in [0;2\pi], $$

\end{exa}
\vspace*{2cm}
\begin{figure}[!hptb]
\begin{minipage}{7cm}
\centering \psset{unit=1pc}
    \parametricplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    fillstyle=solid,%
    yPlotpoints=101,xPlotpoints=101,%
    linewidth=0.2pt, hiddenLine=true](0,360)(-2,2){%
    1 u 2 exp add sqrt t cos mul 1 u 2 exp add sqrt t sin mul u}
\parametricplotThreeD[%
    drawStyle=xyLines,
    yPlotpoints=11,
    xPlotpoints=11,linewidth=0.75pt,linecolor=magenta](0,360)(-2,2){%
    1 u 2 exp add sqrt t cos mul 1 u 2 exp add sqrt t sin mul u}
    %z=u,  x=cos(t)*sqrt(1+u^2)      y=sin(t)*sqrt(1+u^2)
\vspace{2cm}\footnotesize \hangcaption{One-sheet hyperboloid
\mbox{$\dfrac{z^2}{c^2}=\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2}-1$.}}
\label{fig:1sheet-hyperboloid}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=1pc}
    \parametricplotThreeD[%
    plotstyle=curve,%
    drawStyle=xyLines,%
    fillstyle=gradient,%
    yPlotpoints=101,xPlotpoints=101,%
    linewidth=0.2pt, hiddenLine=true](0,360)(0,360){%
    t cos u sin mul 4 mul t cos u cos mul 2 mul t sin}
\parametricplotThreeD[%
    drawStyle=xyLines,
    yPlotpoints=11,
    xPlotpoints=11,linewidth=0.75pt,linecolor=magenta](0,360)(0,360){%
    t cos u sin mul 4 mul t cos u cos mul 2 mul t sin}
\vspace{2cm}\footnotesize \hangcaption{Ellipsoid $\dfrac{x^2}{a^2} +
\dfrac{y^2}{b^2}+\dfrac{z^2}{c^2}=1$.} \label{fig:ellipsoid}
\end{minipage}
\end{figure}



\begin{exa}Let $a, b, c$ be strictly positive real numbers.
The surface $\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}+\dfrac{z^2}{c^2}=1$
is called an {\em ellipsoid}. For $z=0$,
$\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}1$ is an ellipse on the $xy$
plane.When $y=0$, $\dfrac{x^2}{a^2}+\dfrac{z^2}{c^2}=1$ is an
ellipse  on the $xz$ plane. When $x=0$,
$\dfrac{z^2}{c^2}+\dfrac{y^2}{b^2}=1$ is an ellipse on the $yz$
plane. See figure \ref{fig:ellipsoid}. We may parametrise the
ellipsoid using spherical coordinates:
$$ x=a\cos \theta\sin\phi, \qquad y = b\sin\theta\sin\phi, \qquad z=c\cos \phi, \qquad \theta \in [0;2\pi] , \phi\in [0;\pi]. $$
\end{exa}







\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
Find the equation of the surface of revolution $S$ generated by
revolving the ellipse \mbox{$4x^2 + z^2 = 1$} about the $z$-axis.
\begin{answer} Let $\colpoint{x\\ y\\ z}$ be a point on $S$. If this point were on
the $xz$ plane, it would be on the ellipse, and its distance to the
axis of rotation would be $|x| = \dfrac{1}{2}\sqrt{1 -
z^2}$. Anywhere else, the distance from $\colpoint{x\\ y\\
z}$ to the $z$-axis  is the distance of this point to the point
$\colpoint{0\\ 0\\ z}$ : $\sqrt{x^2 + y^2}$. This distance is the
same as the length of the segment on the $xz$-plane going from the
$z$-axis. We thus have
$$ \sqrt{x^2 + y^2} = \dfrac{1}{2}\sqrt{1 -
z^2},$$or
$$4x^2 + 4y^2 + z^2 = 1.$$
\end{answer}
\end{pro}
\begin{pro}
Find the equation of the surface of revolution generated by
revolving the line \mbox{$3x + 4y = 1$} about the $y$-axis  .
\begin{answer} Let $\colpoint{x\\ y\\ z}$ be a point on $S$. If this point were on the
$xy$ plane, it would be on the line, and its distance to the axis of
rotation would be $|x| = \dfrac{1}{3}|1 - 4y|$. Anywhere else, the
distance of $\colpoint{x\\ y\\ z}$ to the axis of rotation is the
same as the distance of $\colpoint{x\\ y\\ z}$ to $\colpoint{0\\
y \\ 0}$, that is $\sqrt{x^2 + z^2}$. We must have
$$\sqrt{x^2 + z^2} = \dfrac{1}{3}|1 - 4y|, $$which is to say
$$9x^2 + 9z^2 - 16y^2 + 8y - 1 = 0.$$
\end{answer}
\end{pro}


\begin{pro}
Describe the surface parametrised by $\varphi(u,v)\mapsto (v\cos u,
v\sin u, au),\quad
            (u,v)\in(0,2\pi)\times(0,1)$, $a>0$.
\begin{answer}
A spiral staircase.
\end{answer}
\end{pro}
\begin{pro}
Describe the surface parametrised by $\varphi(u,v)=(a u\cos v,
bu\sin v, u^2),\quad
            (u,v)\in(1,+\infty)\times(0,2\pi)$, $a,b>0$.
\begin{answer}
A spiral staircase.
\end{answer}
\end{pro}

\begin{pro}
Consider the spherical cap defined by  $$S=\{(x,y,z)\in\reals^3:
x^2+y^2+z^2=1,\;z\geq 1/\sqrt2\}.$$ Parametrise $S$ using Cartesian,
Spherical, and Cylindrical coordinates.

\end{pro}

\begin{pro}
Demonstrate that the surface in $\reals^3$ $$S: e^{x^2 + y^2 + z^2}
- (x + z)e^{-2xz} = 0,$$implicitly defined, is a cylinder.
\begin{answer} The planes $A: x + z = 0$ and $B: y = 0$ are secant. The
surface has equation of the form $f(A, B) = e^{A^2 + B^2} - A = 0$,
and it is thus a cylinder.  The directrix has direction $\vector{i}
- \vector{k}$.
\end{answer}
\end{pro}

\begin{pro}
Shew that the surface in $\reals^3$ implicitly defined by
$$x^4 + y^4 + z^4 - 4xyz(x + y + z) = 1$$is a surface of
revolution, and find its axis of revolution.
\label{exa:rev_2}\begin{answer} Rearranging,
$$ (x^2 + y^2 + z^2)^2 - \dfrac{1}{2}((x + y + z)^2 - (x^2 + y^2 + z^2)) - 1 = 0,$$
and so we may take $A: x + y + z = 0, \Sigma : x^2 + y^2 + z^2 = 0$,
shewing that the surface is of revolution. Its axis is the line in
the direction $\vector{i} + \vector{j} + \vector{k}$.
\end{answer}
\end{pro}
\begin{pro}
Shew that the surface $S$ in $\reals^3$ given implicitly by the
equation
$$\dfrac{1}{x - y} + \dfrac{1}{y - z}  + \dfrac{1}{z - x} = 1$$is a cylinder and
find the direction of its directrix.
\begin{answer} Considering the planes $A: x - y = 0, B: y - z = 0$,
the equation takes the form
$$f(A, B) = \dfrac{1}{A} + \dfrac{1}{B} - \dfrac{1}{A + B} - 1 =
0,$$thus the equation represents a cylinder. To find its directrix,
we find the intersection of the planes $x = y$ and $y = z$. This
gives $\colvec{x \\ y \\ z} = t\colvec{1 \\ 1 \\ 1}$. The direction
vector is thus $\vector{i}+ \vector{j} + \vector{k}$.
\end{answer}
\end{pro}
\begin{pro}
Shew that the surface $S$ in $\reals^3$ implicitly defined as
$$xy + yz + zx + x + y + z + 1 = 0$$is of revolution and find its
axis. \label{exa:rev_1} \begin{answer} Rearranging,
$$(x + y + z)^2 - (x ^2 + y ^2 + z ^2) + 2(x + y + z) + 2 = 0,$$so we
may take $A: x + y + z = 0, \Sigma : x ^2 + y ^2 + z ^2 = 0$ as our
plane and sphere. The axis of revolution is then in the direction of
$\vector{i} + \vector{j} + \vector{k}$.
\end{answer}
\end{pro}
\begin{pro}
Demonstrate that the surface in $\reals^3$ given implicitly by
$$z ^2 - xy = 2z - 1$$is a cone
\label{exa:cone_1}\begin{answer} After rearranging, we obtain
$$(z - 1)^2 - xy = 0,$$or
$$-\dfrac{x}{z - 1}\dfrac{y}{z - 1} + 1 = 0.$$Considering the planes
$$A: x = 0, \ B: y = 0, \ \ C: z = 1,$$we see that our surface is
a cone, with apex at $(0,0,1)$.
\end{answer}
\end{pro}
\begin{pro}[Putnam Exam 1970] Determine, with proof, the radius of the largest circle
which can lie on the ellipsoid
$$\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1,\qquad  a > b > c > 0.$$
 \begin{answer} The largest circle has radius $b$. Parallel cross sections of
the ellipsoid are similar ellipses, hence we may increase the size
of these by moving towards the centre of the ellipse.  Every plane
through the origin which makes a circular cross section must
intersect the $yz$-plane, and the diameter of any such cross section
must be a diameter of the ellipse $x = 0, \frac{y^2}{b^2} +
\frac{z^2}{c^2} = 1.$ Therefore, the radius of the circle is at most
$b$. Arguing similarly on the $xy$-plane shews that the radius of
the circle is at least $b$. To shew that circular cross section of
radius $b$ actually exist, one may verify that the two planes given
by $a^2(b^2 - c^2)z^2 = c^2(a^2 - b^2)x^2$ give circular cross
sections of radius $b$.
\end{answer}
\end{pro}


\begin{pro}
 \label{pro:hyperboloid1sheet} The hyperboloid of one sheet in figure
\ref{fig:hyperboloid1sheet} has the property that if it is cut by
planes at $z=\pm 2$, its projection on the $xy$ plane produces the
ellipse $x^2+\dfrac{y^2}{4}=1$, and if it is cut by a plane at
$z=0$, its projection on the $xy$ plane produces the ellipse
$4x^2+y^2=1$. Find its equation.
\begin{answer}
Any hyperboloid oriented like the one on the figure has an equation
of the form
$$ \dfrac{z^2}{c^2}=\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}-1. $$ When $z=0$ we must have
$$4x^2+y^2=1 \implies a=\dfrac{1}{2}, \ b=1.   $$
Thus
$$ \dfrac{z^2}{c^2}= 4x^2+y^2-1. $$Hence, letting $z=\pm 2$,
$$  \dfrac{4}{c^2} =4x^2+y^2-1 \implies \dfrac{1}{c^2}= x^2+\dfrac{y^2}{4}-\dfrac{1}{4}=1-\dfrac{1}{4}=\dfrac{3}{4},$$
since at $z=\pm 2$, $x^2+\dfrac{y^2}{4}=1$. The equation is thus
$$ \dfrac{3z^2}{4}=  4x^2+y^2-1.$$
\end{answer}

\end{pro}
\vspace{2cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\pstThreeDCoor[xMin=-3,xMax=3,yMax=3,yMin=-3,zMin=-3,zMax=3,IIIDticks=false]\pstThreeDEllipse(0,0,2)(1,0,0)(0,2.2,0)
\pstThreeDEllipse(0,0,0)(.5,0,0)(0,.9,0)
\pstThreeDEllipse(0,0,-2)(1,0,0)(0,2,0)
\parametricplotThreeD[xPlotpoints=200,linecolor=blue, linewidth=1.5pt,plotstyle=curve](-62,65){0  1 t cos div t tan}
\pscurve[linecolor=blue,
linewidth=1.5pt](-1.6,-1.2)(-.7,-.3)(-1.8,2.4)
\uput[r](1,-3.4){$z=-2, \ x^2+\frac{y^2}{4}=1$} \uput[u](2,3){$z=2,\
x^2+\frac{y^2}{4}=1$} \uput[r](1.3,-.2){$z=0,\ 4x^2+y^2=1$}
\vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:hyperboloid1sheet}.}\label{fig:hyperboloid1sheet}
\end{figurehere}


\end{multicols}





\section{Parametric Curves  in Space}
In analogy to curves on the plane, we now define curves in space.
\begin{df}
Let $[a; b] \subseteq \reals$. A {\em parametric curve}
representation $\point{r}$ of a curve $\Gamma$ is a function
$\point{r}:[a; b] \rightarrow \reals^3$, with
$$\point{r}(t) = \colpoint{x(t) \\ y(t)\\ z(t)},$$and such that $\point{r}([a; b]) = \Gamma$. $\point{r}(a)$ is
the {\em initial point} of the curve and $\point{r}(b)$ its {\em
terminal point}. A curve is {\em closed} if its initial point and
its final point coincide. The {\em trace} of the curve $\point{r}$
is the set of all images of $\point{r}$, that is, $\Gamma$. The
length of the curve is $$\int _\Gamma \norm{\d{\vector{r}}}.  $$
\end{df}

 \vspace*{3cm}
\begin{figure}[htpb]
%\begin{minipage}{7cm}
\centering \psset{unit=2pc}
   \parametricplotThreeD[xPlotpoints=201,linecolor=blue,%
 linewidth=2pt,plotstyle=curve](0,720){%
 1.5 t cos mul 1.5 t sin mul t 360 div}
    \pstThreeDCoor[IIIDticks=false,xMin=
-4,xMax=4,yMin=-4,yMax=4,zMin=-4,zMax=4] \vspace*{3cm}\footnotesize
\hangcaption{Helix.} \label{fig:helix}
%\end{minipage}
%\hfill
%\begin{minipage}{7cm}
% \centering
% \psset{unit=2pc}
%\parametricplotThreeD[xPlotpoints=201,linecolor=blue,%
% linewidth=2pt,plotstyle=curve](-720,720){%
% t  cos t  sin .7071 mul    t  cos -3 mul t sin -.7071 mul add 1
% add}
%   \psclip{\parametricplotThreeD[%
%    drawStyle=xyLines,
%    yPlotpoints=101,
%    xPlotpoints=101,linewidth=0.75pt,fillstyle=gradient](-2,1)(0,360){%
%    u cos u sin .7071 mul t}}
%    \parametricplotThreeD[%
%    drawStyle=xyLines,
%    yPlotpoints=101,
%    xPlotpoints=101,linewidth=0.75pt,linecolor=yellow](-1,1)(-1,1){%
%    t u u -1 mul -3 t mul add 1 add}
%     \endpsclip
%    \pstThreeDCoor[IIIDticks=false,xMin=
%-4,xMax=4,yMin=-4,yMax=4,zMin=-4,zMax=4] \vspace*{3cm}\footnotesize
%\hangcaption{Example \ref{exa:plane-ellipse}.}
%\label{fig:plane-ellipse}
%\end{minipage}
\end{figure}



\begin{exa}
The trace of
$$\point{r}(t) = \vector{i}\cos t + \vector{j}\sin t +
\vector{k}t$$is known as a {\em cylindrical helix.} To find the
length of the helix as $t$ traverses the interval $[0;2\pi]$, first
observe that
$$ \norm{\d{\vector{x}}} = \norm{(\sin t)^2+(-\cos t)^2+1}\d{t} = \sqrt{2}\d{t},
$$and thus the length is
$$ \int _0 ^{2\pi}  \sqrt{2}\d{t}= 2\pi\sqrt{2}.    $$
\label{exa:helix_1} The Maple\TM commands to graph this curve and to
find its length are:
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):
with(Student[VectorCalculus]):}{}
\mapleinline{active}{1d}{spacecurve([cos(t),sin(t),t],t=0..2*Pi,axes=normal);}{}
\mapleinline{active}{1d}{PathInt(1,[x,y,z]=Path(<cos(t),sin(t),t>,0..2*Pi));}{}
\end{mapleinput}
\end{maplegroup}
\end{exa}
\begin{exa}\label{exa:plane-ellipse}
Find a parametric representation for the curve resulting by the
intersection of the plane \mbox{$3x+y+z = 1$} and the cylinder $x^2
+ 2y^2 = 1$ in $\reals^3.$
\end{exa}
\begin{solu} The projection of the intersection of the plane $3x+y+z=1 $
and the cylinder is the ellipse $x^2 + 2y^2 = 1$, on the $xy$-plane.
This ellipse can be parametrised as
$$x = \cos t, \ y= \dfrac{\sqrt{2}}{2}\sin t, \qquad 0 \leq t \leq 2\pi .$$
From the equation of the plane,
$$z = 1 - 3x - y = 1 - 3\cos t - \dfrac{\sqrt{2}}{2}\sin t.$$
Thus we may take the parametrisation
$$\point{r}(t) = \colvec{x(t) \\ y(t) \\ z(t)} = \colvec{\cos t \\ \dfrac{\sqrt{2}}{2}\sin t \\ 1 - 3\cos t - \dfrac{\sqrt{2}}{2}\sin t}.$$
\end{solu}






\begin{exa}
Let $a, b, c$ be strictly positive real numbers. Consider the the
region
$$ \mathscr{R} =\left\{(x,y,z)\in\reals^3: \absval{x}\leq a, \absval{y}\leq b, z = c\right\}. $$
A point $P$ moves along the ellipse
$$ \dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1, \qquad z=c+1 $$once around,
and acts as a source light projecting a shadow of $\mathscr{R}$ onto
the $xy$-plane. Find the area of this shadow.
\end{exa}



\vspace{4cm}
\begin{figure}[htpb]
\begin{minipage}{5cm}
\centering \psset{unit=1pc}\pstThreeDNode(6,5,0){E}
\pstThreeDNode(-6,5,0){F} \pstThreeDNode(-6,-5,0){G}
\pstThreeDNode(6,-5,0){H}
\pstThreeDNode(5,5,0){I}\pstThreeDNode(5,-5,0){J}
\pstThreeDNode(-5,5,0){K}\pstThreeDNode(-5,-5,0){L}
\pstThreeDNode(5,-6,0){M}\pstThreeDNode(-5,-6,0){N}
\pstThreeDNode(-5,6,0){O}\pstThreeDNode(5,6,0){P}
\pstThreeDCircle*[linecolor=blue](5,5,0)(1,0,0)(0,1,0)
\pstThreeDCircle*[linecolor=blue](-5,5,0)(1,0,0)(0,1,0)
\pstThreeDCircle*[linecolor=blue](5,-5,0)(1,0,0)(0,1,0)
\pstThreeDCircle*[linecolor=blue](-5,-5,0)(1,0,0)(0,1,0)
\pspolygon*[linecolor=blue](I)(E)(H)(J)(M)(N)(L)(G)(F)(K)(O)(P)
 \pstThreeDNode(-1,-1,4){A}
\pstThreeDNode(-1,1,4){B} \pstThreeDNode(1,1,4){C}
\pstThreeDNode(1,-1,4){D} \pspolygon*[linecolor=magenta](A)(B)(C)(D)
\pstThreeDCircle(0,0,5)(1,0,0)(0,1,0)
\pstThreeDLine(1,0,5)(5,5,0)\pstThreeDLine(1,0,5)(6,-5,0)\pstThreeDLine(1,0,5)(-6,5,0)
    \pstThreeDCoor[IIIDticks=false,xMin=
0,xMax=8,yMin=0,yMax=8,zMin=0,zMax=8]
\vspace{3cm}\footnotesize\hangcaption{Problem
\ref{pro:parametricsur}.}\label{fig:parametricsur}
\end{minipage}\hfill
\begin{minipage}{5cm}
 \centering\psset{unit=1pc} \pscircle[linewidth=2pt,linecolor=red](0,0){2}
\multido{\i=0+45}{8}{\psdots(2;\i)}
\def\square{\pspolygon[linewidth=2pt](-3,-3)(-3,3)(3,3)(3,-3)}
\multido{\i=0+45}{8}{\rput(2;\i){\square}}
\psarc[linewidth=2pt,linecolor=blue](4.242640686;45){2}{0}{90}
\psarc[linewidth=2pt,linecolor=blue](4.242640686;-45){2}{-90}{0}
\psarc[linewidth=2pt,linecolor=blue](4.242640686;135){2}{90}{180}
\psarc[linewidth=2pt,linecolor=blue](4.242640686;225){2}{180}{270}
\vspace{3cm} \footnotesize\hangcaption{Problem
\ref{pro:parametricsur}.}\label{fig:parametricsur2}
\end{minipage}
\hfill
 \begin{minipage}{5cm}
\centering \psset{unit=1pc} \rput(7,0){
\pstGeonode[PointName=none,PointSymbol=none](4.242640686;45){A}(4.242640686;-45){B}(4.242640686;135){C}(4.242640686;225){D}(0,0){O}(2,0){h}(0,2){v}
\pstTranslation[PointName=none,PointSymbol=none]{O}{h}{A}[P]\pstTranslation[PointName=none,PointSymbol=none]{O}{v}{A}[P']
\pstTranslation[PointName=none,PointSymbol=none]{O}{h}{B}[Q]\pstTranslation[PointName=none,PointSymbol=none]{v}{O}{B}[Q']
\pstTranslation[PointName=none,PointSymbol=none]{h}{O}{C}[R]\pstTranslation[PointName=none,PointSymbol=none]{O}{v}{C}[R']
\pstTranslation[PointName=none,PointSymbol=none]{h}{O}{D}[S]\pstTranslation[PointName=none,PointSymbol=none]{v}{O}{D}[S']
\pspolygon*[linecolor=red](A)(P)(Q)(B)
\pspolygon*[linecolor=red](A)(P')(R')(C)
\pspolygon*[linecolor=red](C)(R)(S)(D)
\pspolygon*[linecolor=red](D)(S')(Q')(B)
\pswedge*[linecolor=cyan](A){2}{0}{90}
\pswedge*[linecolor=cyan](B){2}{-90}{0}
\pswedge*[linecolor=cyan](C){2}{90}{180}
\pswedge*[linecolor=cyan](D){2}{180}{270}
\pspolygon*[linecolor=blue](B)(A)(C)(D)}
 \vspace{3cm}\footnotesize\hangcaption{Problem \ref{pro:parametricsur}.}\label{fig:parametricsur3}
\end{minipage}
\end{figure}


\begin{solu}
First consider the same problem as $P$ moves around the circle
$$x^2+y^2=1,\quad  z=c+1$$ and the region is ${\cal R'}
=\left\{(x,y,z)\in\reals^3: |x|\leq 1, |y|\leq 1, z = c\right\}$.

\bigskip

For fixed $P$ $(u, v, c+1)$ on the circle, the image of ${\cal R'}$
(a $2\times 2$ square) on the $xy$ plane is a $(2c+2)\times (2c+2)$
square with centre at the point $Q(-cu,-cv,0)$ (figure
\ref{fig:parametricsur2}). As $P$ moves along the circle, $Q$ moves
along the circle with equation $x^2+y^2=c^2$ on the $xy$-plane
(figure \ref{fig:parametricsur2}), being the centre of a
$(2c+2)\times (2c+2)$ square. This  creates a region  as in figure
\ref{fig:parametricsur3}, where each quarter circle has radius $c$,
and the central square has side $2c+2$, of area
$$ \pi c^2+ 4(c+1)^2+8c(c+1). $$

\bigskip

Resizing to a region
$$ {\cal R} =\left\{(x,y,z)\in\reals^3: |x|\leq a, |y|\leq b, z = c\right\}, $$
and an ellipse
$$\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1, \quad z=c+1  $$we use instead
of $c+1$, $a(c+1)$ (parallel to the $x$-axis) and $b(c+1)$ (parallel
to the $y$-axis), so that the area shadowed is
$$ \pi ab(c+1)^2 + 4ab(c+1)^2 +  4abc(c+1) = c^2ab(\pi +12) + 16abc+4ab. $$
\end{solu}



\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
Let $\mathscr{C}$ be the curve in $\reals^3$ defined by
 $$x = t^2,\qquad  y = 4t^{3/2},\qquad z = 9t,\qquad  t\in [0;+\infty[.$$
Calculate the distance along $\mathscr{C}$ from $(1, 4, 9)$ to $(16,
32, 36)$.
\begin{answer}
The arc length element is
$$ \sqrt{(\d{x})^2 + (\d{y})^2 + (\d{z})^2} = \sqrt{4t^2 + 36t+81} \ \d{t} = (2t+9)\
\d{t}.$$We need $t=1$ to $t=4$. The desired length is
$$\int _{1} ^4 (2t+9)\ \d{t} = (t^2+9t)\Big| _1 ^4 = (16 + 36)-(1+9) = 42. $$
\end{answer}
\end{pro}
\begin{pro}
Consider the surfaces in $\reals^3$ implicitly defined by
$$ z-x^2-y^2-1=0, \qquad \qquad  z+x^2+y^2-3=0.  $$
Describe, as vividly as possible these surfaces and their
intersection, if they at all intersect. Find a parametric equation
for the curve on which they intersect,  if they at all intersect.
\begin{answer}
Observe that $z=1+x^2+y^2$ is a paraboloid opening up, with vertex
(lowest point) at $(0,0,1)$. On the other hand, $z=3-x^2-y^2$ is
another paraboloid opening down, with highest point at $(0,0,3)$.
Adding the equations we obtain
$$ 2z=z+z=(1+x^2+y^2)+(3-x^2-y^2)=4 \implies 2z=4 \implies z=2, $$
so they intersect at the plane $z=2$. Subtracting the equations,
$$ (1+x^2+y^2)-(3-x^2-y^2)=z-z=0 \implies 2x^2+2y^2-2=0 \implies x^2+y^2=1,
$$so they intersect at the circle $x^2+y^2 =1, z=2$.
Since they meet at the circle $x^2+y^2 =1$, we may parametrise this
circle as $x=\cos t, y = \sin t$, $t\in [0;2\pi]$, $z=2$.

\end{answer}


\end{pro}


\begin{pro}
Consider the space curve
$$ \vector{r}:t\mapsto \colvec{\dfrac{t^4}{1+t^2}\\ \dfrac{t^3}{1+t^2}\\ \dfrac{t^2}{1+t^2} }. $$
Let $t_k, 1\leq k \leq 4$ be non-zero real numbers. Prove that
$\vector{r}(t_1)$, $\vector{r}(t_2)$, $\vector{r}(t_3)$, and
$\vector{r}(t_4)$ are coplanar if and only if
$$\dfrac{1}{t_1} + \dfrac{1}{t_2}+\dfrac{1}{t_3}+\dfrac{1}{t_4}=0.
$$
\begin{answer}  Let  $\vector{r}(t)$ lie on the plane $ax+by+cz=d$.
  Then we
must have
$$ a\dfrac{t ^4}{1+t ^2} + b\dfrac{t ^3}{1+t ^2} +c\dfrac{t ^2}{1+t ^2}=d \implies  (at ^4 +bt ^3 + ct ^2) = d(1+t ^2)
\implies at^4 +bt^3 +(c-d)t^2 -d=0,  $$which means that if
$\vector{r}(t)$ is on the plane $ax+by+cz=d$, then $t$ must satisfy
the quartic polynomial $p(t) = at^4+ bt^3+(c-d)t^2-d=0.$ Hence, the
$t_k$ are coplanar if and only if they are roots of $p(t)$. Since
the coefficient of $t$ in this polynomial is $0$, then the sum of
the roots of $p(t)$ taken three at a time is $0$, that is,
$$ t_1t_2t_3+t_1t_2t_4 +t_1t_3t_4 +t_2t_3t_4=0 \implies  \dfrac{ t_1t_2t_3+t_1t_2t_4 +t_1t_3t_4 +t_2t_3t_4}{t_1t_2t_3t_4}=0 \implies  \dfrac{1}{t_1} + \dfrac{1}{t_2}+\dfrac{1}{t_3}+\dfrac{1}{t_4}=0, $$
as required.\end{answer}
\end{pro}
\begin{pro}
\label{pro:parametricsur} Give a parametrisation for the part of the
ellipsoid
$$  x^2+\dfrac{y^2}{9}+\dfrac{z^2}{4}=1$$
which lies on top of the plane $x+y+z=0$. \begin{answer} Observe
that in this problem you are {\em only parametrising the ellipsoid!}
The tricky part is to figure out the bounds in your parameters so
that {\em only} the part above the plane $x+y+z=0$ is described. A
common parametrisation found was:
$$x=\cos \theta \sin\phi, \quad y=3\sin \theta \sin\phi , \quad z=\cos \phi .   $$
The projection of the plane $x+y+z=0$ onto the $xy$-plane is the
line $y=-x$. To be ``above'' this line, the angle $\theta$, measured
from the positive $x$-axis needs to be in the interval
$-\dfrac{\pi}{4}\leq \theta \leq \dfrac{3\pi}{4}$. Since $\colvec{1\\
1 \\ 1}$ is normal to the plane $x+y+z=0$, the plane makes an angle
of $\dfrac{\pi}{4}$ with the $z$-axis. Recall that $\phi$ is
measured from $\phi =0$ (positive $z$-axis) to $\phi =\pi$ (negative
$z$-axis). Hence to be above the plane we need  $0 \leq \phi \leq
\dfrac{3\pi}{4}$.
\end{answer}
\end{pro}
\begin{pro}
Let $P$ be the point $(2,0,1)$ and consider the curve $\mathscr{C}:
z = y ^2$ on the $yz$-plane. As a point $Q$ moves along
$\mathscr{C}$, let $R$ be the point of intersection of $\line{PQ}$
and the $xy$-plane. Graph all points $R$ on the $xy$-plane.
\end{pro}

\begin{pro}
Let $a$ be a real number parameter, and consider the planes $$P_1:
ax+y+z=-a, $$ $$  P_2: x-ay+az=-1.$$Let $l$ be their intersection
line.
\begin{enumerate}
\item Find a direction vector for $l$.
\item As $a$ varies through $\reals$, $l$ describes a surface $\cal{S}$ in
$\reals^3$.  Let $(x,y,z)$ be the point of intersection of this
surface and the plane $z=c$. Find an equation relating $x$ and $y$.
\item Find the volume bounded by the two planes, $x=0$, and $x=1$,
and the surface $\cal{S}$ as $c$ varies.
\end{enumerate}
\begin{answer}
\noindent

\begin{enumerate}
\item $\colvec{-2a \\ a^2-1 \\ a^2+1}$
\item $x^2+y^2 = c^2+1$
\item $\pi \int _0 ^1 (c^2+1)\d{c} = \dfrac{4\pi}{3}$
\end{enumerate}
\end{answer}
\end{pro}
\end{multicols}

\section{Multidimensional Vectors}
We briefly describe space in $n$-dimensions. The ideas expounded
earlier about the plane and space carry almost without change.
\begin{df}
$\reals^n$ is the $n$-dimensional space, the collection
$$ \reals^n = \left\{\colpoint{x_1 \\ x_2 \\ \vdots \\ x_n}: x_k \in \reals\right\}. $$
\end{df}
\begin{df}
If $\vector{a}$ and $\vector{b}$ are two vectors in $\reals^n$ their
{\em vector sum} $\vector{a} + \vector{b}$ is defined by the
coordinatewise addition \begin{equation}\vector{a} + \vector{b} = \colvec{a_1 + b_1 \\ a_2 + b_2 \\
\vdots \\ a_n + b_n}.    \label{eq:vector_addition}\end{equation}
\end{df}
\begin{df}A real number $\alpha\in\reals$ will be called a {\em scalar}.
If $\alpha\in\reals$ and $\vector{a}\in\reals^n$ we define {\em
scalar multiplication} of a vector and a scalar by   the
coordinatewise multiplication \begin{equation}\alpha\vector{a} = \colvec{\alpha a_1  \\ \alpha  a_2  \\
\vdots \\ \alpha a_n }.
\label{eq:scalar_multiplication}\end{equation}
\end{df}
\begin{df}
The {\em standard ordered basis} for $\reals^n$ is the collection of
vectors
$$\{\vector{e}_1, \vector{e}_2,\ldots,
\vector{e}_n,\}$$ with
$$ \vector{e}_k = \colvec{0 \\ \vdots\\ 1 \\ \vdots \\ 0}$$ (a $1$
in the $k$ slot and $0$'s everywhere else). Observe that $$ \sum _{k = 1} ^n \alpha_k\vector{e}_k   =  \colvec{\alpha_1 \\
\alpha_2\\ \vdots  \\ \alpha_n}. $$
\end{df}
\begin{df}
Given vectors $\vector{a}, \vector{b} $ of $\reals^n$, their {\em
dot product} is $$ \dotprod{a}{b}  = \sum _{k=1} ^n a_kb_k.$$
\end{df}
We now establish one of the most useful inequalities in analysis.
\begin{thm}[Cauchy-Bunyakovsky-Schwarz Inequality] Let
$\vector{x}$ and $\vector{y}$  be any two vectors in $\reals^n$.
Then we have
$$
 |\dotprod{x}{y}| \leq \norm{\vector{x}}\norm{\vector{y}} .$$\label{thm:cauchy_schwarz}
\end{thm}
\begin{pf}
Since the norm of any vector is non-negative, we have $$
\begin{array}{lll} \norm{\vector{x} + t\vector{y}} \geq 0 & \iff &
(\vector{x} + t\vector{y})\bp (\vector{x} +t\vector{y}) \geq 0 \\ &
\iff & \dotprod{x}{x} + 2t\dotprod{x}{y} + t^2\dotprod{y}{y} \geq 0
\\ & \iff & \norm{\vector{x}}^2 + 2t\dotprod{x}{y} +
t^2\norm{\vector{y}}^2 \geq 0.
\end{array}$$ This last expression is a quadratic polynomial in
$t$ which is always non-negative. As such its discriminant must be
non-positive, that is, $$ (2\dotprod{x}{y})^2 -
4(\norm{\vector{x}}^2)(\norm{\vector{y}}^2) \leq 0 \iff
|\dotprod{x}{y}| \leq \norm{\vector{x}}\norm{\vector{y}} ,
$$giving the theorem.
\end{pf}
\begin{rem}
The above proof works not just for $\reals^n$ but for any {\em
vector space} (cf. below) that has an inner product. \end{rem} The
form of the Cauchy-Bunyakovsky-Schwarz most useful to us will be
\begin{equation} \left|\sum _{k = 1} ^n x_k y_k \right| \leq
\left(\sum _{k = 1} ^nx_k ^2\right)^{1/2} \left(\sum _{k = 1} ^ny_k
^2\right)^{1/2}, \label{eq:cbs_sum_form}\end{equation} for real
numbers $x_k, y_k$.
\begin{cor}[Triangle Inequality] Let
$\vector{a}$ and $\vector{b}$ be  any two vectors in $\reals^n$.
Then we have
$$\norm{\vector{a} + \vector{b}} \leq \norm{\vector{a}} + \norm{\vector{b}}.$$
\end{cor}
\begin{pf}
$$\begin{array}{lll}
||\vector{a} + \vector{b}||^2 & = & (\vector{a} + \vector{b})\bp (\vector{a} + \vector{b}) \\
& = & \vector{a}\bp\vector{a} + 2\vector{a}\bp\vector{b} +
\vector{b}\bp\vector{b} \\
& \leq & ||\vector{a}||^2  + 2||\vector{a}||||\vector{b}|| +
||\vector{b}||^2 \\
& = & (||\vector{a}|| + ||\vector{b}||)^2,
\end{array}$$from where the desired result follows.
\end{pf}Again, the preceding proof is valid in any vector space that
has a norm.
\begin{df}
Let $\vector{x}$ and $\vector{y}$ be two non-zero vectors in a
vector space over the real numbers. Then the angle
$\anglebetween{x}{y}$ between them is given by the relation $$\cos
\anglebetween{x}{y} =
\dfrac{\dotprod{x}{y}}{\norm{\vector{x}}\norm{\vector{y}}}.
$$This expression agrees with the geometry in the case of the dot
product for $\reals^2$ and $\reals^3$.
\end{df}

\begin{exa}
Assume that $a_k, b_k, c_k, k = 1, \ldots, n$, are positive real
numbers. Shew that
$$\left(\sum _{k = 1} ^n a_kb_kc_k\right)^{4}
\leq \left(\sum _{k = 1} ^n a_k ^4\right)\left(\sum _{k = 1} ^n b_k
^4\right) \left(\sum _{k = 1} ^n c_k ^2\right)^{2}.$$\end{exa}
\begin{solu}Using CBS on $\sum _{k = 1} ^n (a_kb_k)c_k$ once we obtain
$$\sum _{k = 1} ^n a_kb_kc_k
\leq \left(\sum _{k = 1} ^n a_k ^2b_k ^2\right)^{1/2} \left(\sum _{k
= 1} ^n c_k ^2\right)^{1/2}.
$$Using CBS again on $\left(\sum _{k = 1} ^n a_k ^2b_k ^2\right)^{1/2}$ we obtain
$$
\begin{array}{lll}
\sum _{k = 1} ^n a_kb_kc_k  & \leq &
 \left(\sum _{k = 1} ^n a_k ^2 b_k ^2\right)^{1/2}
\left(\sum _{k = 1} ^n c_k ^2\right)^{1/2} \\
  & \leq & \left(\sum _{k = 1} ^n a_k ^4\right)^{1/4}
\left(\sum _{k = 1} ^n b_k ^4\right)^{1/4}
\left(\sum _{k = 1} ^n c_k ^2\right)^{1/2}, \\
\end{array}
$$which gives the required inequality.
\end{solu}

We now use the CBS inequality to establish another important
inequality. We need some preparatory work.
\begin{lem}\label{lem:for-AMGM}Let $a_k>0$, $q_k>0$, with $\sum _{k=1} ^n q_k =
1$. Then $$ \lim _{x\to 0} \log\left(\sum _{k=1} ^n q_ka_k
^x\right)^{1/x} = \sum _{k=1} ^n q_k\log a_k.
$$
\end{lem}
\begin{pf}
Recall that $\log (1+x) \sim x$ as $x\to 0$. Thus
$$\begin{array}{lll} \lim _{x\to 0} \log\left(\sum _{k=1} ^n q_ka_k
^x\right)^{1/x} & = & \lim _{x\to
0} \dfrac{\log\left(\sum _{k=1} ^n q_ka_k ^x\right)}{x}\\
& = &  \lim _{x\to
0} \dfrac{\sum _{k=1} ^n q_k(a_k ^x-1)}{x}\\
& = &  \lim _{x\to
0} \sum _{k=1} ^n q_k\dfrac{(a_k ^x-1)}{x}\\
& = & \sum _{k=1} ^n q_k\log a_k.
\end{array}$$
\end{pf}
\begin{thm}[Arithmetic Mean-Geometric Mean Inequality]\label{thm:arith_geom_meanbyCBS} Let $a_k\geq 0$. Then
$$ \sqrt[n]{a_1a_2\cdots a_n}  \leq \dfrac{a_1+a_2+\cdot + a_n}{n}. $$
\end{thm}
\begin{pf}
If $b_k \geq 0$, then by CBS
\begin{equation}
\dfrac{1}{n}\sum _{k=1} ^n b_k \geq \left(\dfrac{1}{n}\sum _{k=1} ^n
\sqrt{b_k} \right)^2. \label{eq:cons-of-CBS}
\end{equation}
Successive applications of (\ref{eq:cons-of-CBS}) yield the monotone
decreasing sequence
$$ \dfrac{1}{n}\sum _{k=1} ^n a_k \geq \left(\dfrac{1}{n}\sum _{k=1} ^n
\sqrt{a_k} \right)^2 \geq \left(\dfrac{1}{n}\sum _{k=1} ^n
\sqrt[4]{a_k} \right)^4 \geq \ldots , $$ which by Lemma
\ref{lem:for-AMGM} has limit
$$\exp \left(\dfrac{1}{n}\sum _{k=1} ^n \log a_k \right) = \sqrt[n]{a_1a_2\cdots a_n},  $$
giving
$$ \sqrt[n]{a_1a_2\cdots a_n}  \leq \dfrac{a_1+a_2+\cdot + a_n}{n}, $$
as wanted.
\end{pf}

\begin{exa} For any positive integer $n
> 1$ we have
$$1\cdot 3 \cdot 5 \cdots \cdot (2n - 1) < n^n.$$ For, by AMGM,
$$1\cdot 3 \cdot 5 \cdots \cdot (2n - 1) < \left(\dfrac{1 +  3 + 5 + \cdots + (2n -
1)}{n}\right)^n = \left(\dfrac{n^2}{n}\right)^n = n^n.$$Notice that
since the factors are unequal we have strict inequality.
\end{exa}
\begin{df}
 Let $a_1 > 0, a_2 > 0, \ldots , a_n >
0$. Their {\em harmonic mean} is given by
$$\dfrac{n}{
\dfrac{1}{a_1} + \dfrac{1}{a_2} + \cdots + \dfrac{1}{a_n}}.
$$
\end{df}
As a corollary to AMGM we obtain
\begin{cor}[Harmonic Mean-Geometric Mean Inequality] Let $b_1 > 0, b_2 > 0, \ldots , b_n >
0$. Then
$$\dfrac{n}{
\dfrac{1}{b_1} + \dfrac{1}{b_2} + \cdots + \dfrac{1}{b_n}} \leq
(b_1b_2\cdots b_n)^{1/n}.$$ \label{cor:harm_geom_mean}
\end{cor}
\begin{pf}
This follows by putting $a_k = \dfrac{1}{b_k}$ in Theorem
\ref{thm:arith_geom_meanbyCBS} . For then $$
\left(\dfrac{1}{b_1}\dfrac{1}{b_2}\cdots\dfrac{1}{b_n}\right)^{1/n}
\leq \dfrac{\dfrac{1}{b_1} + \dfrac{1}{b_2} + \cdots +
\dfrac{1}{b_n}}{n}.
$$
\end{pf}
Combining Theorem \ref{thm:arith_geom_meanbyCBS}  and Corollary
\ref{cor:harm_geom_mean}, we deduce \begin{cor}[Harmonic
Mean-Arithmetic Mean Inequality] \label{cor:harm_arith_mean} Let
$b_1 > 0, b_2 > 0, \ldots , b_n > 0$. Then
$$\dfrac{n}{
\dfrac{1}{b_1} + \dfrac{1}{b_2} + \cdots + \dfrac{1}{b_n}} \leq
\dfrac{b_1+b_2+\cdots + b_n}{n}.$$

\end{cor}
\begin{exa}
Let $a_k > 0,$ and $s = a_1 + a_2 + \cdots + a_n$. Prove that
$$\sum _{k = 1} ^n \dfrac{s}{s -
a_k} \geq  \dfrac{n^2}{n - 1}$$and
$$\sum _{k = 1} ^n \dfrac{a_k}{s - a_k} \geq  \dfrac{n}{n - 1}.$$
\end{exa}
\begin{solu}  Put $b_k = \dfrac{s}{s - a_k}$. Then $$ \sum _{k = 1} ^n
\dfrac{1}{b_k} = \sum _{k = 1} ^n \dfrac{s - a_k}{s} = n - 1
$$ and from Corollary
\ref{cor:harm_arith_mean},
$$ \dfrac{n}{n - 1}  \leq \dfrac{\sum _{k = 1} ^n \dfrac{s}{s -
a_k}}{n},
$$from where the first inequality is proved.

\bigskip

Since $\dfrac{s}{s - a_k}  - 1 = \dfrac{a_k}{s - a_k},$ we have
$$\begin{array}{lll}\sum _{k = 1} ^n \dfrac{a_k}{s - a_k} & = &
\sum _{k = 1} ^n \left(\dfrac{s}{s - a_k}  - 1\right) \\
& = & \sum _{k = 1} ^n \left(\dfrac{s}{s - a_k}\right) - n \\
& \geq &   \dfrac{n^2}{n - 1} - n \\
& = & \dfrac{n}{n - 1}.\end{array}$$
\end{solu}

\bigskip

\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\bigskip

\begin{pro}
The {\em Arithmetic Mean Geometric Mean Inequality} says that if
$a_k \geq 0$ then $$(a_1a_2\cdots a_n)^{1/n} \leq \frac{a_1 + a_2 +
\cdots + a_n}{n}. $$ Equality occurs if and only if $a_1 = a_2 =
\ldots = a_n.$ In this exercise you will follow the steps of a proof
by George P\'{o}lya.
\begin{enumerate}
\item Prove that $\forall x\in\reals , \  x \leq e^{x - 1}.$
\item Put $$A_k = \frac{na_k}{a_1 + a_2 + \cdots + a_n},$$ and $G_n =
a_1a_2\cdots a_n$. Prove that $$A_1A_2\cdots A_n =
\frac{n^nG_n}{(a_1 + a_2 + \cdots + a_n )^n},$$ and that
$$A_1 + A_2 + \cdots + A_n = n.$$
\item Deduce that
$$G_n \leq \left(\frac{a_1 + a_2 + \cdots +
a_n}{n}\right)^n.$$
\item Prove the AMGM inequality by assembling the results above.
\end{enumerate}
\begin{answer}\noindent
\begin{enumerate}
\item Put $f:\reals \rightarrow \reals$, $f(x) = e^{x - 1} - x.$ Clearly $f(1)
= e^0 - 1 = 0$. Now,
$$f'(x) = e^{x - 1} - 1,$$
$$f''(x) = e^{x - 1}.$$
If $f'(x) = 0$ then $e^{x - 1} = 1$ implying that $x = 1$. Thus $f$
has a single minimum point at $x = 1$. Thus for all real numbers $x$
$$ 0 = f(1) \leq f(x) = e^{x - 1} - x,$$which gives the desired
result.
\item Easy Algebra!
\item Easy Algebra!
\item By the preceding results, we have
$$A_1 \leq \exp (A_1 - 1),$$
$$A_2 \leq \exp (A_2 - 1),$$
$$\vdots$$
$$A_n \leq \exp (A_n - 1).$$Since all the quantities involved are
non-negative, we may multiply all these inequalities together, to
obtain,
$$A_1A_2\cdots A_n \leq \exp (A_1 + A_2 + \cdots + A_n - n).$$In
view of the observations above, the preceding inequality is
equivalent to
$$\dfrac{n^nG_n}{(a_1 + a_2 + \cdots + a_n )^n} \leq \exp (n - n) = e^0 =
1.$$We deduce that
$$G_n \leq \left(\dfrac{a_1 + a_2 + \cdots +
a_n}{n}\right)^n,$$which is equivalent to
$$(a_1a_2\cdots a_n)^{1/n} \leq \dfrac{a_1 + a_2 + \cdots + a_n}{n}. $$
Now, for equality to occur, we need each of the inequalities $A_k
\leq \exp (A_k - 1)$ to hold. This occurs, in view of the preceding
lemma, if and only if $A_k = 1, \ \forall k$, which translates into
$a_1 = a_2 = \ldots = a_n$. This completes the proof.

\end{enumerate}


\end{answer}

\end{pro}
\begin{pro}
Demonstrate that if   $x_{1},x_{2}, \ldots ,x_{n},$  are strictly
positive real numbers then
$$\left(x_{1}+x_{2}+ \ldots +x_{n}\right)\left(\frac{1}{x_{1}}+\frac{1}{x_{2}}+ \ldots +\frac{1}{x_{n}}%
\right)\geq n^{2}.$$
\begin{answer}By CBS,
$$\begin{array}{lll}\left(x_{1}+x_{2}+ \ldots +x_{n}\right)\left(\frac{1}{x_{1}}+\frac{1}{x_{2}}+ \ldots +\frac{1}{x_{n}}%
\right)& \geq &  \left(\stackunder{i=1}{\stackrel{n}{\sum }}\sqrt{x_{i}}\frac{1}{\sqrt{x_{i}}%
}\right)^{2} \\
& = & n^2.\end{array}$$

\end{answer}
\end{pro}
\begin{pro}[USAMO 1978]
Let $a,b,c,d,e$ be real numbers such that
$$a+b+c+d+e=8, \qquad a^{2}+b^{2}+c^{2}+d^{2}+e^{2}=16.$$Maximise the value of  $e$.

\begin{answer}
By CBS, $$\begin{array}{lll}\left(a+b+c+d\right)^{2}\leq
\left(1+1+1+1\right)\left(a^{2}+b^{2}+c^{2}+d^{2}\right) & = &
4\left(a^{2}+b^{2}+c^{2}+d^{2}\right).\end{array}$$ Hence,
$$\left(8-e\right)^{2}\leq 4\left(16-e^{2}\right)\iff
e\left(5e-16\right)\leq 0\iff 0\leq e\leq \frac{16}{5}.$$ The
maximum value $e=\frac{16}{5}$ is reached when
$a=b=c=d=\frac{6}{5}.$

\end{answer}
\end{pro}

\begin{pro} Find all positive real numbers  $$a_1\leq a_2\leq \ldots \leq a_n
$$ such that
$$\sum _{k=1} ^n a_k =96, \qquad \sum _{k=1} ^n a_k ^2 =144, \qquad \sum _{k=1} ^n a_k ^3 =216.  $$
\begin{answer}
Observe that  $96\cdot 216=144^2$ and by CBS,
$$  \sum _{k=1} ^n a_k ^2  \leq \left( \sum _{k=1} ^n a_k ^3 \right)\left( \sum _{k=1} ^n a_k \right).  $$
As there is equality, $$ (a_1, a_2, \ldots , a_n) = t (a_1 ^3, a_2
^3, \ldots , a_n^3)$$for some real number $t$. Hence $a_1 = a_2 =
\ldots = a_n=a$, from where $na=96$, $na^2=144$ gives
$a=\dfrac{3}{2}$ y $n=32$.
\end{answer}
\end{pro}

\begin{pro}
Demonstrate that for integer $n>1$ we have, $$
n!<\left(\dfrac{n+1}{2}\right)^n.
$$
\begin{answer}
Applying the AM-GM inequality, for $1,2,\ldots , n$:
$$ n!^{1/n}= (1\cdot 2 \cdots n)^{1/n}< \dfrac{1+2+\cdots + n}{n} = \dfrac{n+1}{2},
$$with strict inequality for
$n>1$.
\end{answer}
\end{pro}


\begin{pro} Let $f(x) = (a + x)^5(a - x)^3, \ x\in
[-a; a].$ Find the maximum value of de  $f$ using the AM-GM
inequality.
\begin{answer}If $x\in [-a; a]$, then $a + x \geq 0$ and $a - x \geq 0$, and thus we may use AM-GM with  $n = 8$,
$a_1 = a_2 = \cdots = a_5 = \dfrac{a + x}{5}$ and $a_6 = a_7 = a_8 =
\dfrac{a - x}{3}.$ We deduce that
$$\left(\dfrac{a + x}{5}\right)^5 \left(\dfrac{a - x}{3}\right)^3 \leq \left(\dfrac{5\left(\dfrac{a + x}{5}\right) + 3\left(\dfrac{a - x}{3}\right) }{8}\right)^8
 = \left(\dfrac{a}{4}\right)^8, $$
from where
$$f(x) \leq \dfrac{5^53^3a^8}{4^8},$$with equality if and only if
$\dfrac{a + x}{5} = \dfrac{a - x}{3}$. \end{answer}
\end{pro}


\begin{pro}Prove that the sequence \mbox{$x_n = \left(1 + \dfrac{1}{n}\right)^{n}$}, $n = 1,
2, \ldots$ is strictly increasing. \begin{answer} Applying AM-GM to
the set of  $n + 1$ numbers
$$1, 1 +
\dfrac{1}{n}, 1 + \dfrac{1}{n}, \ldots , 1 + \dfrac{1}{n},$$has
arithmetic mean
$$1 + \dfrac{1}{n + 1}$$ and geometric mean
$$\left(1 +
\dfrac{1}{n}\right)^{n/(n + 1)}.$$Therefore,
$$1 +
\dfrac{1}{n + 1} >  \left(1 + \dfrac{1}{n}\right)^{n/(n + 1)},$$
that is
$$\left(1 +
\dfrac{1}{n + 1}\right)^{n + 1} >  \left(1 +
\dfrac{1}{n}\right)^{n},$$ which means
$$x_{n + 1} > x_n,$$giving the assertion.
\end{answer}
\end{pro}

\end{multicols}


\chapter{Differentiation}

\section{Some Topology}
\begin{df}
Let $\point{a}\in\reals^n$ and let $\varepsilon > 0$. An {\em open
ball} centred at $\point{a}$ of radius $\varepsilon$ is the set
$$ \ball{\point{a}}{\varepsilon} = \{\point{x}\in\reals^n: \norm{\point{x}-\point{a}} <
\varepsilon\}.
$$An {\em open box} is a Cartesian product of open intervals
$$ ]a_1; b_1[\times  ]a_2; b_2[\times  \cdots \times   ]a_{n-1}; b_{n-1}[\times  ]a_n; b_n[,$$
where the $a_k, b_k$ are real numbers.
\end{df}
\vspace{4cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering \psset{unit=1pc}
\psaxes[linewidth=2pt,labels=none,ticks=none]{->}(0,0)(-1,-1)(8,8)
\pstGeonode[PointName=none](4,4){A}(0,0){O}
\pstTranslation[DistCoef=.35,PointName=none,PointSymbol=none]{O}{A}{A}[B]
\pscircle*[linecolor=green](A){2}\pscircle[linestyle=dashed,linewidth=2pt](A){2}
\uput[d](A){\tiny{$(a_1,a_2)$}}
\ncline{->}{A}{B}\aput{:U}{$\varepsilon$}
\vspace{1cm}\footnotesize\hangcaption{Open ball in $\reals^2$.}
\label{fig:open-ball-r2}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=1pc}
\psaxes[linewidth=2pt,labels=none,ticks=none]{->}(0,0)(-1,-1)(8,8)
\pstGeonode[PointName=none](1,3){A}(8,3){B}(8,6){C}(1,6){D}
\pspolygon*[linecolor=cyan](A)(B)(C)(D)
\pstLineAB[linestyle=dashed,linewidth=2pt]{A}{B}\bput{:U}{$b_1-a_1$}
\ncline[linestyle=dashed,linewidth=2pt]{B}{C}\bput{:U}{$b_2-a_2$}
\ncline[linestyle=dashed,linewidth=2pt]{C}{D}
\ncline[linestyle=dashed,linewidth=2pt]{D}{A}
\pstMiddleAB[PointName=none]{A}{C}{M}
\vspace{1cm}\footnotesize\hangcaption{Open rectangle in $\reals^2$.}
\label{fig:open-box-r2}
\end{minipage}
\end{figure}
\vspace{4cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering \psset{unit=1pc}
 \psset{unit=4pc}
\pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
\pstGeonode[PointName=none](1,.5){A}(0,0){O}
\pstTranslation[DistCoef=.9,PointName=none,PointSymbol=none]{O}{A}{A}[B]
\pstCircleOA[linestyle=dashed,linewidth=2pt,
Radius=\pstDistVal{1},linecolor=red]{A}{}\pstLineAB[arrows={->}]{A}{B}
\aput{:U}{$\varepsilon$} \uput[r](A){\tiny$(a_1,a_2,a_3)$}
\psellipse[linestyle=dashed,linewidth=1.2pt](A)(1,.25)
\vspace{1cm}\footnotesize\hangcaption{Open ball in $\reals^3$.}
\label{fig:open-ball-r3}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\centering \psset{unit=4pc}
\pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
\pstThreeDBox[fillstyle=gradient,linewidth=2pt,linestyle=dashed](1,1,2)(1,0,0)(0,2,0)(0,0,.5)
\vspace{1cm}\footnotesize\hangcaption{Open box in $\reals^3$.}
\label{fig:open-box-r3}
\end{minipage}
\end{figure}


\vspace{2cm}

\begin{exa}
An open ball in $\reals$ is an open interval, an open ball in
$\reals^2$ is an open disk (see figure \ref{fig:open-ball-r2}) and
an open ball in $\reals^3$ is an open sphere (see figure
\ref{fig:open-ball-r3}). An open box in $\reals$ is an open
interval, an open box in $\reals^2$ is a rectangle without its
boundary (see figure \ref{fig:open-box-r2}) and an  open box in
$\reals^3$ is a box without its boundary (see figure
\ref{fig:open-box-r3}).
\end{exa}
\begin{df}
A set ${\mathscr  O}\subseteq \reals^n$ is said to be {\em open} if
for every point belonging to it we can surround the point by a
sufficiently small open ball so that this balls lies completely
within the set. That is, $\forall\point{a}\in {\mathscr  O} \ \
\exists \varepsilon > 0$ such that $\ball{\point{a}}{\varepsilon}
\subseteq {\mathscr  O}$.
\end{df}
\begin{exa}
The open interval $]-1; 1[$ is open in $\reals$. The interval $]-1;
1]$ is not open, however, as no interval centred at $1$ is totally
contained in $]-1; 1]$.
\end{exa}\begin{exa}
The region  $]-1; 1[\times ]0; +\infty[$ is open in $\reals^2$.
\end{exa}
\begin{exa}
The ellipsoidal region $\left\{(x,y)\in\reals^2: x^2 + 4y^2 <
4\right\}$ is open in $\reals^2$.
\end{exa}
The reader will recognise that open boxes, open ellipsoids and their
unions and finite intersections are open sets in $\reals^n$.
\begin{df}
A set ${\mathscr  F} \subseteq \reals^n$ is said to be {\em closed}
in $\reals^n$ if its complement $\reals^n \setminus {\mathscr  F}$
is open.
\end{df}
\begin{exa}
The closed interval $[-1; 1]$ is closed in $\reals$, as its
complement, $\reals \setminus [-1;1] = ]-\infty; -1[\cup ]1;
+\infty[$ is open in $\reals$. The interval $]-1; 1]$ is neither
open nor closed in $\reals$, however.
\end{exa}\begin{exa}
The region  $[-1; 1]\times [0; +\infty[\times [0; 2]$ is closed in
$\reals^3$.
\end{exa}

\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Determine whether the following subsets of $\reals^2$ are open,
closed, or neither, in $\reals^2$.
\begin{enumerate}
\item $A=\{(x,y)\in\reals^2: |x|<1, |y|<1\}$
\item  $B=\{(x,y)\in\reals^2: |x|<1, |y|\leq 1\}$
\item  $C=\{(x,y)\in\reals^2: |x|\leq 1, |y|\leq 1\}$
\item  $D=\{(x,y)\in\reals^2: x^2\leq y \leq x\}$
\item  $E=\{(x,y)\in\reals^2: xy>1\}$
\item  $F=\{(x,y)\in\reals^2: xy\leq 1\}$
\item  $G=\{(x,y)\in\reals^2: |y|\leq 9, x<y^2\}$
\end{enumerate}
\end{pro}
\begin{pro}[Putnam Exam 1969] Let $p(x,y)$ be a polynomial with real
coefficients in the real variables $x$ and $y$, defined over the
entire plane $\reals^2$. What are the possibilities for the image
(range) of $p(x,y)$? \begin{answer} Since polynomials are continuous
functions and the image of a connected set is connected for a
continuous function, the image must be an interval of some sort. If
the image were a finite interval, then $f(x,kx)$ would be bounded
for every constant $k$, and so the image would just be the point
$f(0,0).$ The possibilities are thus
\begin{enumerate}\item  a single point (take for example,
$p(x,y)= 0$), \item  a semi-infinite interval with an endpoint (take
for example $p(x,y) = x^2$ whose image is $[0; +\infty[$),
\item  a semi-infinite interval with no endpoint (take for example
$p(x,y) = (xy - 1)^2 + x^2$ whose image is $]0; +\infty[$),
\item  all real numbers (take for example $p(x,y) =
x$).
\end{enumerate}
\end{answer}
\end{pro}
\begin{pro}[Putnam 1998] Let ${\cal F}$ be a finite collection of
open disks in $\reals^2$ whose union contains a set $E\subseteq
\reals^2$. Shew that there is a pairwise disjoint subcollection
$D_k, k \geq 1$ in ${\cal F}$ such that
$$E\subseteq \bigcup _{j=1} ^n 3D_j.  $$

\end{pro}

\end{multicols}

\section{Multivariable Functions}
Let $A\subseteq \reals^n$. For most of this course, our concern will
be functions of the form
$$f:A \to \reals^m.  $$If $m=1$, we say that $f$ is a {\em scalar
field}. If $m\geq 2$, we say that $f$ is a {\em vector field}.



We would like to develop a calculus analogous to the situation in
$\reals$. In particular, we would like to examine limits,
continuity, differentiability, and integrability of multivariable
functions. Needless to say, the introduction of more variables
greatly complicates the analysis. For example, recall that the graph
of a function $f:A\rightarrow \reals^m$, $A\subseteq \reals^n$.  is
the set
$$ \{(\point{x},f(\point{x})): \point{x}\in A)\}\subseteq \reals^{n+m}. $$
If $m+n>3$, we have an object of more than three-dimensions! In the case $n=2, m=1$, we have a tri-dimensional surface.
We will now briefly examine this case.

\begin{df}
Let $A\subseteq \reals^2$ and let $f:A\to \reals$ be a function.
Given $c\in\reals$, the {\em level curve} at $z=c$ is the curve
resulting from the intersection of the surface $z=f(x,y)$ and the
plane $z=c$, if there is such a curve.
\end{df}

\begin{exa}
The level curves of the surface $f(x,y)=x^2+y^2$ (an elliptic paraboloid) are the concentric circles
$$x^2+y^2 = c,  \qquad c>0. $$
\end{exa}


\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
Sketch the level curves for the following maps.
\begin{enumerate}
\item $(x,y)\mapsto x+y$
\item $(x,y)\mapsto xy$
\item $(x,y)\mapsto \min (|x|,|y|)$
\item $(x,y)\mapsto x^3-x$
\item $(x,y)\mapsto x^2+4y^2$
\item $(x,y)\mapsto \sin (x^2+y^2)$
\item $(x,y)\mapsto \cos (x^2-y^2)$
\end{enumerate}
\end{pro}
\begin{pro}
Sketch the level surfaces for the following maps.
\begin{enumerate}
\item $(x,y,z)\mapsto x+y+z$
\item $(x,y,z)\mapsto xyz$
\item $(x,y,z)\mapsto \min (|x|,|y|, |z|)$
\item $(x,y,z)\mapsto x^2+y^2$
\item $(x,y,z)\mapsto x^2+4y^2$
\item $(x,y,z)\mapsto \sin (z-x^2-y^2)$
\item $(x,y,z)\mapsto x^2+y^2+z^2$
\end{enumerate}
\end{pro}



\end{multicols}

\section{Limits}
 We will start
with the notion of {\em limit}.



\begin{df}
A function $f:\reals^n \rightarrow \reals^m$ is said to have a limit
$\point{L}\in\reals^m$ at $\point{a}\in\reals^n$ if $\forall
\epsilon
> 0 \exists \delta > 0$ such that
$$0 < ||\point{x} - \point{a}|| < \delta \Longrightarrow ||f(\point{x}) - \point{L}|| <
\epsilon.$$In such a case we write,
$$\lim _{\point{x}\rightarrow \point{a}} f(\point{x}) = \point{L}.$$
\end{df}
The notions of infinite limits, limits at infinity, and continuity
at a point, are analogously defined. Limits in more than one
dimension are perhaps trickier to find, as one must approach the
test point from infinitely many directions.
\begin{exa}\label{exa:limits_1} Find $\dis{\lim_{(x, y)\rightarrow (0,0)}\dfrac{x^2y}{x^2 + y^2}}$. \end{exa}
\begin{solu} We use the sandwich theorem. Observe that $ 0 \leq x^2 \leq
x^2 + y^2$, and so $0 \leq \dfrac{x^2}{x^2 + y^2}\leq 1$. Thus
$$ \lim_{(x, y)\rightarrow (0,0)} 0
\leq  \lim_{(x, y)\rightarrow (0,0)} \left|\dfrac{x^2y}{x^2 +
y^2}\right|\leq
 \lim_{(x, y)\rightarrow (0,0)}|y|,$$ and hence
 $$\lim_{(x, y)\rightarrow (0,0)} \dfrac{x^2y}{x^2 + y^2} = 0.$$
 The Maple\TM
commands to graph this surface and find this limits appear below.
Notice that Maple is unable to find the limit and so returns
unevaluated.
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):}{}
\mapleinline{active}{1d}{plot3d(x^2*y/(x^2+y^2),x=-10..10,y=-10..10,axes=boxed,color=x^2+y^2);}{}
\mapleinline{active}{1d}{limit(x^2*y/(x^2+y^2),{x=0,y=0}); }{}
\end{mapleinput}
\end{maplegroup}
 \end{solu}







\begin{figure}[htpb]
\begin{minipage}{8cm}
\centering \psset{unit=1pc} \psset{lightsrc=30 30 25}
%\psSurface[ngrid=0.4 0.4,algebraic,axesboxed,Zmin=-2,Zmax=10,QZ=4,
%linewidth=0.25\pslinewidth,  fcol=0 1 4225  {/iF ED iF [iF 4225 div
%0.75 1] (sethsbcolor) astr2str} for](-13,-13)(13,13){%
% 10*sin(sqrt((x^2+y^2)))/(sqrt(x^2+y^2)) }
\includegraphics[width=8cm]{limits_1}
\vspace*{1cm}\footnotesize\hangcaption{$(x,y)\mapsto
\dfrac{x^2y}{x^2+y^2}$.}\label{fig:limits_1}
\end{minipage}\hfill
\begin{minipage}{8cm}
\centering
\includegraphics[width=8cm]{limits_2}
\vspace*{1cm}\footnotesize\hangcaption{$(x,y)\mapsto \dfrac{x^5y^3}{x^6+y^4}$.}\label{fig:limits_2}
\end{minipage}\hfill
\end{figure}
\begin{figure}[htpb]
\begin{minipage}{8cm}
\includegraphics[width=8cm]{limits_3}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:limits_3}.}\label{fig:limits_3}
\end{minipage}\hfill
\begin{minipage}{8cm}
\includegraphics[width=8cm]{limits_4}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:limits_4}.}\label{fig:limits_4}
\end{minipage}
\end{figure}


\begin{exa}\label{exa:limits_2} Find $\dis{\lim_{(x, y)\rightarrow (0,0)}\dfrac{x^5y^3}{x^6 + y^4}}$. \end{exa}
\begin{solu}  Either $|x| \leq |y|$ or $|x| \geq |y|$. Observe that if $|x| \leq |y|,$ then
$$\left|\dfrac{x^5y^3}{x^6 + y^4}\right| \leq \dfrac{y^8}{y^4} =
y^4.$$If $|y| \leq |x| ,$ then
$$\left|\dfrac{x^5y^3}{x^6 + y^4}\right| \leq \dfrac{x^8}{x^6} =
x^2.$$Thus
$$\left|\dfrac{x^5y^3}{x^6 + y^4}\right| \leq \max(y^4, x^2) \leq y^4 + x^2 \longrightarrow 0,$$
as $(x, y)\rightarrow (0,0).$ \\
{\em Aliter:} Let $X = x^3, Y = y^2$.
$$\left|\dfrac{x^5y^3}{x^6 + y^4}\right| = \dfrac{X^{5/3}Y^{3/2}}{X^2 +
Y^2}.$$Passing to polar coordinates $X = \rho\cos\theta, Y =
\rho\sin\theta$, we obtain
$$\left|\dfrac{x^5y^3}{x^6 + y^4}\right| = \dfrac{X^{5/3}Y^{3/2}}{X^2 +
Y^2} = \rho ^{5/3 + 3/2 - 2}|\cos\theta|^{5/3}|\sin\theta|^{3/2}
\leq \rho^{7/6} \rightarrow 0,$$as $(x, y)\rightarrow (0,0).$
\end{solu}

\begin{exa}\label{exa:limits_3} Find $\dis{\lim_{(x, y)\rightarrow (0,0)}\dfrac{1 + x + y}{x^2 - y^2}}$. \end{exa}
\begin{solu} When $y = 0$,
$$\dfrac{1 + x}{x^2} \rightarrow +\infty,$$as $x\rightarrow 0$.
When $x = 0$,
$$\dfrac{1 + y}{-y^2} \rightarrow -\infty,$$as $y\rightarrow 0$.
The limit does not exist.
\end{solu}
\begin{exa}\label{exa:limits_4} Find $\dis{\lim_{(x, y)\rightarrow (0,0)}\dfrac{xy^6}{x^6 + y^8}}$. \end{exa}
\begin{solu} Putting $x = t^4, y = t^3$, we find
$$\dfrac{xy^6}{x^6 + y^8} = \dfrac{1}{2t^2} \rightarrow +\infty,$$as
$t \rightarrow 0.$ But when $y = 0$, the function is $0$. Thus the
limit does not exist. \end{solu}

\begin{figure}[htpb]
\begin{minipage}{8cm}
\includegraphics[width=8cm]{limits_5}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:limits_5}.}\label{fig:limits_5}
\end{minipage}\hfill
\begin{minipage}{8cm}
\includegraphics[width=8cm]{limits_6}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:limits_6}.}\label{fig:limits_6}
\end{minipage}\hfill
\begin{minipage}{8cm}
\includegraphics[width=8cm]{limits_7}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:limits_7}.}\label{fig:limits_7}
\end{minipage}\hfill
\begin{minipage}{8cm}
\includegraphics[width=8cm]{limits_4}
\vspace*{1cm}\footnotesize\hangcaption{Example
\ref{exa:limits_4}.}\label{fig:limits_4}
\end{minipage}
\end{figure}


\begin{exa}\label{exa:limits_5} Find $\dis{\lim_{(x, y)\rightarrow (0,0)}\dfrac{((x - 1)^2 + y^2)\log_e ((x - 1)^2 + y^2)}{|x| +
|y|}}$.
\end{exa}\begin{solu}  When $y = 0$ we have
$$\dfrac{2(x - 1)^2\ln(|1 - x|)}{|x|} \sim -\dfrac{2x}{|x|},$$and so
the function does not have a limit at $(0,0)$.
\end{solu}
\begin{exa}\label{exa:limits_6} Find $\dis{\lim_{(x, y)\rightarrow
(0,0)}\dfrac{\sin (x^4) + \sin (y^4)}{\sqrt{x^4 + y^4}}}$.
\end{exa}\begin{solu}  $\sin (x^4) + \sin (y^4) \leq x^4 + y^4$ and so
$$\left|\dfrac{\sin (x^4) + \sin (y^4)}{\sqrt{x^4 + y^4}}\right| \leq \sqrt{x^4 + y^4} \rightarrow
0,$$as $(x, y)\rightarrow (0,0)$. \end{solu}
\begin{exa}\label{exa:limits_7} Find $\dis{\lim_{(x, y)\rightarrow (0,0)}\dfrac{\sin x - y}{x - \sin y}}$. \end{exa}
\begin{solu}  When $y = 0$ we obtain
$$\dfrac{\sin x}{x} \rightarrow 1,$$as $x \rightarrow 0.$ When $y =
x$ the function is identically $-1$. Thus the limit does not exist.
\end{solu}


\bigskip

If $f:\reals^2\to \reals$, it may be that the limits
$$ \lim _{y\to y_0}\left(\lim _{x\to x_0}f(x, y)\right), \qquad \lim _{x\to x_0}\left(\lim _{y\to y_0}f(x, y)\right), $$
both exist. These are called the {\em iterated limits of $f$ as
$(x,y)\to (x_0,y_0)$}. The following possibilities might occur.
\begin{enumerate}
\item If $\lim _{(x,y)\to (x_0,y_0)} f(x,y)$ exists, then each of
the iterated limits $\lim _{y\to y_0}\left(\lim _{x\to x_0}f(x,
y)\right)$ and $\lim _{x\to x_0}\left(\lim _{y\to y_0}f(x,
y)\right)$ exists.
\item If the iterated limits exist and $\lim _{y\to y_0}\left(\lim _{x\to x_0}f(x, y)\right)\neq  \lim _{x\to x_0}\left(\lim _{y\to y_0}f(x, y)\right)$
then $\lim _{(x,y)\to (x_0,y_0)} f(x,y)$ does not exist.
\item It may occur that $\lim _{y\to y_0}\left(\lim _{x\to x_0}f(x, y)\right)=  \lim _{x\to x_0}\left(\lim _{y\to y_0}f(x,
y)\right)$, but that $\lim _{(x,y)\to (x_0,y_0)} f(x,y)$ does not
exist.
\item It may occur that  $\lim _{(x,y)\to (x_0,y_0)} f(x,y)$
exists, but one of the iterated limits does not.
\end{enumerate}

\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Sketch the domain of definition of $(x,y)\mapsto \sqrt{4-x^2-y^2}$.
\end{pro}
\begin{pro}
Sketch the domain of definition of $(x,y)\mapsto \log (x+y)$.
\end{pro}
\begin{pro}
Sketch the domain of definition of $(x,y)\mapsto
\dfrac{1}{x^2+y^2}$.
\end{pro}

\begin{pro}
Find $\lim _{(x,y)\to (0,0)} (x^2+y^2)\sin \dfrac{1}{xy}$.
\begin{answer} $0$ \end{answer}
\end{pro}
\begin{pro}
Find $\lim _{(x,y)\to (0,2)} \dfrac{\sin xy}{x}$.
\begin{answer} $2$ \end{answer}
\end{pro}
\begin{pro} For what $c$ will the function
$$ f(x,y)=\left\{\begin{array}{ll}\sqrt{1-x^2-4y^2}, & \mathrm{if}\ x^2+4y^2\leq 1, \\
c, & \mathrm{if}\ x^2+4y^2 >1\end{array}\right. $$ be continuous
everywhere on the $xy$-plane?
\begin{answer}
$c=0$.
\end{answer}
\end{pro}
\begin{pro}
Find $$\lim _{(x,y)\to (0,0)} \sqrt{x^2+y^2}\sin
\dfrac{1}{x^2+y^2}.$$
\begin{answer} $0$ \end{answer}
\end{pro}
\begin{pro}
Find $$ \lim _{(x,y)\to (+\infty,+\infty)} \dfrac{\max (|x|,
|y|)}{\sqrt{x^4+y^4}}.
$$
\end{pro}
\begin{pro}
Find $$ \lim _{(x,y)\to (0,0} \dfrac{2x^2\sin y^2 +
y^4e^{-|x|}}{\sqrt{x^2+y^2}}.
$$
\end{pro}
\begin{pro}
Demonstrate that $$ \lim _{(x,y,z)\to (0,0,0)}
\dfrac{x^2y^2z^2}{x^2+y^2+z^2}=0. $$
\begin{answer}
By AM-GM, $$\dfrac{x^2y^2z^2}{x^2+y^2+z^2} \leq
\dfrac{(x^2+y^2+z^2)^3}{27(x^2+y^2+z^2)} =
\dfrac{(x^2+y^2+z^2)^2}{27}\to 0$$ as $(x,y,z)\to (0,0,0)$.
\end{answer}
\end{pro}
\begin{pro}
Prove that $$\lim _{x\to 0}\left(\lim _{y\to 0}
\dfrac{x-y}{x+y}\right) = 1 =-\lim _{y\to 0}\left(\lim _{x\to 0}
\dfrac{x-y}{x+y}\right).
$$Does $\lim _{(x,y)\to (0,0)} \dfrac{x-y}{x+y}$ exist?.
\end{pro}
\begin{pro}
Let $$ f(x,y)=\left\{\begin{array}{ll} x\sin \dfrac{1}{x}+y\sin
\dfrac{1}{y} & \mathrm{if}\ x\neq 0, \ y\neq 0 \\
0 & \mathrm{otherwise}\end{array}\right.
$$Prove that $\lim _{(x,y)\to (0,0)} f(x,y)$ exists, but that the
iterated limits $\lim _{x\to 0}\left(\lim _{y\to 0} f(x,y)\right)$
and $\lim _{y\to 0}\left(\lim _{x\to 0} f(x,y)\right)$ do not exist.
\end{pro}


\begin{pro}
Prove that $$\lim _{x\to 0}\left(\lim _{y\to 0}
\dfrac{x^2y^2}{x^2y^2+(x-y)^2}\right) = 0,$$ and that $$\lim _{y\to
0}\left(\lim _{x\to 0} \dfrac{x^2y^2}{x^2y^2+(x-y)^2}\right)=0,
$$but still  $\lim _{(x,y)\to (0,0)} \dfrac{x^2y^2}{x^2y^2+(x-y)^2}$ does not exist.
\end{pro}

\end{multicols}

\section{Definition of the Derivative}
Before we begin, let us introduce some necessary notation. Let
$f:\reals\rightarrow \reals$ be a function. We write
$f(h)=\smallosans{h}$ if $f(h)$ goes faster to $0$ than $h$, that
is, if $\lim _{h\to 0} \dfrac{f(h)}{h}=0$. For example, $h^3+2h^2 =
\smallosans{h}$, since
$$\lim _{h\to 0}\dfrac{h^3+2h^2}{h} = \lim_{h\to 0} h^2+2h=0.$$

\bigskip

We now define the derivative in the multidimensional space
$\reals^n$. Recall that in one variable, a function $g:\reals
\rightarrow \reals$ is said to be differentiable at $x = a$ if the
limit
$$\lim_{x \rightarrow a} \dfrac{g(x) - g(a)}{x - a} =
g'(a)$$exists.  The limit condition above is equivalent to saying
that
$$\lim_{x \rightarrow a} \dfrac{g(x) - g(a) - g'(a)(x - a)}{x - a} =
0,$$ or equivalently,
$$\lim_{h \rightarrow 0} \dfrac{g(a + h) - g(a) - g'(a)(h)}{h} =
0.$$  We may write this as
$$g(a + h) - g(a) = g'(a)(h) + \smallosans{h}.$$
The above analysis provides an analogue definition for the
higher-dimensional case. Observe that since we may not divide by
vectors, the corresponding definition in higher dimensions
involves quotients of norms.
\begin{df}
Let $A\subseteq \reals^n$. A function $f:A \rightarrow \reals^m$ is
said to be {\em differentiable} at $\point{a}\in A$ if there is a
linear transformation, called the {\em derivative of $f$ at
$\point{a}$}, $\deriv{a}{f}:\reals^n \rightarrow \reals^m$ such that
$$\lim _{\point{x}\rightarrow\point{a}} \dfrac{||f(\point{x}) - f(\point{a}) - \deriv{a}{f}(\point{x} - \point{a})||}
{||\point{x} - \point{a}||} = 0.$$Equivalently, $f$ is
differentiable at $\point{a}$ if there is a linear transformation
$\deriv{a}{f}$ such that
$$ f(\point{a} + \point{h}) - f(\point{a})=  \deriv{a}{f}(\point{h}) + \smallosans{\norm{\point{h}}},$$
as $\point{h} \rightarrow \point{0}$.
 \label{df:deriv}\end{df}
\begin{rem}
The condition for differentiability at $\point{a}$ is equivalent to
$$ f(\point{x}) - f(\point{a})=  \deriv{a}{f}(\point{x} - \point{a}) + \smallosans{||\point{x} -
\point{a}||},$$as $\point{x} \rightarrow \point{a}$.
\end{rem}
\begin{thm}
If $A$ is an open set in definition \ref{df:deriv}, $\deriv{a}{f}$
is uniquely determined.
\end{thm}
\begin{pf}
Let $L:\reals^n \rightarrow \reals^m$ be another linear
transformation satisfying definition \ref{df:deriv}. We must prove
that $\forall \point{v}\in\reals^n,  L(\point{v}) =
\deriv{a}{f}(\point{v})$.
 Since $A$ is open, $\point{a} + \point{h}\in A$ for
sufficiently small $\norm{\point{h}}$. By definition, as $\point{h}
\rightarrow \point{0}$, we have
$$ f(\point{a} + \point{h}) - f(\point{a})= \deriv{a}{f}(\point{h}) + \smallosans{\norm{\point{h}}}.$$
and
$$ f(\point{a} + \point{h}) - f(\point{a})=  L(\point{h}) + \smallosans{\norm{\point{h}}}.$$
Now, observe that
$$\deriv{a}{f}(\point{v}) - L(\point{v}) =
\deriv{a}{f}(\point{h}) - f(\point{a} + \point{h}) + f(\point{a})+
f(\point{a} + \point{h}) - f(\point{a})- L(\point{h}) .$$ By the
triangle inequality,
$$\begin{array}{lll}
||\deriv{a}{f}(\point{v}) - L(\point{v})|| & \leq &
||\deriv{a}{f}(\point{h}) - f(\point{a} + \point{h}) +
f(\point{a})||
\\ & & \qquad + ||f(\point{a} + \point{h}) - f(\point{a})-
L(\point{h}) || \\
& = & \smallosans{\norm{\point{h}}} + \smallosans{\norm{\point{h}}} \\
& = & \smallosans{\norm{\point{h}}}, \\
\end{array}$$as $\point{h} \rightarrow \point{0}$
This means that
$$||L(\point{v}) - \deriv{a}{f}(\point{v})|| \rightarrow
0,$$i.e., $L(\point{v}) = \deriv{a}{f}(\point{v})$, completing the
proof.
\end{pf}
\begin{rem}
If $A = \{\point{a}\}$, a singleton, then $\deriv{a}{f}$ is not
uniquely determined. For $||\point{x} - \point{a}|| < \delta$ holds
only for $\point{x} = \point{a}$, and so $f(\point{x}) =
f(\point{a})$. Any linear transformation $T$ will satisfy the
definition, as $T(\point{x} - \point{a}) = T(\point{0}) =
\point{0}$, and
$$||f(\point{x}) - f(\point{a})- T(\point{x} - \point{a}) || = ||\point{0}|| = 0,$$
identically.
\end{rem}
\begin{exa}
If $L:\reals^n \rightarrow \reals^m$ is a linear transformation,
then $\deriv{a}{L} = L,$ for any $\point{a} \in \reals^n$.
\label{exa:derivlintran}\end{exa}\begin{solu} Since $\reals^n$ is an
open set, we know that $\deriv{a}{L}$ uniquely determined. Thus if
$L$ satisfies definition \ref{df:deriv}, then the claim is
established. But by linearity
$$||L(\point{x}) - L(\point{a}) - L(\point{x} - \point{a}) || = ||L(\point{x}) - L(\point{a}) - L(\point{x}) + L(\point{a}) ||
= \norm{0} = 0, $$whence the claim follows.
\end{solu}

\begin{exa}
Let $$\fun{f}{(\vector{x},
\vector{y})}{\vector{x}\bp\vector{y}}{\reals^3 \times
\reals^3}{\reals}$$ be the usual dot product in $\reals^3$. Shew
that $f$ is differentiable and that $${\mathscr   D}_{(\vector{x},
\vector{y})}f(\vector{h}, \vector{k}) = \vector{x}\bp\vector{k} +
\vector{h}\bp\vector{y}.$$
\end{exa}
\begin{solu} We have
$$\begin{array}{lll}
f(\vector{x}+\vector{h}, \vector{y}+\vector{k}) - f(\vector{x},
\vector{y}) & = & (\vector{x} + \vector{h})\bp (\vector{y} +
\vector{k}) -
\vector{x}\bp\vector{y} \\
& = & \vector{x}\bp\vector{y} + \vector{x}\bp\vector{k} +
\vector{h}\bp\vector{y} +
\vector{h}\bp\vector{k} - \vector{x}\bp\vector{y} \\
& = &  \vector{x}\bp\vector{k} + \vector{h}\bp\vector{y} + \vector{h}\bp\vector{k}. \\
\end{array}$$As $(\vector{h}, \vector{k}) \rightarrow (\vector{0},
\vector{0})$, we have by the Cauchy-Buniakovskii-Schwarz inequality,
$|\vector{h}\bp\vector{k}| \leq \norm{\vector{h}}\norm{\vector{k}} =
\smallosans{\norm{\vector{h}}}$, which proves the assertion.
\end{solu}
        Just like in the one variable case, differentiability at a
point, implies continuity at that point.
\begin{thm}
Suppose $A\subseteq \reals^n$ is open and $f:A \rightarrow \reals^n$
is differentiable on $A$. Then $f$ is continuous on $A$.
\end{thm}
\begin{pf}
Given $\point{a}\in A$, we must shew that
$$ \lim_{\point{x} \rightarrow \point{a}} f(\point{x}) =
f(\point{a}).$$ Since $f$ is differentiable at $\point{a}$ we have
$$ f(\point{x}) - f(\point{a})= \deriv{a}{f}(\point{x} - \point{a}) + \smallosans{||\point{x} -
\point{a}||},$$and so
$$f(\point{x}) - f(\point{a})\rightarrow \point{0},$$as $\point{x} \rightarrow
\point{a},$ proving the theorem.
\end{pf}

\bigskip

\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Let $L:\reals^3 \rightarrow \reals^3$ be a linear transformation
and
$$\fun{F}{\vector{x}}{\vector{x}\cross
L(\vector{x})}{\reals^3}{\reals^3}.$$ Shew that $F$ is
differentiable and that $$\deriv{x}{F}(\vector{h}) =
\vector{x}\cross L(\vector{h}) + \vector{h}\cross L(\vector{x}).$$
\begin{answer} We have
$$\renewcommand{\arraystretch}{1.7}
{\everymath{\displaystyle}\begin{array}{lll} F(\vector{x} +
\vector{h})
- F(\vector{x}) & = & (\vector{x} + \vector{h})\cross L(\vector{x} + \vector{h}) - \vector{x}\cross L(\vector{x})\\
& = & (\vector{x} + \vector{h})\cross (L(\vector{x}) +
L(\vector{h})) - \vector{x}\cross L(\vector{x})\\
& = & \vector{x}\cross L(\vector{h}) + \vector{h}\cross
L(\vector{x}) + \vector{h}\cross
L(\vector{h}) \\
\end{array}}
$$\renewcommand{\arraystretch}{1}
Now, we will prove that  $|| \vector{h}\cross L(\vector{h})|| =
\smallosans{\norm{\vector{h}}}$ as $\vector{h} \rightarrow
\vector{0}$. For let $$\vector{h} = \sum_{k = 1} ^n h_k
\vector{e}_k,$$where the $\vector{e}_k$ are the standard basis for
$\reals^n$. Then
$$L(\vector{h}) = \sum_{k = 1} ^n h_k L(\vector{e}_k),$$and hence
by the triangle inequality, and by the Cauchy-Bunyakovsky-Schwarz
inequality,
$$\renewcommand{\arraystretch}{1.7}\begin{array}{ccc}||L(\vector{h})|| & \leq & \sum_{k = 1} ^n |h_k| ||L(\vector{e}_k)|| \\ &
\leq&  \left(\sum_{k = 1} ^n |h_k|^2\right)^{1/2}\left(\sum_{k = 1}
^n ||L(\vector{e}_k)||^2\right)^{1/2} \\ &  = &
\norm{\vector{h}}(\sum_{k = 1} ^n
||L(\vector{e}_k)||^2)^{1/2}, \\
\end{array}$$whence, again by the  Cauchy-Bunyakovsky-Schwarz
Inequality, $$|| \vector{h}\cross L(\vector{h})|| \leq||
\vector{h}||||L(\vector{h})|\leq
||\vector{h}||^2|||L(\vector{e}_k)||^2)^{1/2} =
\smallosans{||\vector{h}||},$$ as it was to be shewn.
\end{answer}
\end{pro}
\begin{pro}
Let $f: \reals^n \rightarrow \reals, n \geq 1, f(\vector{x}) =
\norm{\vector{x}}$ be the usual norm in $\reals^n$, with
$\norm{\vector{x}}^2 = \vector{x}\bp\vector{x}$.  Prove that
$$\deriv{x}{f}(\vector{v}) = \dfrac{\vector{x}\bp\vector{v}}{\norm{\vector{x}}},  $$
for $\vector{x} \neq \vector{0},$ but that $f$ is not differentiable
at $\vector{0}$. \begin{answer} Assume that $\vector{x} \neq
\vector{0}.$ We use the fact that $(1 + t)^{1/2} = 1 + \dfrac{t}{2}
+ \smallosans{t}$ as $t \rightarrow 0$. We have
$$\renewcommand{\arraystretch}{1.7}
{\everymath{\displaystyle}\begin{array}{lll} f(\vector{x} +
\vector{h}) - f(\vector{x}) & = & ||\vector{x}+\vector{h}|| - \norm{\vector{x}}  \\
& = & \sqrt{(\vector{x} + \vector{h})\bp (\vector{x} + \vector{h})} - \norm{\vector{x}} \\
& = & \sqrt{\norm{\vector{x}}^2 + 2\vector{x}\bp\vector{h}+
\norm{\vector{h}}^2} - \norm{\vector{x}}
\\
& = & \dfrac{2\dotprod{x}{h}+
\norm{\vector{h}}^2}{\sqrt{\norm{\vector{x}}^2 +
2\vector{x}\bp\vector{h}+ \norm{\vector{h}}^2}  + \norm{\vector{x}}}.\\
\end{array}}$$\renewcommand{\arraystretch}{1}
As $\vector{h} \rightarrow \vector{0}$,
$$\sqrt{\norm{\vector{x}}^2 +
2\vector{x}\bp\vector{h}+ \norm{\vector{h}}^2}  + \norm{\vector{x}}
\rightarrow 2\norm{\vector{x}}.$$Since $\norm{\vector{h}}^2 =
\smallosans{\norm{\vector{h}}}$ as $\vector{h} \rightarrow
\vector{0}$, we have
$$\dfrac{2\dotprod{x}{h}+ \norm{\vector{h}}^2}{\sqrt{\norm{\vector{x}}^2 +
2\vector{x}\bp\vector{h}+ \norm{\vector{h}}^2}  + \norm{\vector{x}}}
\rightarrow \dfrac{\vector{x}\bp\vector{h}}{\norm{\vector{h}}} +
\smallosans{\norm{\vector{h}}},$$proving the first assertion.



      To prove the second assertion, assume that there is a linear
transformation $\deriv{0}{f} = L$,   $L:\reals^n \rightarrow \reals$
such that
$$||f(\vector{0} + \vector{h}) - f(\vector{0}) - L(\vector{h})|| = \smallosans{\norm{\vector{h}}},$$as $\norm{\vector{h}}\rightarrow
0$.  Recall that by theorem \ref{thm:lipschitzlin}, $L(\vector{0}) =
\vector{0}$, and so by example \ref{exa:derivlintran},
$\deriv{0}{L}(\vector{0}) = L(\vector{0}) = \vector{0}$. This
implies that $\dis{\dfrac{L(\vector{h})}{\norm{\vector{h}}}}
\rightarrow \deriv{0}{L}(\vector{0}) = \vector{0}$, as
$\norm{\vector{h}}\rightarrow 0$. Since $f(\vector{0}) = \norm{0} =
0, f(\vector{h}) = \norm{\vector{h}}$ this would imply that
$$\left|\left|\norm{\vector{h}} - L(\vector{h})\right|\right| = \smallosans{\norm{\vector{h}}},$$or
$$\left|\left| 1 -  \dfrac{L(\vector{h})}{\norm{\vector{h}}}\right|\right| = \smallosans{1}.$$
But the sinistral side $\rightarrow 1$ as $\vector{h} \rightarrow
\vector{0}$, and the dextral side $\rightarrow 0$ as $\vector{h}
\rightarrow \vector{0}$. This is a contradiction, and so, such
linear transformation $L$ does not exist at the point $\vector{0}$.
\end{answer}
\end{pro}
\end{multicols}
\section{The Jacobi Matrix}
We now establish a way which simplifies the process of finding the
derivative of a function at a given point.
\begin{df}
Let $A \subseteq \reals^n$,  $f:A \rightarrow \reals^m$, and put
$$f(\point{x}) = \colvec{f_1(x_1, x_2, \ldots, x_n) \\ f_2(x_1, x_2, \ldots, x_n) \\ \vdots \\
f_m(x_1, x_2, \ldots, x_n)}.$$ Here $f_i:\reals^n \rightarrow
\reals.$ The {\em partial derivative} $\partiald{j}{f_i}{x}$ is
defined as
$$\partiald{j}{f_i}{x} = \lim _{h \rightarrow 0} \dfrac{f_i(x_1, x_2, \ldots, x_j + h, \ldots, x_n)
- f_i(x_1, x_2, \ldots, x_j, \ldots,  x_n)}{h}, $$whenever this
limit exists.
\end{df}

To find partial derivatives with respect to the $j$-th variable,
we simply keep the other variables fixed and differentiate with
respect to the $j$-th variable.
\begin{exa}
If $f:\reals^3 \rightarrow \reals,$ and $f(x,y,z)= x + y^2 + z^3 +
3xy^2z^3$ then
$$\dfrac{\partial f}{\partial x}(x, y, z) = 1 + 3y^2z^3,$$
$$\dfrac{\partial f}{\partial y}(x, y, z) = 2y + 6xyz^3,$$
and
$$\dfrac{\partial f}{\partial z}(x, y, z) = 3z^2 + 9xy^2z^2.$$
The Maple\TM commands to find these follow.
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f:=(x,y,z)->x+y^2+z^3+3*x*y^2*z^3;}{}
\mapleinline{active}{1d}{diff(f(x,y,z),x);}{}
\mapleinline{active}{1d}{diff(f(x,y,z),y); }{}
\mapleinline{active}{1d}{diff(f(x,y,z),z); }{}
\end{mapleinput}
\end{maplegroup}


\end{exa}

Since the derivative of a function $f:\reals^n \rightarrow \reals^m$
is a linear transformation, it can be represented by aid of
matrices. The following theorem will allow us to determine the
matrix representation for  $\deriv{a}{f}$  under the standard bases
of $\reals^n$ and $\reals^m$.
\begin{thm}
Let $$f(\point{x}) = \colvec{f_1(x_1, x_2, \ldots, x_n) \\ f_2(x_1, x_2, \ldots, x_n) \\ \vdots \\
f_m(x_1, x_2, \ldots, x_n)}.$$Suppose $A\subseteq \reals^n$ is an
open set and $f:A \rightarrow \reals^m$ is differentiable. Then each
partial derivative $\partiald{j}{f_i}{x}$ exists, and the matrix
representation of $\deriv{x}{f}$ with respect to the standard bases
of $\reals^n$ and $\reals^m$ is the {\em Jacobi matrix}
$$f'(\point{x}) = \begin{bmatrix}
\partiald{1}{f_1}{x} & \partiald{2}{f_1}{x}  & \cdots & \partiald{n}{f_1}{x}  \cr
\partiald{1}{f_2}{x}  & \partiald{2}{f_2}{x} & \cdots & \partiald{n}{f_2}{x} \cr \vdots & \vdots & \vdots & \vdots \cr
\partiald{1}{f_n}{x} & \partiald{2}{f_n}{x} & \cdots & \partiald{n}{f_n}{x} \cr
\end{bmatrix}.$$
\end{thm}
\begin{pf}
Let $\vector{e}_j,  1 \leq j \leq n, $ be the standard basis for
$\reals^n$. To obtain the Jacobi matrix, we must compute
$\deriv{x}{f}(\vector{e}_j)$, which will give us the $j$-th column
of the Jacobi matrix. Let $f'(\point{x}) = (J_{ij})$, and observe
that
$$\deriv{x}{f}(\vector{e}_j) =
\begin{bmatrix} J_{1j} \cr J_{2j} \cr \vdots \cr J_{nj}   \end{bmatrix}.$$ and put $\point{y} = \point{x} +
\varepsilon\vector{e}_j, \varepsilon \in\reals$. Notice that
$${\everymath{\displaystyle}\begin{array}{l}\dfrac{||f(\point{y}) - f(\point{x}) - \deriv{x}{f}(\point{y} - \point{x})||}{||\point{y} -
\point{x}||}  \\  =
 \dfrac{||f(x_1, x_2, \ldots , x_j + h, \ldots , x_n) - f(x_1,
x_2, \ldots , x_j, \ldots , x_n) - \varepsilon
\deriv{x}{f}(\vector{e}_j)||}{|\varepsilon|}.\end{array}}$$Since
the sinistral side $\rightarrow 0$ as $\varepsilon \rightarrow 0$,
the so does the $i$-th component of the numerator, and so,
$$\dfrac{|f_i(x_1, x_2, \ldots , x_j + h, \ldots , x_n) - f_i(x_1,
x_2, \ldots , x_j, \ldots , x_n) - \varepsilon J_{ij}
|}{|\varepsilon|}\rightarrow 0.$$ This entails that
$$J_{ij} =  \lim _{\varepsilon \rightarrow 0} \dfrac{f_i(x_1, x_2, \ldots, x_j + \varepsilon, \ldots, x_n)
- f_i(x_1, x_2, \ldots, x_j, \ldots,  x_n)}{\varepsilon}     =
\partiald{j}{f_i}{x}.$$

This finishes the proof.
\end{pf}
\begin{rem}
Strictly speaking, the Jacobi matrix is not the derivative of a
function at a point. It is a matrix representation of the derivative
in the standard basis of $\reals^n$. We will abuse language,
however, and refer to $f'$ when we mean the Jacobi matrix of $f$.
\end{rem}

\begin{exa}
Let $f:\reals^3 \rightarrow \reals^2$ be given by
$$f(x,y) = (xy + yz, \log_e xy).$$
Compute the Jacobi matrix of $f$.
\end{exa}
\begin{solu} The Jacobi matrix is the $2\times 3$ matrix
$$f'(x,y) = \begin{bmatrix} \partialderiv{x}{f_1}(x,y) &
\partialderiv{y}{f_1}(x,y) & \partialderiv{z}{f_1}(x,y) \cr
\partialderiv{x}{f_2}(x,y) & \partialderiv{y}{f_2}(x,y) &
\partialderiv{z}{f_2}(x,y) \cr \end{bmatrix} = \begin{bmatrix} y
& x + z & y \cr \dfrac{1}{x} & \dfrac{1}{y} & 0\cr
 \end{bmatrix}.$$
\end{solu}
\begin{exa}
Let $f(\rho, \theta, z)    = (\rho\cos\theta, \rho\sin\theta, z)$ be
the function which changes from cylindrical coordinates to Cartesian
coordinates. We have
$$f'(\rho, \theta, z) = \begin{bmatrix} \cos\theta
& -\rho\sin\theta & 0 \cr \sin\theta & \rho\cos\theta & 0 \cr 0 &
0 & 1 \cr
\end{bmatrix}.$$
\label{exa:jacobicylindrical}\end{exa}
\begin{exa}
Let $f(\rho, \phi, \theta)    = (\rho\cos\theta\sin\phi,
\rho\sin\theta\sin\phi, \rho\cos\phi)$ be the function which changes
from spherical coordinates to Cartesian coordinates. We have
$$f'(\rho, \phi, \theta)  = \begin{bmatrix}
\cos\theta\sin\phi & \rho\cos\theta\cos\phi &
-\rho\sin\phi\sin\theta \cr \sin\theta\sin\phi &
\rho\sin\theta\cos\phi & \rho\cos\theta\sin\phi \cr \cos\phi &
-\rho\sin\phi & 0 \cr
\end{bmatrix}.$$
\label{exa:jacobispherical}\end{exa}






     The Jacobi matrix provides a convenient computational tool to
compute the derivative of a function at a point. Thus
differentiability at a point implies that the partial derivatives
of the function exist at the point. The converse, however, is not
true.
\begin{exa}
Let $f:\reals^2 \rightarrow \reals$ be given by
$$f(x, y) = \left\{
\begin{array}{lll} y & {\rm if} & x = 0, \\
x & {\rm if} & y = 0, \\
1 & {\rm if} & xy \neq 0. \\ \end{array}\right.$$Observe that $f$ is
not continuous at $(0, 0)$ ($f(0, 0) = 0$ but $f(x, y) = 1$ for
values arbitrarily close to $(0, 0)$), and hence, it is not
differentiable there. We have however, $\dfrac{\partial f}{\partial
x}(0,0) = \dfrac{\partial f}{\partial y}(0,0)  = 1.$ Thus even if
both partial derivatives exist at $(0, 0)$ is no guarantee that the
function will be differentiable at $(0, 0)$. You should also notice
that both partial derivatives are not continuous at $(0, 0)$.
\end{exa}
We have, however, the following.
\begin{thm}
Let $A \subseteq \reals^n$ be an open set, and let $f:\reals^n
\rightarrow \reals^m$. Put $f = \colvec{f_1\\ f_2\\ \ldots \\ f_m}$.
If each of the partial derivatives ${\mathscr  D}_{j}f_i$ exists and
is continuous on $A$, then $f$ is differentiable on $A$.
\end{thm}



The concept of {\em repeated partial derivatives} is akin to the
concept of repeated differentiation. Similarly with the concept of
implicit partial differentiation. The following examples should be
self-explanatory.

\begin{exa}
Let $f(u, v, w) = e^uv\cos w$. Determine $\dfrac{\partial ^2
}{\partial u \partial v} f(u, v, w)$ at
$(1,-1,\frac{\pi}{4})$.\end{exa}
\begin{solu}
We have $$\dfrac{\partial ^2 }{\partial u \partial v} (e^uv\cos w) =
\dfrac{\partial}{\partial u } (e^u\cos w) = e^u\cos w,
$$which is $\dfrac{e\sqrt{2}}{2}$ at the desired point.
\end{solu}
\begin{exa} The equation $z^{xy} + (xy)^z + xy^2z^3 =3$ defines $z$ as an
implicit function of $x$ and $y$. Find $\dfrac{\partial z}{\partial
x}$ and $\dfrac{\partial z}{\partial y}$ at $(1,1,1)$. \end{exa}
\begin{solu}
We have
$$\begin{array}{lll} \dfrac{\partial }{\partial x} z^{xy}   & =  &  \dfrac{\partial }{\partial x} e^{xy\log z} \\
& = & \left(y\log z + \dfrac{xy}{z}\dfrac{\partial z}{\partial
x}\right)z^{xy},
\end{array}  $$
$$\begin{array}{lll} \dfrac{\partial }{\partial x} (xy)^z   & =  &  \dfrac{\partial }{\partial x} e^{z\log xy} \\
& = & \left(\dfrac{\partial z}{\partial x} \log xy +
\dfrac{z}{x}\right)(xy)^z,
\end{array}  $$
$$\begin{array}{lll} \dfrac{\partial }{\partial x} xy^2z^3   & =  &  y^2z^3 + 3xy^2z^2\dfrac{\partial z}{\partial
x},\\
\end{array}  $$
Hence, at $(1,1,1)$ we have
$$\dfrac{\partial z}{\partial x} + 1 + 1 +3\dfrac{\partial z}{\partial x} = 0 \implies \dfrac{\partial z}{\partial x} = -\dfrac{1}{2}.
 $$
Similarly,
$$\begin{array}{lll} \dfrac{\partial }{\partial y} z^{xy}   & =  &  \dfrac{\partial }{\partial y} e^{xy\log z} \\
& = & \left(x\log z + \dfrac{xy}{z}\dfrac{\partial z}{\partial
y}\right)z^{xy},
\end{array}  $$
$$\begin{array}{lll} \dfrac{\partial }{\partial y} (xy)^z   & =  &  \dfrac{\partial }{\partial y} e^{z\log xy} \\
& = & \left(\dfrac{\partial z}{\partial y} \log xy +
\dfrac{z}{y}\right)(xy)^z,
\end{array}  $$
$$\begin{array}{lll} \dfrac{\partial }{\partial y} xy^2z^3   & =  &  2xyz^3 + 3xy^2z^2\dfrac{\partial z}{\partial
y},\\
\end{array}  $$
Hence, at $(1,1,1)$ we have
$$\dfrac{\partial z}{\partial y} + 1 + 2 +3\dfrac{\partial z}{\partial y} = 0 \implies
\dfrac{\partial z}{\partial y} = -\dfrac{3}{4}.
 $$
\end{solu}










Just like in the one-variable case, we have the following rules of
differentiation. Let $A \subseteq \reals^n, B \subseteq \reals^m$ be
open sets $f, g:A \rightarrow \reals^m, \alpha \in \reals$, be
differentiable on $A$, $h:B \rightarrow \reals^l$ be differentiable
on $B$, and $f(A) \subseteq B.$ Then we have
\begin{itemize}
\item {\bf Addition Rule:} $\deriv{x}{(f + \alpha g)} =
\deriv{x}{f} + \alpha \deriv{x}{g}$. \item {\bf Chain Rule: }
$\deriv{x}{(h \circ f)} = \left(\deriv{{\it f(}x{\it
)}}{h}\right)\circ\left(\deriv{x}{f}\right)$.
\end{itemize}
Since composition of linear mappings expressed as matrices is matrix
multiplication, the Chain Rule takes the alternative form when
applied to the Jacobi matrix. \begin{eqnarray} (h\circ f)' =
(h'\circ f)(f'). \label{eqn:chainrulejacobi}
\end{eqnarray}
\begin{exa}
Let$$f(u,v) = \colvec{ue^v \\ u + v \\ uv },$$
$$h(x,y) = \colvec{x^2 + y \\ y + z}.$$Find $(f\circ h)'(x,y)$.
\end{exa}
\begin{solu} We have
$$f'(u,v) = \begin{bmatrix} e^v & ue^v \cr 1 & 1 \cr v & u \cr
\end{bmatrix},$$and
$$h'(x,y) = \begin{bmatrix} 2x & 1 & 0 \cr 0 & 1 & 1 \cr
\end{bmatrix}.$$Observe also  that
$$f'(h(x,y)) = \begin{bmatrix} e^{y + z} & (x^2 + y)e^{y + z} \cr 1 & 1 \cr y + z & x^2 + y \end{bmatrix}.$$


Hence
$$\renewcommand{\arraystretch}{1.7}{\everymath{\displaystyle}\begin{array}{lll}(f\circ h)'(x,y) & =  &  f'(h(x,y))h'(x,y) \\ & = &
\begin{bmatrix} e^{y + z} & (x^2 + y)e^{y + z} \cr 1 & 1 \cr y + z & x^2 + y \end{bmatrix} \begin{bmatrix} 2x & 1 & 0 \cr 0 & 1 & 1 \cr
\end{bmatrix} \\ &  = & \begin{bmatrix} 2xe^{y + z} & (1 + x^2 + y)e^{y +
z}& (x^2 + y)e^{y + z} \cr 2x & 2 & 1 \cr 2xy + 2xz & x^2 + 2y + z
& x^2 + y \cr
\end{bmatrix}. \end{array}}
\renewcommand{\arraystretch}{1}$$\end{solu}
\begin{exa}
Let $$f:\reals^2 \rightarrow \reals, \  \ \ \ f(u,v) = u^2 + e^v,$$
$$u, v:\reals^3 \rightarrow \reals \ \ \  u(x,y) = xz, \ v(x,y) = y + z.$$
Put $h(x,y) = f\colvec{u(x, y, z) \\ v(x, y, z)}$ . Find the partial
derivatives of $h$.\end{exa} \begin{solu} Put $g:\reals^3
\rightarrow \reals^2,
g(x,y) = \colvec{u(x,y) \\ v(x,y} = \colvec{xz \\
y + z}$. Observe that $h = f\circ g.$ Now,
$$ g'(x,y) = \begin{bmatrix} z & 0 & x \cr 0 & 1 & 1 \cr   \end{bmatrix},$$
$$f'(u,v) = \begin{bmatrix} 2u & e^v \cr \end{bmatrix},$$
$$f'(h(x,y)) = \begin{bmatrix} 2xz  & e^{y + z} \cr \end{bmatrix}.$$
Thus
$$\renewcommand{\arraystretch}{1.7}{\everymath{\displaystyle}
\begin{array}{lll}
\begin{bmatrix} \dfrac{\partial h}{\partial
x}(x,y)& \dfrac{\partial h}{\partial y}(x,y)& \dfrac{\partial
h}{\partial z}(x,y)\cr
\end{bmatrix} & = &
h'(x,y) \\
 &  = & (f'(g(x,y)))(g'(x,y)) \\
 & = &  \begin{bmatrix} 2xz  & e^{y + z} \cr
 \end{bmatrix}\begin{bmatrix} z & 0 & x \cr 0 & 1 & 1 \cr   \end{bmatrix}\\
 & = & \begin{bmatrix}  2xz^2 & e^{y + z} & 2x^2z + e^{y + z}      \end{bmatrix}
\end{array}}.$$
\renewcommand{\arraystretch}{1}
Equating components, we obtain
$$\dfrac{\partial h}{\partial
x}(x,y)= 2xz^2,$$
$$\dfrac{\partial h}{\partial
y}(x,y)=  e^{y + z},$$
$$\dfrac{\partial h}{\partial
z}(x,y)= 2x^2z + e^{y + z}.$$
\end{solu}


Under certain conditions we may differentiate under the integral
sign.

\begin{thm}[Differentiation under the integral sign]
Let $f\colon [a,b] \times Y \to \reals$ be a function, with $[a,b]$
being a closed interval, and $Y$ being a closed and bounded subset
of $\reals$. Suppose that both $f(x,y)$ and $\dfrac{\partial
}{\partial x}f(x,y)$ are continuous in the variables $x$ and $y$
jointly. Then $\int_Y f(x.y) \, dy$ exists as a continuously
differentiable function of $x$ on $[a,b]$, with derivative
$$
 \dfrac{\d{} }{\d{x}}\int_Y f(x, y) \, \d{y} = \int_Y \dfrac{\partial }{\partial x}
f(x,y) \, \d{y}.
$$
\end{thm}
\begin{exa}
Prove that
$$F(x) = \int _0 ^{\pi/2}\log (\sin^2\theta + x^2\cos^2\theta)\d{\theta} =\pi\log\dfrac{x+1}{2}.$$
\end{exa}
\begin{solu}
Differentiating under the integral,
$$\begin{array}{llll}F'(x)&  = &  \int _0 ^{\pi/2}\dfrac{\partial}{\partial x}\log (\sin^2\theta +
x^2\cos^2\theta)\d{\theta}\\
& = & 2x\int _0 ^{\pi/2}\dfrac{\cos^2\theta}{\sin^2\theta +
x^2\cos^2\theta}\d{\theta}
\end{array}$$.
The above implies that
$$\begin{array}{llll}\dfrac{(x^2-1)}{2x}\cdot F'(x)
& = & \int _0 ^{\pi/2}\dfrac{(x^2-1)\cos^2\theta}{\sin^2\theta +
x^2\cos^2\theta}\d{\theta}\\
& = & \int _0
^{\pi/2}\dfrac{x^2\cos^2\theta+\sin^2\theta-1}{\sin^2\theta +
x^2\cos^2\theta}\d{\theta}\\
& = & \dfrac{\pi}{2}-\int _0 ^{\pi/2}\dfrac{\d{\theta}}{\sin^2\theta
+
x^2\cos^2\theta}\\
& = & \dfrac{\pi}{2}-\int _0
^{\pi/2}\dfrac{\sec^2\theta\d{\theta}}{\tan^2\theta +
x^2}\\[1ex]
& = & \dfrac{\pi}{2}-\dfrac{1}{x}\arctan \dfrac{\tan \theta}{x}\Big|
_0 ^{\pi/2}\\[1ex]
& = & \dfrac{\pi}{2}-\dfrac{\pi}{2x},
\end{array}$$which in turn implies that for $x>0$, $x\neq 1$,
$$F'(x) =
\dfrac{2x}{x^2-1}\left(\dfrac{\pi}{2}-\dfrac{\pi}{2x}\right)=\dfrac{\pi}{x+1}.$$For
$x=1$ one sees immediately that $F'(1)=2\int_0^{\pi/2}\cos^2\theta
\d{\theta} = \dfrac{\pi}{2},$ agreeing with the formula. Now,
$$F'(x) =\dfrac{\pi}{x+1}\implies F(x)=\pi\log (x+1)+C.$$Since
$F(1)=\int_0 ^{\pi/2}\log 1\d{\theta}=0$, we gather that $C=-\pi\log
2$. Finally thus
$$ F(x)=\pi\log (x+1) -\pi\log
2 = \pi\log\dfrac{x+1}{2}.$$
\end{solu}

Under certain conditions, the interval of integration in the above
theorem need not be compact.
\begin{exa}
Given that $\int _0 ^{+\infty} \dfrac{\sin x}{x}\d{x} =
\dfrac{\pi}{2}$, compute $\int _0 ^{+\infty} \dfrac{\sin^2
x}{x^2}\d{x}$.
\end{exa}
\begin{solu}
Put $I(a)=\int _0 ^{+\infty} \dfrac{\sin^2a x}{x^2}\d{x}$, with
$a\geq 0$. Differentiating both sides with respect to $a$, and
making the substitution $u=2ax$, $$\begin{array}{lll}
I'(a)& = & \int _0 ^{+\infty} \dfrac{2x\sin ax\cos ax}{x^2}\d{x}\\
& = & \int _0 ^{+\infty} \dfrac{\sin 2ax}{x}\d{x}\\
& = & \int _0 ^{+\infty} \dfrac{\sin u}{u}\d{u}\\
& = & \dfrac{\pi}{2}.
\end{array}$$
Integrating each side gives
$$I(a)=\dfrac{\pi}{2}a+C.  $$Since $I(0)=0$, we gather that $C=0$.
The desired integral is $I(1)=\dfrac{\pi}{2}$.
\end{solu}
\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Let $f:[0;+\infty[\times ]0;+\infty[\to \reals$, $f(r,t) =
t^ne^{-r^2/4t}$, where $n$ is a constant. Determine $n$ such that
$$\dfrac{\partial f}{\partial t} = \dfrac{1}{r^2}\dfrac{\partial }{\partial r} \left(r^2\dfrac{\partial f}{\partial r} \right). $$
\end{pro}
\begin{pro}
Let
$$f:\reals^2 \to \reals, \qquad f(x,y) = \min (x, y^2).  $$Find $\dfrac{\partial f(x,y)}{\partial x}$ and $\dfrac{\partial f(x,y)}{\partial y}$.
\begin{answer}
Observe that
$$f(x,y)=\left\{\begin{array}{ll} x & \mathrm{if}\ x \leq y^2 \\   y^2 & \mathrm{if}\ x > y^2 \\ \end{array}\right. $$
Hence
$$\dfrac{\partial}{\partial x}f(x,y)=\left\{\begin{array}{ll} 1 & \mathrm{if}\ x > y^2 \\   0 & \mathrm{if}\ x > y^2 \\ \end{array}  \right. $$ and
$$\dfrac{\partial}{\partial y}f(x,y)=\left\{\begin{array}{ll} 0 & \mathrm{if}\ x > y^2 \\   2y & \mathrm{if}\ x > y^2 \\ \end{array}\right. $$
\end{answer}
\end{pro}

\begin{pro}
Let $f:\reals^2\rightarrow \reals^2$ and $g:\reals^3 \rightarrow
\reals^2$ be given by $$f(x,y) = \colvec{xy^2 \\ x^2y}, \qquad
g(x,y,z) = \colvec{x-y+2z \\ xy}.
$$
Compute $(f\circ g)'(1,0,1)$, if at all defined. If undefined,
explain.  Compute $(g\circ f)'(1,0)$, if at all defined. If
undefined, explain.
\begin{answer}
Observe that
$$g(1,0,1) = \colvec{3 \\ 0}, \qquad f'(x,y) = \begin{bmatrix} y^2 &
2xy \cr 2xy & x^2
\end{bmatrix}, \qquad g'(x,y) =\begin{bmatrix} 1 & -1 & 2  \cr y & x & 0
\cr
\end{bmatrix},  $$
and hence
$$ g'(1,0,1) = \begin{bmatrix} 1 & -1 & 2  \cr 0 & 1 & 0
\cr
\end{bmatrix},\qquad  f'(g(1,0,1)) =  f'(3,0) = \begin{bmatrix} 0  &  0  \cr 0 & 9
\cr
\end{bmatrix}. $$This gives, via the Chain-Rule,
$$(f\circ g)'(1,0,1)  = f'(g(1,0,1))g'(1,0,1) = \begin{bmatrix} 0  &  0  \cr 0 & 9
\cr
\end{bmatrix}\begin{bmatrix} 1 & -1 & 2  \cr 0 & 1 & 0
\cr
\end{bmatrix} = \begin{bmatrix} 0 & 0 & 0  \cr 0 & 9 & 0
\cr
\end{bmatrix}. $$
The composition $g\circ f$ is undefined. For, the output of $f$ is
$\reals^2$, but the input of $g$ is in $\reals^3$.

\end{answer}


\end{pro}

\begin{pro}
Let $f(x,y) = \colvec{xy \\ x+y}$ and $g(x,y) =\colvec{x-y \\ x^2y^2
\\ x+y}$ Find $(g\circ f)'(0,1)$.
\begin{answer}
Since $f(0,1) = \colvec{0\\ 1}$, the Chain Rule gives
$$(g\circ f)'(0,1) = (g'(f(0,1)))(f'(0,1)) = (g'(0,1))(f'(0,1)) =\begin{bmatrix} 1 & -1\\ 0 &
0 \\ 1 & 1 \\
\end{bmatrix}\begin{bmatrix} 1 & 0\\ 1 & 1
\end{bmatrix} = \begin{bmatrix} 0 & -1\\ 0 & 0 \\ 2 & 1 \\
\end{bmatrix}   $$

\end{answer}

\end{pro}

\begin{pro}
Suppose $g:\reals \rightarrow \reals$ is continuous and $a\in\reals$
is a constant. Find the partial derivatives with respect to $x$ and
$y$ of
$$f:\reals^2 \rightarrow \reals, \ \ f(x,y) = \int _a ^{x^2y} g(t) \ {\rm  d}t. $$

\begin{answer} We have
$$\partialderiv{x}{f}(x,y,z) = 2xyg(x^2y),$$and
$$\partialderiv{y}{f}(x,y,z) = x^2g(x^2y).$$
\end{answer}
\end{pro}
\begin{pro}
Given that $\int _0 ^b \dfrac{\d{x}}{x^2+a^2} = \dfrac{1}{a} \arctan
\dfrac{b}{a}$, evaluate $\int _0 ^b \dfrac{\d{x}}{(x^2+a^2)^2}$.
\begin{answer}Differentiating both sides with respect to the
parameter $a$, the integral is $\dfrac{1}{2a^3} \arctan
\dfrac{b}{a}+\dfrac{b}{2a^2(a^2+b^2)} $
\end{answer}
\end{pro}
\begin{pro}
Prove that  $$\int _0 ^{+\infty} \dfrac{\arctan ax - \arctan
x}{x}\d{x}=\dfrac{\pi}{2}\log \pi.$$
\end{pro}
\begin{pro}
Assuming that the equation $xy^2 + 3z = \cos z^2$ defines $z$
implicitly as a function of $x$ and $y$, find $\partialderiv{x}{z}$.
\end{pro}
\begin{pro}
If $w = e^{uv}$ and $u = r + s$, $v = rs$,
 determine $\dfrac{\partial{w}}{\partial{r}}$.
\end{pro}

\begin{pro}
 Let $z$ be an implicitly-defined function of $x$ and $y$ through the equation $(x+z)^2+(y+z)^2=8$. Find
$\dfrac{\partial z}{\partial x}$ at $(1,1,1)$.
\begin{answer}
We have
$$  \dfrac{\partial }{\partial x}(x+z)^2+\dfrac{\partial }{\partial x}(y+z)^2= \dfrac{\partial }{\partial x}8
\implies 2(1+ \dfrac{\partial z}{\partial x})(x+z) +
2\dfrac{\partial z}{\partial x}(y+z)=0.  $$ At $(1,1,1)$ the last
equation becomes
$$ 4(1+ \dfrac{\partial z}{\partial x}) +
4\dfrac{\partial z}{\partial x}=0\implies \dfrac{\partial
z}{\partial x} = -\dfrac{1}{2}.  $$
\end{answer}



\end{pro}



\end{multicols}


\section{Gradients and Directional Derivatives}
A function
$$\fun{f}{\point{x}}{f(\point{x})}{\reals^n}{\reals^m}$$is called a {\em vector field.}
If $m = 1$, it is called a {\em scalar field.}
\begin{df}
Let $$\fun{f}{\point{x}}{f(\point{x})}{\reals^n}{\reals}$$be a
scalar field. The {\em gradient} of $f$ is the vector  defined and
denoted by
$$\nabla f(\point{x})  = \colvec{\partiald{1}{f}{x} \\ \partiald{2}{f}{x} \\ \vdots \\ \partiald{n}{f}{x}}.$$
The {\em gradient operator} is the operator
$$\nabla =  \colvec{\dfrac{\partial}{\partial x_1} \\ \dfrac{\partial}{\partial x_2} \\ \vdots \\ \dfrac{\partial}{\partial x_n}}.$$
\end{df}
\begin{thm}
Let $A \subseteq \reals^n$ be open and  let $f:A \rightarrow \reals$
be a scalar field, and assume that $f$ is differentiable in $A$. Let
$K\in\reals$ be a constant. Then $\nabla f(\point{x})$ is orthogonal
to the surface implicitly defined by $f(\point{x}) = K$.
\end{thm}
\begin{pf}
Let $$\fun{\point{c}}{t}{\point{c}(t)}{\reals}{\reals^n}$$be a curve
lying on this surface. Choose $t_0$ so that $\point{c}(t_0) =
\point{x}$. Then
$$ (f\circ \point{c})(t_0) = f(\point{c}(t)) = K,$$ and using the chain rule
$$ f'(c(t_0))c'(t_0)=
0,$$which translates to
$$(\nabla f(\point{x}))\bp (\point{c}'(t_0))  = 0.$$
Since $\point{c}'(t_0)$ is tangent to the surface and its dot
product with $\nabla f(\point{x})$ is $0$, we conclude that $\nabla
f(\point{x})$ is normal to the surface.
\end{pf}
\begin{rem}
Let $\theta$ be the angle between $\nabla f(\point{x})$ and
$\point{c}'(t_0)$. Since
$$|(\nabla f(\point{x}))\bp (\point{c}'(t_0))| = ||\nabla f(\point{x})||||\point{c}'(t_0)||\cos\theta,$$
$\nabla f(\point{x})$ is the direction in which $f$ is changing the
fastest.
\end{rem}

\begin{exa}
Find a unit vector  normal to the surface $x^3 + y^3 + z = 4$ at
the point $(1, 1, 2)$.
\end{exa}
\begin{solu} Here $f(x, y, z) = x^3 + y^3 + z - 4$ has gradient
$$\nabla f(x,y,z) = \colvec{3x^2 \\ 3y^2 \\ 1}$$which at $(1, 1,
2)$ is $\colvec{3 \\ 3 \\ 1}$. Normalising this vector we obtain
$$\colvec{\dfrac{3}{\sqrt{19}} \\ \dfrac{3}{\sqrt{19}} \\ \dfrac{1}{\sqrt{19}}}.$$


\end{solu}
\begin{exa}
Find the direction of the greatest rate of increase of $f(x, y, z)
= xye^z$ at the point $(2, 1, 2)$.
\end{exa}
\begin{solu}  The direction is that of the gradient vector. Here
$$\nabla f(x,y,z) = \colvec{ye^z \\ xe^z \\ xye^z}$$which at
$(2, 1, 2)$ becomes $\colvec{e^2 \\ 2e^2 \\ 2e^2}.$ Normalising
this vector we obtain
$$\dfrac{1}{\sqrt{5}}\colvec{1 \\ 2 \\ 2}.$$
\end{solu}
\begin{exa}
Let $f:\reals^3 \rightarrow \reals$ be given by
$$f(x,y,z) = x + y^2  - z^2.$$Find the equation of
the tangent plane to $f$ at $(1, 2, 3).$
\end{exa}
\begin{solu}  A vector normal to the plane is $\nabla f(1, 2, 3)$. Now
$$\nabla f(x,y,z) = \colvec{1 \\ 2y \\ -2z}$$which is
$$\colvec{1 \\ 4 \\ -6}$$at $(1, 2, 3).$ The equation of the
tangent plane is thus
$$1(x - 1) + 4(y - 2) - 6(z - 3) = 0,$$or
$$x + 4y - 6z = -9.$$
\end{solu}
\begin{df}
Let $$\fun{f}{\point{x}}{f(\point{x})}{\reals^n}{\reals^n}$$be a
vector field with
$$f(\point{x}) = \colvec{f_1(\point{x}) \\ f_2(\point{x}) \\ \vdots \\ f_n(\point{x})}.$$
The {\em divergence} of $f$ is defined and denoted by
$$\div{f}{x} = \nabla\bp f(\point{x}) = \partiald{1}{f_1}{x}  +  \partiald{2}{f_2}{x} +  \cdots + \partiald{n}{f_n}{x}.$$
\end{df}
\begin{exa}If $f(x, y, z) = (x^2, y^2, ye^{z^2})$ then
$$\div{f}{x} = 2x + 2y + 2yze^{z^2}. $$
\end{exa}
\begin{df} Let $g_k:\reals^n \rightarrow \reals^n$, $1 \leq k \leq n -
2$ be vector fields with  $g_i = (g_{i1}, g_{i2}, \ldots ,
g_{in}).$ Then the {\em curl} of $(g_1, g_2, \ldots, g_{n - 2})$
$$\curl{(g_1, g_2, \ldots, g_{n - 2})}{x}
= \det\begin{bmatrix} \point{e}_1 &  \point{e}_2 &  \cdots &
\point{e}_{n}  \cr \partialderiv{x_1}{}&  \partialderiv{x_2}{} &
\cdots  &  \partialderiv{x_n}{} \cr g_{11}(\point{x}) &
g_{12}(\point{x}) & \cdots & g_{1n}(\point{x}) \cr g_{21}(\point{x})
& g_{22}(\point{x}) & \ldots & g_{2n}(\point{x}) \cr \vdots & \vdots
& \vdots & \vdots \cr g_{(n - 2)1}(\point{x}) & g_{(n -
2)2}(\point{x}) & \ldots & g_{(n - 2)n}(\point{x}) \cr
\end{bmatrix}.$$
\end{df}
\begin{exa}If $f(x, y, z) = (x^2, y^2, ye^{z^2})$ then
$$\curl{f}{(x,y,z)} =\nabla \cross f(x,y,z)= (e^{z^2})\point{i}.
$$
\end{exa}
\begin{exa}If $f(x, y, z, w) = (e^{xyz}, 0, 0, w^2), g(x, y, z, w) = (0, 0, z, 0)$ then
$${\rm curl} (f, g)(x,y,z,w) = \det \begin{bmatrix}
\point{e}_1 & \point{e}_2 & \point{e}_3 & \point{e}_4 \cr
\partialderiv{x_1}{} &  \partialderiv{x_2}{} &  \partialderiv{x_3}{}  &
 \partialderiv{x_4}{} \cr e^{xyz} & 0 & 0 & w^2 \cr 0 & 0 & z & 0
\end{bmatrix} = (xz^2e^{xyz})\point{e}_4.
$$
\end{exa}



\begin{df}
Let $A \subseteq \reals^n$ be open and  let $f:A \rightarrow \reals$
be a scalar field, and assume that $f$ is differentiable in $A$. Let
$\vector{v}\in \reals^n \setminus \{\point{0}\}$ be such that
$\point{x} + t\vector{v} \in A$ for sufficiently small $t\in
\reals$. Then the {\em directional derivative of $f$ in the
direction of $\vector{v}$ at the point $\point{x}$} is defined and
denoted by

$$\mathscr{D}_{\vector{v}}f(\point{x}) = \lim _{t\rightarrow 0} \dfrac{f(\point{x} + t\vector{v}) - f(\point{x})}{t}. $$

\label{df:directionalderiv}\end{df}
\begin{rem}
Some authors require that the vector $\vector{v}$ in definition
\ref{df:directionalderiv} be a unit vector.
\end{rem}
\begin{thm}
Let $A \subseteq \reals^n$ be open and  let $f:A \rightarrow \reals$
be a scalar field, and assume that $f$ is differentiable in $A$. Let
$\vector{v}\in \reals^n \setminus \{\vector{0}\}$ be such that
$\vector{x} + t\vector{v} \in A$ for sufficiently small $t\in
\reals$. Then the {\em directional derivative of $f$ in the
direction of $\vector{v}$ at the point $\vector{x}$} is given by
$$\nabla f(\point{x}) \bp \vector{v}.$$
\end{thm}
\begin{exa}
Find the directional derivative of $f(x, y, z) = x^3 + y^3 - z^2$ in
the direction of $\colvec{1 \\ 2 \\ 3}$.
\end{exa}
\begin{solu} We have
$$\nabla f(x,y,z) = \colvec{3x^2 \\ 3y^2 \\ -2z}$$and so
$$ \nabla f(x,y,z)\bp \vector{v} = 3x^2 + 6y^2 - 6z. $$
\end{solu}
\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
Let $f(x,y,z)=xe^{yz}$. Find $$(\nabla f)(2,1,1).$$
\begin{answer}
$\nabla f(x,y,z)=\colvec{e^{yz} \\ xze^{yz}\\ xye^{yz}}\implies
(\nabla f)(2,1,1) =  \colvec{e\\ 2e\\ 2e} $.
\end{answer}
\end{pro}

\begin{pro}
Let $f(x,y,z)=\colvec{xz\\ e^{xy} \\ z}$. Find $$(\nabla \cross
f)(2,1,1).$$

\begin{answer}
$(\nabla \cross f)(x,y,z)=\colvec{0\\ x\\  ye^{xy}} \implies (\nabla
\cross f)(2,1,1)=\colvec{0\\ 2 \\ e^2}$.
\end{answer}
\end{pro}


\begin{pro}
Find the tangent plane to the surface  $\dfrac{x^2}{2}-y^2-z^2=0$ at
the point  $(2,-1,1)$.
\end{pro}
\begin{pro}
Find the point on the surface $$x^2+y^2-5xy+xz-yz=-3$$ for which the
tangent plane is $x-7y=-6$.
\begin{answer}
 The vector $\colvec{1 \\ -7 \\ 0}$ is perpendicular to the plane. Put $f(x,y,z)=x^2+y^2-5xy+xz-yz+3$. Then $(\nabla f)(x,y,z)=\colvec{2x-5y+z \\ 2y-5x-z \\
x-y}$. Observe that $\nabla f(x,y,z)$ is parallel to the vector
$\colvec{1 \\ -7 \\ 0}$, and hence there exists a constant $a$ such
that $$ \colvec{2x-5y+z \\ 2y-5x-z \\
x-y}=a\colvec{1 \\ -7 \\ 0} \implies x=a, \quad y=a, \quad z=4a.$$
Since the point is on the plane $$x-7y=-6 \implies a-7a=-6 \implies
a=1.$$ Thus $x=y=1$ and $z=4$.
\end{answer}
\end{pro}

\begin{pro}
Find a vector pointing in the direction in which $f(x,y,z) = 3xy
-9xz^2+y$ increases most rapidly at the point $(1, 1, 0)$.
\end{pro}
\begin{pro}
Let  $\mathscr{D}_{\vector{u}}f(x,y)$ denote the directional
derivative of $f$ at $(x,y)$ in the direction of the unit vector
 $\vector{u}$. If $\nabla f(1,2) = 2\vector{i} - \vector{j}$, find
$\mathscr{D}_{(\frac{3}{5},\frac{4}{5})}f(1,2)$.
\end{pro}
\begin{pro}
Use a linear approximation of the function $f(x, y) = e^{x\cos 2y}$
at (0, 0) to estimate $f(0.1, –0.2)$.
\begin{answer}
Observe that $$f(0,0) =1, \quad f_x(x,y) = (\cos 2y)e^{x\cos 2y}
\implies f_x(0,0)=1, $$ $$ f_y(x,y) = -2x\sin 2ye^{x\cos 2y}
\implies f_y(0,0) = 0.
$$Hence
$$f(x,y) \approx f(0,0) + f_x(0,0)(x-0) + f_y(0,0)(y-0) \implies f(x,y)\approx 1 + x. $$
This gives $f(0.1,-0.2)\approx 1+0.1 = 1.1$.
\end{answer}
\end{pro}

\begin{pro}
Prove that
$$ \nabla \bullet (\point{u}\cross \point{v}) = \point{v}\bullet ({\nabla}\cross \point{u}) - \point{u}\bullet ({\nabla}\cross \point{v}). $$
\begin{answer}
This is essentially the product rule: $\d{uv} = u\d{v}+v\d{u}$,
where $\nabla$ acts the differential operator and $\cross$ is the
product. Recall that when we defined the volume of a parallelepiped
spanned by the vectors $\vector{a},$ $\vector{b}$, $\vector{c}$, we
saw that
$$ \vector{a}\bullet (\crossprod{b}{c}) = (\crossprod{a}{b})\bullet \vector{c}.  $$
Treating $\nabla = \nabla _{\vector{u}}+ \nabla _{\vector{v}}$ as a
vector, first keeping $\vector{v}$ constant and then keeping
$\vector{u}$ constant  we then see that
$$ \nabla _{\vector{u}} \bullet (\crossprod{u}{v})= (\crossprod{\nabla}{u})\bullet \vector{v}, \qquad   \nabla  _{\vector{v}} \bullet (\crossprod{u}{v})=  -\nabla \bullet (\crossprod{v}{u})  = -(\crossprod{\nabla}{v})\bullet \vector{u}. $$
Thus
$$\nabla \bullet (\point{u}\cross \point{v}) = (\nabla _{\vector{u}} + \nabla _{\vector{v}}) \bullet (\point{u}\cross \point{v})
= \nabla _{\vector{u}} \bullet (\crossprod{u}{v}) + \nabla
_{\vector{v}} \bullet (\crossprod{u}{v}) =
(\crossprod{\nabla}{u})\bullet \vector{v}-
(\crossprod{\nabla}{v})\bullet \vector{u}.
   $$
\end{answer}


\end{pro}
\begin{pro}
Find the point on the surface  $$2x^2+xy+y^2+4x+8y-z+14=0$$ for
which the tangent plane is  $4x+y-z=0$.
\end{pro}
\begin{pro}
Let $\phi:\reals^3\to \reals$ be a scalar field, and let $\point{U},
\point{V}:\reals^3\to \reals^3$ be vector fields. Prove that
\begin{enumerate}
\item $\nabla \bp \phi\point{V}=\phi\nabla\bp \point{V}+\point{V}\bp\nabla\phi$
\item $\nabla \cross \phi\point{V}=\phi\nabla\cross \point{V}+(\nabla\phi)\cross \point{V}$
\item $\nabla \cross (\nabla \phi)=\vector{0}$
\item $\nabla \bp (\nabla \cross \point{V})=0$
\item $\nabla (\point{U}\bp \point{V})=  (\point{U}\bp \nabla)\point{V}+(\point{V}\bp \nabla)\point{U} +\point{U}\cross (\nabla \cross\point{V})
++\point{V}\cross (\nabla \cross\point{U})$
\end{enumerate}
\end{pro}
\begin{pro}
Find the angles made by the gradient of $f(x,y)=x^{\sqrt{3}}+y$ at
the point $(1,1)$ with the coordinate axes.
\begin{answer}
An angle of $ \dfrac{\pi}{6}$ with the $x$-axis and $
\dfrac{\pi}{3}$ with the $y$-axis.
\end{answer}
\end{pro}

\end{multicols}


\section{Levi-Civitta and Einstein}
\begin{rem}
In this section, unless otherwise noted, we are dealing in the space
$\reals^3$ and so, subscripts are in the set $\{1,2,3\}$.
\end{rem}

\begin{df}[Einstein's Summation Convention]
In any expression containing subscripted variables appearing twice
(and only twice) in any term, the subscripted variables are assumed
to be summed over.
\end{df}
\begin{rem}
In order to emphasise that we are using Einstein's convention, we
will enclose any terms under consideration with \es{\cdot}.
\end{rem}
\begin{exa}
Using Einstein's Summation convention, the dot product of two
vectors $\vector{x}\in\reals^n$ and $\vector{y}\in\reals^n$ can be
written as
$$ \dotprod{x}{y} =\sum _{i=1} ^n x_iy_i = \es{x_ty_t}.$$
\end{exa}
\begin{exa}
Given that $a_i, b_j, c_k, d_l$ are the components of vectors in
$\reals^3$, $\vector{a}, \vector{b},  \vector{c}, \vector{d}$
respectively, what is the meaning of $$\es{a_ib_ic_kd_k} ?
$$
\end{exa}
\begin{solu}
We have
$$\es{a_ib_ic_kd_k}  = \sum _{i=1} ^3 a_ib_i\es{c_kd_k} = \dotprod{a}{b}\es{c_kd_k} = \dotprod{a}{b}\sum _{k=1} ^3 c_kd_k = (\dotprod{a}{b})(\dotprod{c}{d}).  $$
\end{solu}

\begin{exa}
Using Einstein's Summation convention, the  $ij$-th entry
$(AB)_{ij}$ of the product of two matrices $A\in\mat{m\times
n}{\reals}$ and $B\in\mat{n\times r}{\reals}$ can be written as
$$ (AB)_{ij} = \sum _{k=1} ^n A_{ik}B_{kj}=    \es{A_{it}B_{tj}}.$$
\end{exa}
\begin{exa}
Using Einstein's Summation convention, the trace $\tr{A}$ of a
square matrix $A\in\mat{n\times n}{\reals}$  is  $\tr{A}= \sum
_{t=1} ^n A_{tt}=\es{A_{tt}}$.
\end{exa}
\begin{exa}
Demonstrate, via Einstein's Summation convention, that if $A, B$ are
two $n\times n$ matrices, then $$ \tr{AB}=\tr{BA}. $$
\end{exa}
\begin{solu}
We have
$$ \tr{AB}  = \tr{(AB)_{ij}}=\tr{\es{A_{ik}B_{kj}}} =\es{\es{A_{tk}B_{kt}}},  $$
and
$$ \tr{BA}  = \tr{(BA)_{ij}}=\tr{\es{B_{ik}A_{kj}}} =\es{\es{B_{tk}A_{kt}}}, $$
from where the assertion follows, since the indices are dummy
variables and can be exchanged.
\end{solu}

\begin{df}[Kroenecker's Delta] The symbol $\delta
_{ij}$ is defined as follows:
$$ \delta _{ij} = \left\{ \begin{array}{ll} 0 & \mathrm{if}\ i\neq j \\
1 & \mathrm{if}\ i = j.
\end{array}
\right.
$$
\end{df}
\begin{exa}
It is easy to see that $\es{\delta _{ik}\delta _{kj}} = \sum _{k=1}
^3 \delta _{ik}\delta _{kj}=\delta _{ij}$.
\end{exa}
\begin{exa}
We see that $$\es{\delta _{ij}a_ib_j} = \sum _{i=1} ^3 \sum _{j=1}
^3\delta _{ij}a_ib_j = \sum _{k=1} a_kb_k = \dotprod{a}{b}.
$$
\end{exa}
Recall that a {\em permutation} of distinct objects is a reordering
of them. The $3!=6$ permutations of the index set  $\{1,2,3\}$ can
be classified into {\em even} or {\em odd}. We start with the
identity permutation $123$ and say it is even. Now, for any other
permutation, we will say that it is even if it takes an even number
of transpositions (switching only two elements in one move) to
regain the identity permutation, and odd if it takes an odd number
of transpositions to regain the identity permutation. Since
$$ 231 \to 132 \to 123, \quad 312 \to 132 \to 123, $$the
permutations $123$ (identity), $231$, and $312$ are even. Since
$$ 132 \to 123, \quad  321 \to 123, \quad 213 \to 123, $$the
permutations $132$, $321$, and $213$ are odd.

\begin{df}[Levi-Civitta's Alternating Tensor] The symbol $\varepsilon
_{jkl}$ is defined as follows:
$$ \varepsilon _{jkl} = \left\{ \begin{array}{ll} 0 & \mathrm{if}\ \{j,k,l\} \neq \{1,2,3\} \\
-1 & \mathrm{if}\ \begin{pmatrix} 1 & 2 & 3 \\ j & k & l \\
\end{pmatrix}\ \mathrm{is\ an \ odd\ permutation }\\
+1 & \mathrm{if}\ \begin{pmatrix} 1 & 2 & 3 \\ j & k & l \\
\end{pmatrix}\ \mathrm{is\ an \ even\ permutation }\\
\end{array}
\right.
$$
\end{df}
\begin{rem}
In particular, if one subindex is repeated we have $\varepsilon
_{rrs}=\varepsilon _{rsr}=\varepsilon _{srr}=0$. Also,
$$ \varepsilon
_{123}= \varepsilon _{231}=\varepsilon _{312}=1, \qquad  \varepsilon
_{132}= \varepsilon _{321}=\varepsilon _{213}=-1.$$

\end{rem}


\begin{exa}
Using the Levi-Civitta alternating tensor and Einstein's summation
convention, the cross product can also be expressed, if
$\vector{i}=\vector{e_1}$, $\vector{j}=\vector{e_2}$,
$\vector{k}=\vector{e_3}$, then
$$\crossprod{x}{y} = \es{\varepsilon _{jkl}(a_kb_l)\vector{e_j}}.$$
\end{exa}
\begin{exa}
If $A=[a_{ij}]$ is a $3\times 3$ matrix, then, using the
Levi-Civitta alternating tensor,
$$\det A = \es{\varepsilon _{ijk}a_{1i}a_{2j}a_{3k}}.  $$
\end{exa}
\begin{exa}
Let $\vector{x}, \vector{y}, \vector{z}$ be vectors in $\reals^3$.
Then $$ \vector{x}\bullet (\crossprod{y}{z}) =
\es{x_i(\crossprod{y}{z})_i} = \es{x_i\varepsilon _{ikl}(y_kz_l) }.
$$
\end{exa}

\section*{\psframebox{Homework}}\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Let $\vector{x}, \vector{y}, \vector{z}$ be vectors in $\reals^3$.
Demonstrate that
$$  \es{x_iy_iz_j} = (\dotprod{x}{y})\vector{z}. $$
\end{pro}
\end{multicols}

\section{Extrema}
We now turn to the problem of finding maxima and minima for vector
functions. As in the one-variable case, the derivative will
provide us with information about the extrema, and the ``second
derivative'' will provide us with information about the nature of
these extreme points.



To define an analogue for the second derivative, let us consider the
following. Let $A \subset \reals^n$ and $f:A \rightarrow \reals^m$
be differentiable on $A$. We know that for fixed $\point{x}_0\in A
$, $\deriv{x_0}{f}$ is a linear transformation from $\reals^n$ to
$\reals^m$. This means that we have a function
$$\fun{T}{\point{x}}{\deriv{x}{f}}{A}{{\mathscr  L}(\reals^n, \reals^m)},$$
where  ${\mathscr  L}(\reals^n, \reals^m)$ denotes the space of
linear transformations from $\reals^n$ to $\reals^m$. Hence, if we
differentiate $T$ at $\point{x}_0$ again,   we obtain a linear
transformation $\deriv{x_0}{T} = \deriv{x_0}{\deriv{x_0}{f}}  =
{\mathscr D}_{\point{x}_0} ^2 (f) $ from $\reals^n$ to ${\mathscr
L}(\reals^n, \reals^m)$. Hence, given $\point{x_1}\in \reals^n,$ we
have ${\mathscr D}_{\point{x}_0} ^2 (f)(\point{x_1})\in {\mathscr
L}(\reals^n, \reals^m)$. Again, this means that given
$\point{x}_2\in \reals^n$, ${\mathscr D}_{\point{x}_0} ^2
(f)(\point{x_1}))(\point{x}_2) \in \reals^m .$ Thus the function
$$\fun{B_{\point{x_0}}}{(\point{x_1}, \point{x_2})}{{\mathscr D}_{\point{x}_0} ^2 (f)(\point{x_1}, \point{x_2})}{\reals^n\times \reals^n}{{\mathscr  L}(\reals^n, \reals^m)}$$
is well defined, and linear in each variable $\point{x_1}$ and
$\point{x_2}$, that is, it is a {\em bilinear} function.





      Just as the Jacobi matrix was a handy tool for finding a
matrix representation of $\deriv{x}{f}$ in the natural bases, when
$f$ maps into $\reals$, we have the following analogue
representation of the second derivative.
\begin{thm}
Let $A \subseteq \reals^n$ be an open set, and $f:A \rightarrow
\reals$ be twice differentiable on $A$. Then the matrix of
${\mathscr D}_{\point{x}} ^2 (f):\reals^n \times \reals^n
\rightarrow \reals$ with respect to the standard basis is given by
the {\em Hessian matrix:}
$$\hessian{x}{f} = \begin{bmatrix} \hderiv{1}{1}{f}(\point{x}) & \hderiv{1}{2}{f}(\point{x})  & \cdots & \hderiv{1}{n}{f}(\point{x}) \cr
\hderiv{2}{1}{f}(\point{x}) & \hderiv{2}{2}{f}(\point{x})  & \cdots
& \hderiv{2}{n}{f}(\point{x}) \cr \vdots & \vdots & \vdots & \vdots
\cr \hderiv{n}{1}{f}(\point{x}) & \hderiv{n}{2}{f}(\point{x})  &
\cdots & \hderiv{n}{n}{f}(\point{x}) \cr
\end{bmatrix}$$


\end{thm}
\begin{exa}
Let $f:\reals^3 \rightarrow \reals$ be given by
$$f(x,y,z)  = xy^2z^3.$$ Then

$$
\hessian{(x,y,z)}{f} = \begin{bmatrix}  0 & 2yz^3 & 3y^2z^2 \cr
2yz^3 & 2xz^3 & 6xyz^2 \cr 3y^2z^2 & 6xyz^2 & 6xy^2z \cr
\end{bmatrix}$$

\end{exa}

From the preceding example, we notice that the Hessian is symmetric,
as the  mixed partial derivatives $\dfrac{\partial ^2}{\partial
x\partial y}f = \dfrac{\partial ^2}{\partial y\partial x}f $, etc.,
are equal. This is no coincidence, as guaranteed by the following
theorem.
\begin{thm}
Let $A \subseteq \reals^n$ be an open set, and $f:A \rightarrow
\reals$ be twice differentiable on $A$. If ${\mathscr
D}_{\point{x}_0} ^2 (f)$ is continuous, then ${\mathscr
D}_{\point{x}_0} ^2 (f)$ is symmetric, that is, $\forall
(\point{x_1}, \point{x_2})\in \reals^n\times \reals^n$ we have
$${\mathscr D}_{\point{x}_0} ^2 (f)(\point{x_1}, \point{x_2}) = {\mathscr D}_{\point{x}_0} ^2 (f)(\point{x_2}, \point{x_1}). $$
\end{thm}



We are now ready to study extrema in several variables. The basic
theorems resemble those of one-variable calculus. First, we make
some analogous definitions.
\begin{df}
Let $A \subseteq \reals^n$ be an open set, and $f:A \rightarrow
\reals$. If there is some open ball $\ball{r}{\point{x_0}}$ on which
$\forall \point{x}\in\ball{r}{x_0}, \ \ f(\point{x}_0) \geq
f(\point{x})$, we say that $ f(\point{x}_0)$ is a {\em local
maximum} of $f$. Similarly, if there is  some open ball
$\ball{r}{\point{x_1}}$ on which $\forall
\point{x}\in\ball{r'}{\point{x_0}}, \ \ f(\point{x}_1) \leq
f(\point{x})$, we say that $ f(\point{x}_1)$ is a {\em local
maximum} of $f$. A point is called an {\em extreme point} if it is
either a local minimum or local maximum. A point $\point{t}$ is
called a {\em critical point} if $f$ is differentiable at
$\point{t}$ and $\deriv{\point{t}}{f} = 0$. A critical point which
is neither a maxima nor a minima is called a {\em saddle point}.
\end{df}
\begin{thm}
Let $A \subseteq \reals^n$ be an open set, and $f:A \rightarrow
\reals$ be differentiable on $A$. If $\point{x}_0$ is an extreme
point, then $\deriv{\point{x_0}}{f} = 0,$ that is, $\point{x}_0$ is
a critical point. Moreover, if $f$ is twice-differentiable with
continuous second derivative and $\point{x_0}$ is a critical point
such that $\hessian{\point{x_0}}{f}$ is negative definite, then $f$
has a local maximum at $\point{x}_0$. If $\hessian{\point{x_0}}{f}$
is positive definite, then $f$ has a local minimum at $\point{x}_0$.
If $\hessian{\point{x_0}}{f}$ is indefinite, then $f$ has a saddle
point. If $\hessian{\point{x_0}}{f}$ is semi-definite (positive or
negative), the test is inconclusive.
\end{thm}

\begin{exa}
Find the critical points of  $$\fun{f}{(x, y)}{x^2 + xy + y^2 + 2x +
3y}{\reals^2}{\reals}
$$and investigate their nature.
\end{exa}
\begin{solu} We have
$$(\nabla f)(x,y) = \begin{bmatrix}2x + y + 2 \\ x + 2y + 3
\end{bmatrix},$$and so to find the critical points we solve
$$2x + y + 2 = 0,$$
$$x + 2y  + 3= 0,$$which yields
$x = -\dfrac{1}{3}, y = -\dfrac{4}{3}.$
Now,
$$\hessian{(x,y)}{f} = \begin{bmatrix}2 & 1 \cr 1 & 2
\end{bmatrix},$$which is positive definite, since $\Delta_1 = 2 >
0$ and $\Delta_2 = \det \begin{bmatrix}2 & 1 \cr 1 & 2
\end{bmatrix} = 3 > 0$. Thus $\point{x_0} =
\left(-\dfrac{1}{3}, -\dfrac{4}{3}\right)$ is a relative minimum and
we have
$$-\dfrac{7}{3} = f\left(-\dfrac{1}{3}, -\dfrac{4}{3}\right) \leq f(x, y) = x^2 + xy + y^2 + 2x + 3y.$$
\end{solu}
\begin{exa}
Find the extrema of $$\fun{f}{(x, y, z)}{x^2 + y^2 + 3z^2 - xy + 2xz
+ yz }{\reals^3}{\reals}.$$
\end{exa}
\begin{solu}  We have
$$(\nabla f)(x,y,z)  = \begin{bmatrix}2x - y + 2z \\ 2y - x + z \\ 6z + 2x + y \cr
\end{bmatrix},$$which vanishes when $x = y = z = 0.$ Now,
$$\hessian{r}{f} = \begin{bmatrix}
2 & -1 & 2 \cr -1 & 2 & 1 \cr 2 & 1 & 6 \cr
\end{bmatrix},$$which is positive definite, since $\Delta_1 = 2 > 0,$
$\Delta_2 = \det \begin{bmatrix} 2 & -1 \cr -1 & 2 \end{bmatrix} =
3 > 0,$ and $\Delta_3 = \det \begin{bmatrix} 2 & -1 & 2 \cr -1 & 2
& 1 \cr 2 & 1 & 6 \cr
\end{bmatrix} = 4 > 0.$ Thus $f$ has a relative minimum at $(0, 0,
0)$ and $$0 = f(0, 0, 0) \leq f(x, y, z) = x^2 + y^2 + 3z^2 - xy +
2xz + yz. $$
\end{solu}

\begin{exa}
Let $f(x,y)=x^3-y^3+axy$, with $a\in \reals$ a parameter. Determine
the nature of the critical points of $f$.
\end{exa}
\begin{solu}
We have $$ (\nabla f)(x,y)=\colvec{3x^2+ay \\  -3y^2+ax} = \colvec{0
\\ 0} \implies 3x^2=-ay,\quad  3y^2=ax.  $$ If $a=0$, then $x=y=0$
and so $(0,0)$ is a critical point. If $a\neq 0$ then
$$\begin{array}{lll}3\left(3\dfrac{y^2}{a}\right)^2=-ay & \implies &  27y^4=-a^3y \\ &  \implies & y(27y^3+a^3)=0 \\ & \implies &  y(3y+a)(9y^2-3ay+a^2)=0\\
& \implies &  y=0\quad  \mathrm{or}\quad y = -\dfrac{a}{3}.
\end{array}
$$
If $y=0$ then $x=0$, so again $(0,0)$ is a critical point. If $ y =
-\dfrac{a}{3}$ then $x=\dfrac{3}{a}\cdot
\left(-\dfrac{a}{3}\right)^2 = \dfrac{a}{3} $ so
$\left(\dfrac{a}{3}, -\dfrac{a}{3}\right)$  is a critical point.


Now,
$${\cal H}_{f(x,y)}
=
\begin{bmatrix} 6x & a \\ a & -6y  \end{bmatrix} \implies \Delta _1
=6x, \quad \Delta _2 = -36xy-a^2.  $$ At $(0,0)$, $\Delta _1 =0$,
$\Delta _2 =-a^2$. If $a\neq 0$ then there is a saddle point.  At
$\left(\dfrac{a}{3}, -\dfrac{a}{3}\right)$, $\Delta _1 = 2a$,
$\Delta _2 =3a^2$, whence $\left(\dfrac{a}{3}, -\dfrac{a}{3}\right)$
will be a local minimum if $a>0$ and a local maximum if $a<0$.
\end{solu}


\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
Determine the nature of the critical points of $f (x,y)=
y^2-2x^2y+4x^3+20x^2$.
\end{pro}
\begin{pro}
Determine the nature of the critical points of $f(x,y)= (x-2)^2+2y^2
$.
\end{pro}
\begin{pro}
Determine the nature of the critical points of $f(x,y)= (x-2)^2-2y^2
$.
\end{pro}
\begin{pro}
Determine the nature of the critical points of $f(x,y)=
x^4+4xy-2y^2 $.
\end{pro}
\begin{pro}
Determine the nature of the critical points of $f(x,y)=
x^4+y^4-2x^2+4xy-2y^2 $.
\end{pro}
\begin{pro}
Determine the nature of the critical points of
$f(x,y,z)=x^2+y^2+z^2-xy+x-2z $.
\end{pro}
\begin{pro}
Determine the nature of the critical points of
$f(x,y)=x^4+y^4-2(x-y)^2$.
\begin{answer}
We have
$$ (\nabla f)(x,y)= \colvec{4x^3-4(x-y)\\
4y^3+4(x-y)}=\colvec{0\\ 0}\implies 4x^3=4(x-y)=-4y^3 \implies x=-y.
$$
Hence $$ 4x^3-4(x-y)=0 \implies 4x^3-8x=0 \implies 4x(x^2-2)=0
\implies x\in\{-\sqrt{2},0,\sqrt{2}\}.
$$
Since $x=-y$,  the critical points are thus $(-\sqrt{2},\sqrt{2}),
(0,0), (\sqrt{2},-\sqrt{2})$. The Hessian is now,
$${\cal H}f(x,y)=\begin{bmatrix}  12x^2-4 & 4 \\ 4 & 12y^2-4   \end{bmatrix},  $$
and its principal minors are $\Delta _1 = 12x^2-4$ and $\Delta _2 =
(12x^2-4)(12y^2-4)-16$.


\bigskip
If $(x,y)=(-\sqrt{2},\sqrt{2})$ or  $(x,y)=(\sqrt{2},-\sqrt{2})$,
then $\Delta _1 =20>0$ and $\Delta _2 = 384>0$, so the matrix is
positive definite and we have a local minimum at each of these
points.

\bigskip

If $(x,y)=(0,0)$ then $\Delta _1 =-4<0$ and $\Delta _2 = 0$, so the
matrix is negative semidefinite and further testing is needed.  What
happens in a neighbourhood of $(0,0)$? We have
$$f(x,x)=2x^4 >0, \qquad f(x,-x)=2x^4-4x^2=2x^2(x^2-1).  $$
If $x$ is close enough to $0$,  $=2x^2(x^2-1)<0$, which means that
the function both increases and decreases to $0$ in a neighbourhood
of $(0,0)$, meaning that there is a saddle point there.


\end{answer}
\end{pro}
\begin{pro}
Determine the nature of the critical points of $$f(x, y, z)
=4x^2z-2xy-4x^2-z^2+y.$$ \begin{answer} We have
$$ \nabla f(x, y, z) = \begin{bmatrix} 8xz -2y-8x \\ -2x + 1 \\ 4x^2 -2z  \end{bmatrix} = \colvec{0\\ 0 \\ 0} \implies x = 1/2;\quad
y = -1;\quad z = 1/2.  $$ The hessian is
$$\mathscr{H}  =\begin{bmatrix}8z-8 & -2 & 8x \cr -2 & 0 & 0 \cr 8x & 0 & -2 \cr \end{bmatrix} .
$$The principal minors are $8z-8$; $-4$, and $8$. At $z = 1/2$, the
matrix is negative definite and the critical point is thus a saddle
point.
\end{answer}
\end{pro}
\begin{pro}
Find the extrema of $$f(x,y,z)=x^2 + y^2 + z^2 + xyz. $$
\begin{answer} We have
$$(\nabla f)(x,y,z) = \begin{bmatrix} 2x + yz \\ 2y + xz \\ 2z + xy
\end{bmatrix},$$and
$$\hessian{r}{f} = \begin{bmatrix} 2 & z & y \cr
z & 2 & x \cr y & x & 2 \cr   \end{bmatrix}.$$ We see that
$\Delta_1(x, y, z) = 2, \Delta_2(x, y, z) = \det \begin{bmatrix} 2 &
z \cr z & 2
\end{bmatrix} = 4 - z^2$ and $\Delta_3(x, y, z) = \det\hessian{r}{f}  = 8 - 2x^2 - 2y^2 - 2z^2 +
2xyz$.




If $(\nabla f)(x,y,z)  = \colvec{0 \\ 0\\ 0}$ then we must have
$$2x = -yz,$$
$$2y = -xz,$$
$$2z = -xy,$$and upon multiplication of the three equations,
$$8xyz = -x^2y^2z^2,$$
that is,
$$xyz(xyz + 8) = 0.$$Clearly, if $xyz = 0$, then we must have at least one of the variables equalling $0$, in which case,
by virtue of the original three equations, all equal $0$. Thus $(0,
0, 0)$ is a critical point. If $xyz = -8$, then none of the
variables is $0$, and solving for $x$, say, we must have $x =
-\dfrac{8}{yz}$, and substituting this into $2x + yz = 0$ we gather
$(yz)^2 = 16$, meaning that either $yz = 4,$ in which case $x = -2$,
or $zy = -4$, in which case $x = 2.$ It is easy to see then that
either exactly one of the variables is negative, or all three are
negative.  The other critical points are therefore $(-2, 2, 2 )$,
$(2, -2, 2)$, $(2, 2, -2)$, and $(-2, -2, -2)$.



    At $(0, 0, 0)$, $\Delta_1(0, 0, 0) = 2 > 0, \Delta_2(0, 0, 0) = 4 > 0, \Delta_1(0, 0, 0) = 8 >
0$, and thus $(0, 0, 0)$ is a minimum point. If $x^2 = y^2 = z^2 =
4, xyz = -8$, then $\Delta_2(x, y, z) = 0, \Delta_3 = -32,$ so these
points are saddle points.
\end{answer}
\end{pro}
\begin{pro} Find the extrema of $f(x,y,z)=x^2y + y^2z + 2x - z $.
\begin{answer} We have
$$(\nabla f)(x,y,z) = \begin{bmatrix} 2xy + 2 \\ x^2 + 2yz \\ y^2 - 1
\end{bmatrix},$$and
$$\hessian{r}{f} = \begin{bmatrix} 2y & 2x & 0 \cr
2x & 2z & 2y \cr 0 & 2y & 0 \cr   \end{bmatrix}.$$ We see that
$\Delta_1(x, y, z) = 2y, \Delta_2(x, y, z) = \det \begin{bmatrix} 2y
& 2x \cr 2x & 2z
\end{bmatrix} = 4yz - 4x^2$ and $\Delta_3(x, y, z) = \det\hessian{r}{f}  = -8y^3$.




If $(\nabla f)(x,y,z)  = \colvec{0\\ 0\\ 0}$ then we must have
$$xy = -1,$$
$$x^2 = -2yz,$$
$$y = \pm 1,$$and hence $(1, -1,
\dfrac{1}{2})$, and $(-1, 1, -\dfrac{1}{2})$ are the critical
points. Now, $\Delta_1(1, -1, \dfrac{1}{2}) = -2$, $\Delta_2(1, -1,
\dfrac{1}{2}) = -6,$ and $\Delta_3(1, -1, \dfrac{1}{2}) = 8.$ Thus
$(1, -1, \dfrac{1}{2})$ is a saddle point. Similarly, $\Delta_1(-1,
1, -\dfrac{1}{2}) = 2$, $\Delta_2(-1, 1, -\dfrac{1}{2}) = -6,$ and
$\Delta_3(-1, 1, -\dfrac{1}{2}) = -8$, shewing that $(1, -1,
\dfrac{1}{2})$ is also a saddle point.
\end{answer}
\end{pro}
\begin{pro}
Determine the nature of the critical points of
$$f(x,y,z) = 4xyz - x^4 - y^4 - z^4. $$\begin{answer} We find $$\nabla f(x,y,z) = \colvec{4yz - 4x^3 \\ 4xz - 4y^3
\\ 4xy - 4z^3}.
$$ Assume $\nabla f(x,y,z) = \point{0}$. Then $$4yz = 4x^3, \  4xz = 4y^3, \ 4xy = 4z^3 \implies xyz = x^4 = y^4 = z^4.   $$
Thus $xyz \geq 0$, and if one of the variables is $0$ so are the
other two. Thus $(0,0,0)$ is the only critical point with at least
one of the variables $0$. Assume now that $xyz \neq 0$. Then
$$(xyz)^3 = x^4y^4z^4 = (xyz)^4 \implies xyz = 1 \implies yz = \dfrac{1}{x} \implies x^4 = 1 \implies x = \pm 1.$$
Similarly, $y = \pm 1, z = \pm 1$. Since $xyz = 1$, exactly two of
the variables can be negative. Thus we find the following critical
points: $$(0,0,0), (1,1,1), (-1,-1,1), (-1,1,-1), (1,-1,-1).    $$
The Hessian is
$$ \hessian{x}{f} = \begin{bmatrix} -12x^2 &  4z & 4y \cr 4z & -12y^2 & 4x \cr
4y & 4x & -12z^2 \cr    \end{bmatrix} .  $$ If $1 = xyz = x^2 = y^2
= z^2$, we have $\Delta_1 = -12x^2 = -12 < 0$, $\Delta_2 = 144x^2y^2
- 16z^2 = 144 - 16 = 128
> 0,$ and $$\begin{array}{lll}\Delta _3 & = & -1728x^2y^2z^2+192x^4+192z^4+128zyx+192y^4 \\ & = & -1728 + 192 + 192 + 128 + 192 \\ &  = &  -1024 \\ & < &  0.\end{array}$$
This means that for $xyz \neq 0$ the Hessian is negative definite
and the function has a local maximum at each of the four points
$(1,1,1), (-1,-1,1),$ $ (-1,1,-1)$, $(1,-1,-1). $ Observe that at
these critical points $f = 1.$ Now $f(0,0,0) = 0$ and $f(-1,1,1) =
-7$.
\end{answer}
\end{pro}
\begin{pro}
Determine the nature of the critical points of
$f(x,y,z)=xyz(4-x-y-z)$.
\begin{answer}Rewrite: $f(x,y,z)=xyz(4-x-y-z)=4xyz-x^2yz-xy^2z-xyz^2$.
Then,
$$ (\nabla f)(x,y,z)= \colvec{4yz-2xyz-y^2z-yz^2\\
4xz-x^2z-2xyz-xz^2\\ 4xy-x^2y-xy^2-2xyz},$$ $$ {\cal H}f(x,y,z)=
\begin{bmatrix} -2yz & z(4-2x-2y-z) & y(4-2x-y-2z)\cr
z(4-2x-2y-z)&-2xz&x(4-x-2y-2z)\cr y(4-2x-y-2z)&x(4- x-2y-2z)&-2xy
\cr
\end{bmatrix}
 $$
Equating the gradient to zero, we obtain,
 $$
yz(4-2x-y-z)=0, \quad xz(4-x-2y-z)=0, \quad xy(4-x-y-2z)=0.
$$
If $xyz\neq 0$ then we must have
 $$
4-2x-y-z=0, \quad 4-x-2y-z=0, \quad 4-x-y-2z=0 \implies x=y =z =1.
$$
In this case
$$ {\cal H}f(1,1,1)=
\begin{bmatrix} -2 & -1 & -1 \cr -1 & -2 & -1 \cr -1 & -1 & -2 \cr
\end{bmatrix}
 $$and the principal minors are $\Delta _1 =-2<0$, $\Delta _2 = 3>0$, and $\Delta _3=-4<0$, so the matrix is negative
  definite and we have a local maximum at $(1,1,1)$.

\bigskip

If either of $x$, $y$, or $z$ is $0$, we will get $\Delta _3=0$, so
further testing is needed. Now,
$$f(x,x,x)=x^3(4-3x), \qquad f(x,-x,x)=x^3(-4+x). $$
Thus as $x\to 0+$ then $f(x,x,x)>0$ and $f(x,-x,x)<0$, which means
that in some neighbourhood of $(0,0,0)$ the function is both
decreasing towards $0$ and increasing towards $0$, which means that
$(0,0,0)$ is a saddle point.
\end{answer}


\end{pro}


\begin{pro} Determine the nature of the critical points of
$$g(x,y,z) = xyze^{-x^2-y^2-z^2}. $$ \begin{answer} To facilitate differentiation observe that $g(x,y,z) =
(xe^{-x^2})(ye^{-y^2})(ze^{-z^2})$. Now
$$ \nabla g(x,y,z) = \colvec{(1 - 2x^2)(yz)(e^{-x^2})(e^{-y^2})(e^{-z^2})
\\ (1 - 2y^2)(xz)(e^{-x^2})(e^{-y^2})(e^{-z^2}) \\ (1 - 2z^2)(xy)(e^{-x^2})(e^{-y^2})(e^{-z^2})}. $$
The function is $0$ if any of the variables is $0$. Since the
function clearly assumes positive and negative values, we can
discard any point with a $0$. If $\nabla (x,y,z) = \point{0}$, then
$x = \pm \dfrac{1}{\sqrt{2}};\ y = \pm \dfrac{1}{\sqrt{2}}\ z = \pm
\dfrac{1}{\sqrt{2}}$. We find
$$\hessian{x}{g} = t(x,y,z)\begin{bmatrix} (4x^3 - 6x)(yz) &
(1 - 2x^2)(1 - 2y^2)z   & (1 - 2x^2)(1 - 2z^2)y\cr (1 - 2y^2)(1 -
2x^2)z & (4y^3 - 6y)(xz) & (1 - 2y^2)(1 - 2z^2)x \cr (1 - 2z^2)(1 -
2x^2)y & (1 - 2z^2)(1 - 2y^2)x & (4z^3 - 6z)(xy) \cr
\end{bmatrix},    $$
with $t(x,y,z) = (e^{-x^2})(e^{-y^2})(e^{-z^2})$. Since at the
critical points we have  $1 - 2x^2 = 1 - 2y^2 = 1 - 2z^2 = 0$, the
Hessian reduces to

$$\hessian{x}{g} = (e^{-3/2})\begin{bmatrix} (4x^3 - 6x)(yz) &
0  & 0 \cr 0 & (4y^3 - 6y)(xz) & 0 \cr 0 & 0 & (4z^3 - 6z)(xy) \cr
\end{bmatrix}.    $$
We have $$\Delta_1  = (4x^3 - 6x)(yz)   $$
$$\Delta_2 = (4x^3 - 6x)(4y^3 - 6y)(xyz^2)   $$
$$\Delta_3=    (4x^3 - 6x)(4y^3 - 6y)(4z^3 - 6z)(x^2y^2z^2). $$
Also, $$ 4\left(\dfrac{1}{\sqrt{2}}\right)^3 -
6\left(\dfrac{1}{\sqrt{2}}\right) = -2\sqrt{2} < 0, \ \ \
4\left(-\dfrac{1}{\sqrt{2}}\right)^3 -
6\left(-\dfrac{1}{\sqrt{2}}\right) = 2\sqrt{2} > 0.
$$
This means that if an even number of the variables is negative (0 or
2), then we the Hessian is negative definite, and if an odd numbers
of the variables is positive (1 or 3), the Hessian is positive
definite. We conclude that we have  local maxima at
$$(\frac{1}{\sqrt{2}},  \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}),
(-\frac{1}{\sqrt{2}},  -\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}),
(-\frac{1}{\sqrt{2}},  \frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}),
(\frac{1}{\sqrt{2}},  -\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}})
$$ and  local minima at
$$(-\frac{1}{\sqrt{2}},  -\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}),
(-\frac{1}{\sqrt{2}},  \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}),
(\frac{1}{\sqrt{2}},  -\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}),
(\frac{1}{\sqrt{2}},  \frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}).
$$
\end{answer}
\end{pro}
\begin{pro}
Let $f(x, y) = \int _{y^2-x} ^{x^2+y} g(t)\d{t}$, where $g$ is a
continuously differentiable function defined over all real numbers
and $g(0) = 0, g'(0) \neq 0$. Prove that $(0,0)$ is a saddle point
for $f$. \begin{answer} By the Fundamental Theorem of Calculus,
there exists a continuously differentiable function $G$ such that
$$f(x, y) = \int _{y^2-x} ^{x^2+y} g(t)\d{t} =
G(x^2+y)-G(y^2-x).$$Hence
$$\partialderiv{x}{f}(x,y) = 2xG'(x^2+y) +
G'(y^2-x)=2xg(x^2+y)+g(y^2-x);$$ $$ \partialderiv{y}{f}(x,y) =
G'(x^2+y) - 2yG'(y^2-x) = g(x^2+y)-2yg(y^2-x).
$$ This gives $$\partialderiv{x}{f}(0,0) = g(0) = \partialderiv{y}{f}(0,0)
= 0,
$$so $(0,0)$ is a critical point. Now, the Hessian of $f$ is
$$\mathscr{H}_f(x,y) = \begin{bmatrix}2g(x^2+y)+4x^2g'(x^2+y)-g'(y^2-x) & 2xg'(x^2+y) + 2yg'(y^2-x) \\
2xg'(x^2-y)+2yg'(y^2-x) & g'(x^2+y)-2g(y^2-x)-4y^2g'(y^2-x)
\end{bmatrix},$$and so
$$\mathscr{H}_f(0,0) = \begin{bmatrix}-g'(0) & 0 \\ 0 & g'(0)
\end{bmatrix}.$$Regardless of the sign of $g'(0)$, the determinant of
 of this last matrix is $-(g'(0))^2 < 0$, and so $(0,0)$
is a saddle point.

\end{answer}
\end{pro}
\begin{pro}
Find the minimum of $$F(x, y) = (x-y)^2 +
\left(\dfrac{\sqrt{144-16x^2}}{3}-\sqrt{4-y^2}\right)^2,
$$for $-3 \leq x \leq 3$, $-2 \leq y \leq 2$.
\begin{answer}
Since the coordinates $(x, \dfrac{\sqrt{144-16x^2}}{3})$, $-3 \leq x
\leq 3$ describe an ellipse centred at the origin and semi-axes $3$
and $4$, and the coordinates $(y, \sqrt{4-y^2} )$, $-2 \leq y \leq
2$ describe a circle centred at the origin with radius $2$, the
problem reduces to finding the minimum between the boundaries of the
circle and the ellipse. Geometrically this is easily seen to be $1$.
\end{answer}
\end{pro}
\end{multicols}
\section{Lagrange Multipliers}
In some situations we wish to optimise a function given a set of
constraints. For such cases, we have the following.
\begin{thm}
Let $A \subseteq \reals^n$ and let $f:A \rightarrow \reals$, $g:A
\rightarrow \reals$ be functions whose respective derivatives are
continuous. Let $g(\point{x}_0) = c_0$ and let $S = g^{-1}(c_0)$ be
the level set for $g$ with value $c_0$, and assume $\nabla
g(\point{x}_0) \neq 0$. If the restriction of $f$ to $S$ has an
extreme point at $\point{x}_0$, then  $\exists \lambda \in \reals$
such that
$$\nabla f(\point{x}_0) = \lambda \nabla g(\point{x}_0).$$
\end{thm}
\begin{rem}
The above theorem only locates extrema, it does not say anything
concerning the nature of the critical points found.
\end{rem}
\begin{exa}
Optimise $f:\reals^2 \rightarrow \reals, f(x, y) = x^2 - y^2$ given
that $x^2 + y^2 = 1$.
\end{exa}
\begin{solu} Let $g(x, y) = x^2 + y^2 - 1$. We solve
$$\nabla f\colvec{x \\y } = \lambda \nabla g\colvec{x \\ y}$$ for
$x, y, \lambda$. This requires
$$\colvec{2x \\ -2y} = \colvec{2x\lambda \\ 2y\lambda}.$$
From $2x = 2x\lambda$ we get either $x = 0$ or $\lambda = 1$. If
$x = 0$ then $y = \pm 1$ and $\lambda = -1$. If $\lambda = 1$,
then $y = 0, x = \pm 1$. Thus the potential critical points are
$(\pm 1, 0)$ and $(0, \pm 1)$. If $x^2 + y^2 = 1$ then
$$f(x, y) = x^2 - (1 - x^2) = 2x^2 - 1 \geq -1,$$
and
$$f(x, y) = 1 - y^2 -y^2 = 1 - 2y^2 \leq 1.$$Thus $(\pm 1, 0)$ are
 maximum points and $(0, \pm 1)$ are minimum points.
 \end{solu}
 \begin{exa}Find the maximum and the minimum points of
$f(x,y) = 4x + 3y$,  subject to the constraint $x^2 + 4y^2 = 4$,
using Lagrange multipliers. \end{exa} \begin{solu} Putting $g(x,y) =
x^2 + 4y^2 - 4$ we have $$\nabla f(x,y) = \lambda\nabla g(x,y)
\implies \colvec{4 \\ 3} = \lambda \colvec{2x \\ 8y}.$$ Thus $4 =
2\lambda x, \  \ 3 = 8\lambda y.$ Clearly then $\lambda \neq 0$.
Upon division we find $\dfrac{x}{y} = \dfrac{16}{3}$. Hence $$x^2 +
4y^2 = 4 \implies \dfrac{256}{9}y^2 + 4y^2 = 4 \implies y = \pm
\dfrac{3}{\sqrt{73}}, x = \pm \dfrac{16}{\sqrt{73}.}
$$ The maximum is clearly then $$4\left(\dfrac{16}{\sqrt{73}}\right) +
3\left(\dfrac{3}{\sqrt{73}}\right)= \sqrt{73},
$$and the minimum is $-\sqrt{73}$.
\end{solu}
\begin{exa}Let $a > 0, b>0, c>0$. Determine the maximum and
minimum values of $f(x,y,z) = \dfrac{x}{a} + \dfrac{y}{b} +
\dfrac{z}{c}$ on the ellipsoid $\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2}
+ \dfrac{z^2}{c^2} = 1.$ \end{exa} \begin{solu} We use Lagrange
multipliers. Put $g(x,y,z) = \dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} +
\dfrac{z^2}{c^2} - 1. $ Then

$$\nabla f(x,y,z) = \lambda \nabla g(x,y,z) \iff \colvec{1/a \\ 1/b \\ 1/c} = \lambda \colvec{2x/a^2 \\ 2y/b^2 \\ 2z/c^2}.     $$
It follows that $\lambda \neq 0$. Hence $x = \dfrac{a}{2\lambda}, y
= \dfrac{b}{2\lambda}, z = \dfrac{c}{2\lambda}$. Since
$\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} + \dfrac{z^2}{c^2} = 1$, we
deduce $\dfrac{3}{4\lambda ^2} = 1$ or $\lambda = \pm
\frac{\sqrt{3}}{2}$.  Since $a, b, c$ are positive, $f$ will have a
maximum when all  $x, y, z$ are positive and a minimum when all
$x,y,z$ are negative. Thus the maximum is when $$ x =
\dfrac{a}{\sqrt{3}},  y= \dfrac{b}{\sqrt{3}}, z=
\dfrac{c}{\sqrt{3}},$$ and $$f(x,y,z) \leq  \dfrac{3}{\sqrt{3}} =
\sqrt{3}$$ and the minimum is when
$$
x = -\dfrac{a}{\sqrt{3}},  y= -\dfrac{b}{\sqrt{3}}, z=
-\dfrac{c}{\sqrt{3}},$$ and $$f(x,y,z) \geq
-\dfrac{3}{\sqrt{3}}=-\sqrt{3}.$$

\bigskip

{\em Aliter:} Using the CBS Inequality,
$$ \absval{\dfrac{x}{a}\cdot 1 + \dfrac{y}{b}\cdot 1 +
\dfrac{z}{c}\cdot 1}\leq   \left(\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2}
+ \dfrac{z^2}{c^2} \right)^{1/2}\left(1^2+1^2+1^2\right)^{1/2}
=(1)\sqrt{3} \implies  -\sqrt{3}\leq \dfrac{x}{a} + \dfrac{y}{b} +
\dfrac{z}{c}\leq\sqrt{3}.$$

\end{solu}


\begin{exa}
Let $a > 0, b>0, c>0$. Determine the maximum volume of the
parallelepiped with sides parallel to the axes that can be enclosed
inside  the ellipsoid $\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} +
\dfrac{z^2}{c^2} = 1.$
\end{exa}
\begin{solu}
Let $2x$, $2y$, $2z$, be the dimensions of the box. We must maximise
$f(x,y,z)=8xyz$ subject to the constraint $g(x,y,z) =
\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} + \dfrac{z^2}{c^2} - 1. $ Using
Lagrange multipliers,
$$\nabla f(x,y,z) = \lambda \nabla g(x,y,z) \iff \colvec{8yz \\ 8xz \\ 8xy} = \lambda \colvec{2x/a^2 \\ 2y/b^2 \\ 2z/c^2}
\implies 4yz=\lambda \dfrac{x}{a^2},\ 4xz=\lambda \dfrac{y}{b^2},\
4xy=\lambda \dfrac{z}{c^2}.     $$ Multiplying the first inequality
by $x$, the second by $y$, the third by $z$, and adding,
$$ 4xyz=\lambda \dfrac{x^2}{a^2},\ 4xyz=\lambda \dfrac{y^2}{b^2},\
4xyz=\lambda \dfrac{z^2}{c^2},\implies 12xyz = \lambda
\left(\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} + \dfrac{z^2}{c^2}\right)
= \lambda .  $$ Hence
$$\dfrac{\lambda}{3} = \lambda \dfrac{x^2}{a^2} = \lambda \dfrac{y^2}{b^2}= \lambda \dfrac{z^2}{c^2}. $$
If $\lambda = 0$, then $8xyz=0$, which minimises the volume. If
$\lambda \neq 0$, then
$$ x=\dfrac{a}{\sqrt{3}}, \qquad y =\dfrac{b}{\sqrt{3}},\qquad  z = \dfrac{c}{\sqrt{3}},
$$and the maximum value is
$$8xyz \leq 8\dfrac{abc}{3\sqrt{3}}.  $$

\bigskip

{\em Aliter:} Using the AM-GM Inequality,
$$ (x^2y^2z^2)^{1/3} = (abc)^{2/3}\left(\dfrac{x^2}{a^2}\cdot \dfrac{y^2}{b^2}\cdot \dfrac{z^2}{a^2}\right)^{1/3}
\leq (abc)^{2/3} \cdot \dfrac{\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} +
\dfrac{z^2}{c^2} }{3}=\dfrac{1}{3} \implies 8xyz \leq
\dfrac{8}{3\sqrt{3}}(abc).
$$



\end{solu}





\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900

\begin{pro}
A closed box (with six outer faces), has fixed surface area of $S$
square units. Find its maximum volume using Lagrange multipliers.
That is, subject to the constraint $2ab+2bc+2ca=S$, you must
maximise $abc$.
\begin{answer}
 We have
$$\begin{array}{lll} \nabla (abc) = \lambda \nabla (2ab+2bc+2ca-S) & \implies &  \colvec{bc \\ ca \\ ab} = \lambda \colvec{2b+2c \\ 2a+2c \\ 2b+2a} \\
& \implies &  \begin{array}{lll} bc & = & 2\lambda (b+c) \\ ca & = &
2\lambda (a+c)
\\ ab & = & 2\lambda (b+a) \end{array} \\
 \end{array}
$$
By physical considerations, $abc\neq 0$ and so $\lambda \neq 0$.
Hence, by successively dividing the equations,
$$\dfrac{b}{a} = \dfrac{b+c}{c+a} \implies a=b, \quad  \dfrac{c}{b} = \dfrac{a+c}{b+a} \implies b=c, \quad  \dfrac{a}{c} = \dfrac{b+a}{b+c} \implies a=c. $$
Therefore
$$ 2a^2+2a^2+2a^2=S \implies a=\dfrac{\sqrt{S}}{\sqrt{6}}, $$
and the maximum volume is
$$abc = \dfrac{(\sqrt{S})^3}{(\sqrt{6})^3}.  $$


The above result can be simply obtained by using the AM-GM
inequality:
$$ \dfrac{S}{3} = \dfrac{2ab+2bc+2ca}{3} \geq \left((2ab)(2bc)(2ca)\right)^{1/3} = 2(abc)^{2/3} \implies abc \leq \dfrac{S^{3/2}}{6^{3/2}}.$$
Equality happens if $$ 2ab=2bc=2ca \implies a=b=c
=\dfrac{\sqrt{S}}{\sqrt{6}}.
$$
\end{answer}
\end{pro}
\begin{pro}
Consider the problem of finding the closest point $P'$ on the plane
$\Pi : ax+by+cz = d$, $a,b,c$ non-zero constants with $a+b+c\neq d$
to the point $P(1,1,1)$. In this problem, you will do this in three
essentially different ways.
\begin{enumerate}
\item Do this by a geometric argument, arguing the the point $P'$ closest to $P$ on $\Pi$ is on the perpendicular passing through $P$ and $P'$.
\item Do this by means of Lagrange multipliers, by
 minimising a suitable function $f(x,y,z)$ subject to the constraint
 $g(x,y,z)=ax+by+cz-d$.
\item Do this considering the unconstrained  extrema of a suitable
function $h\left(x,y, \dfrac{d-ax-by}{c}\right)$.
\end{enumerate}
\begin{answer}
\noindent
\begin{enumerate}
\item The vector $\colvec{a\\ b \\ c}$ is perpendicular to $\Pi$. Hence,
the equation of the perpendicular passing through $P$ is $$
\colpoint{x\\ y \\ z} = \colpoint{1\\ 1\\ 1}+ t\colvec{a\\ b \\ c}
\implies x=1+ta, \quad y = 1+tb, \quad z=1+tc.
$$The intersection of the line and the plane happens when
$$a(1+at) + b(1+tb) + c(1+tc) = d\implies t = \dfrac{d-a-b-c}{a^2+b^2+c^2}.  $$
Hence $$P' = \colpoint{1 + a\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2} \\ 1
+ b\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2}\\ 1 + c\cdot
\dfrac{d-a-b-c}{a^2+b^2+c^2} }$$ The distance is then
$$\sqrt{\left(a\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2}\right)^2+\left(b\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2}\right)^2+\left(c\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2}\right)^2} $$
 \item  Let $f(x,y,z)=(x-1)^2+(y-1)^2+(z-1)^2$ be the square of the distance from $P$ to a point on the plane and let
 $g(x,y,z)=ax+by+cz-d$. Using Lagrange multipliers,
 $$\nabla f(x,y,z) = \lambda \nabla g(x,y,z) \implies \colvec{2(x-1)\\ 2(y-1)\\ 2(z-1)} = \lambda \colvec{a\\ b \\ c} \implies 2(x-1) = \lambda a, \quad  2(y-1) = \lambda b, \quad  2(z-1) = \lambda c.   $$
Since $(1,1,1)$ is not on the plane and $abc\neq 0$, we gather that
$\lambda \neq 0$. Now,
$$ x=1+\dfrac{\lambda a}{2}, \quad y = 1+\dfrac{\lambda b}{2}, \quad z=1+\dfrac{\lambda c}{2}. $$
Putting these into the equation of the plane,
$$ a\left(1+\dfrac{\lambda a}{2}\right)+ b\left(1+\dfrac{\lambda b}{2}\right)+c\left(1+\dfrac{\lambda c}{2}\right)=d\implies
\lambda = 2\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2}.  $$ Then the
coordinates of $P'$ are
$$ x=1+\dfrac{\lambda a}{2} = 1+ a\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2}, \quad
y=1+\dfrac{\lambda b}{2} = 1+ b\cdot \dfrac{d-a-b-c}{a^2+b^2+c^2},
\quad z=1+\dfrac{\lambda c}{2} = 1+ c\cdot
\dfrac{d-a-b-c}{a^2+b^2+c^2},
    $$as before.
 \item Consider the function
 $$ t(x,y) = (x-1)^2+(y-1)^2+\left(\dfrac{d-ax-by}{c}-1\right)^2, $$
which is the square of the distance from a point $(x,y,z)$ on the
plane to the point $(1,1,1)$.

Now,
$$ \nabla t(x,y)  = \colvec{2(x-1)  -2\dfrac{a}{c}\left(\dfrac{d-ax-by}{c}-1\right) \\ 2(y-1) -2\dfrac{b}{c}\left(\dfrac{d-ax-by}{c}-1\right)}
=\colvec{0\\ 0}$$ which implies
$$x=\dfrac{-b^2-c^2+ab-ad+ac}{a^2+b^2+c^2} = 1+ a\cdot
\dfrac{d-a-b-c}{a^2+b^2+c^2}, \qquad   y
=\dfrac{c^2+a^2-ab+bd-bc}{a^2+b^2+c^2}  = 1+ b\cdot
\dfrac{d-a-b-c}{a^2+b^2+c^2},$$ as before. Substituting this in the
equation of the plane gives the same coordinate of $z$, as before.

\end{enumerate}

\end{answer}

\end{pro}
\begin{pro}
Given that $x, y$ are positive real numbers such that $x^4+81y^4
=36$ find the maximum of $x+3y$.
\begin{answer}

Using CBS,
$$ \dfrac{x+3y}{2} \leq (\dfrac{x^4+81y^4}{2})^{1/4} =
\dfrac{36^{1/4}}{2^{1/4}} \implies x+3y \leq 2^{3/4}\sqrt{6} =
2^{5/4}\sqrt{3}.
$$
\end{answer}
\end{pro}
\begin{pro}
If $x, y, z$ are positive real numbers such that $x^2y^3z
=\dfrac{1}{6^2}$, what is the minimum value of
  $f(x, y, z) = 2x+3y+z$?
  \begin{answer}

Using AM-GM,
$$ \dfrac{1}{6^{1/3}}=\sqrt[6]{x^2y^3z} \leq \dfrac{2x+3y+z}{6}  \implies 2x +3y+z \geq 6^{2/3}.$$

\end{answer}
\end{pro}

\begin{pro}
 Find the maximum and the minimum values of $f(x,y)=x^2+y^2$ subject to the constraint $5x^2 + 6xy + 5y^2 =
8$.\begin{answer} We put $g(x, y) = 5x^2 + 6xy + 5y^2 -8$ and argue
using Lagrange multipliers. We have
$$\nabla f(x,y) = \lambda \nabla g(x,y) \implies \colvec{2x\\ 2y} = \lambda \colvec{10x + 6y\\ 6x + 10y}.
$$ This gives the three equations
$$0= 5(\lambda-1)x + 3y; \quad 0= 3x + 5(\lambda -1)y; \quad 5x^2 + 6xy + 5y^2 =8.
$$The linear system (the first two equations) will have the unique solution $(0,0)$ as long as
$25(\lambda-1)^2-9 \neq 0$, but this solution does not lie on the
third equation. If $25(\lambda-1)^2-9 = 0$, then we deduce that $x =
\pm y$. Substituting this into the third equation we gather that
$10x^2 \pm 6x^2 =8$, resulting in $x = \pm \sqrt{2}$ or $x=\pm
\dfrac{1}{\sqrt{2}}$. Taking into account the third equation, the
feasible values are $(\sqrt{2}, -\sqrt{2})$, $(-\sqrt{2},
\sqrt{2})$,  $(1/\sqrt{2}, 1/\sqrt{2})$, $(-1/\sqrt{2},
-1/\sqrt{2})$ The desired maximum is thus $$f(-\sqrt{2}, \sqrt{2})
=f(\sqrt{2}, -\sqrt{2}) = 4$$ and the minimum is $$f(1/\sqrt{2},
1/\sqrt{2})= f(-1/\sqrt{2}, -1/\sqrt{2}) = 1.$$


{\em Aliter:} Observe that, using AM-GM,
$$ 5x^2 + 6xy + 5y^2 =8\implies x^2+y^2 = \dfrac{8}{5} -\dfrac{6}{5}xy \geq   \dfrac{8}{5} -\dfrac{6}{5}\cdot \dfrac{x^2+y^2}{2}
\implies x^2+y^2 \geq \dfrac{5}{8}\cdot \dfrac{8}{5}=1. $$
\end{answer}
\end{pro}

\begin{pro}
Let $a > 0, b > 0, p > 1$. Maximise $f(x, y) = ax + by$ subject to
the constraint $x^p + y^p = 1.$ \begin{answer} Put $g(x, y) = x^p +
y^p - 1$. We need $a = p\lambda x^{p - 1}$ and $b = p\lambda y^{p -
1}$. Clearly then , $\lambda \neq 0.$ We then have $$x =
\left(\dfrac{a}{\lambda p}\right)^{1/(p - 1)}, \ \ y =
\left(\dfrac{b}{\lambda p}\right)^{1/(p - 1)}. $$ Thus
$$1 = x^p + y^p   =  \left(\dfrac{a}{\lambda
p}\right)^{p/(p - 1)} + \left(\dfrac{b}{\lambda p}\right)^{p/(p -
1)}, $$which gives $$\lambda  = \left(\left(\dfrac{a}{
p}\right)^{p/(p - 1)} + \left(\dfrac{b}{ p}\right)^{p/(p -
1)}\right)^{(p - 1)/p}. $$This gives
$$x  = \dfrac{a^{1/(p - 1)}}{(a^{1/(p - 1)} + b^{1/(p - 1)})^{1/p}}, \ \
y  = \dfrac{b^{1/(p - 1)}}{(a^{1/(p - 1)} + b^{1/(p -
1)})^{1/p}}.$$Since $f$ is non-negative, these points define a
maximum for $f$ and so
$$ax + by \leq \dfrac{a^{p/(p - 1)}}{(a^{1/(p - 1)} + b^{1/(p - 1)})^{1/p}} + \dfrac{b^{p/(p - 1)}}{(a^{1/(p - 1)} + b^{1/(p - 1)})^{1/p}}.$$
\end{answer}
\end{pro}
\begin{pro}
Find the extrema of $$f(x, y, z) = x^2 + y^2 + z^2$$ subject to the
constraint $$( x - 1)^2 + (y - 2)^2 + (z - 3)^2 = 4.$$
\begin{answer} Let $g(x, y, z) = ( x - 1)^2 + (y - 2)^2 + (z - 3)^2
- 4$. We solve
$$\nabla f\colvec{x \\y  \\ z} = \lambda \nabla g\colvec{x \\ y \\ z}$$ for
$x, y, \lambda$. This requires
$$\colvec{2x \\ 2y \\ 2z} = \colvec{2(x - 1)\lambda \\ 2(y - 2)\lambda \\ 2(z - 3)\lambda}.$$
Clearly, $\lambda \neq 1$. This gives $x = \dfrac{-\lambda}{1 -
\lambda}$, $y = \dfrac{-2\lambda}{1 - \lambda}$, and $z =
\dfrac{-3\lambda}{1 - \lambda}$. Substituting into $( x - 1)^2 + (y
- 2)^2 + (z - 3)^2 = 4$, we gather that
$$\left( \dfrac{-\lambda}{1 -
\lambda} - 1\right)^2 + \left( \dfrac{-2\lambda}{1 - \lambda} -
2\right)^2 + \left( \dfrac{-3\lambda}{1 - \lambda} - 3\right)^2 = 4,
$$from where $$\lambda = 1 \pm \dfrac{\sqrt{14}}{2}.$$
This gives the two points
$$(x, y, z) = \left(1 + \dfrac{2}{\sqrt{14}}, 2 + \dfrac{4}{\sqrt{14}}, 3 + \dfrac{6}{\sqrt{14}}\right)$$
and
$$(x, y, z) = \left(1 - \dfrac{2}{\sqrt{14}}, 2 - \dfrac{4}{\sqrt{14}}, 3 - \dfrac{6}{\sqrt{14}}\right).$$
The first point gives an absolute maximum of $18 +
\dfrac{12\sqrt{14}}{7}$ and the second an absolute minimum of $18 -
\dfrac{12\sqrt{14}}{7}$.
\end{answer}
\end{pro}
\begin{pro}
Find the axes of the ellipse $$5x^2+8xy+5y^2=9.$$
\begin{answer}
Observe that the ellipse is symmetric about the origin. Now maximise
and minimise the distance between a point on the ellipse and the
origin. If $a$ and $b$ are the semi-axes, you will find that $2a=2$
and $2b=6$
\end{answer}
\end{pro}
\begin{pro}
Optimise $f(x, y, z) = x + y + z$ subject to $x^2 + y^2 = 2$, and $x
+ z = 1$. \begin{answer} Put $g(x, y, z) = x^2 + y^2 - 2, h(x, y, z)
= x + z - 1$. We must find $\lambda, \delta$ such that
$$\nabla f(x, y, z) = \lambda \nabla g(x, y, z) + \delta \nabla h(x, y,
z),$$which translates into
$$1 = 2\lambda x + \delta, $$
$$1 = 2\lambda y, $$
$$1 = \delta, $$and
$$x^2 + y^2 = 1,$$
$$x + z = 1.$$We deduce that $x = 0, y = \pm \sqrt{2}, z = 1$. We
may shew that $(0, \sqrt{2}, 1)$ yields a maximum and that $(0,
-\sqrt{2}, 1)$ yields a minimum.
\end{answer}
\end{pro}
\begin{pro}

 Let $x, y$ be strictly positive real numbers with $x + y =
1$. What is the maximum value of $x + \sqrt{xy} $? \begin{answer}
One can use Lagrange multipliers here. But perhaps the easiest
approach is to put $y = 1-x$ and maximise $$f(x) = x +
\sqrt{x(1-x)}.$$ For this we have
$$ f'(x) = 0 \implies  1+\dfrac{1-2x}{2\sqrt{x(1-x)}} = 0 \implies x = \dfrac{1}{2}+\dfrac{\sqrt{2}}{4}.$$
Since $$f''(x) =
-\dfrac{(1-2x)^2}{4(x(1-x))^{3/2}}-\dfrac{1}{\sqrt{x(1-x)}} < 0,
$$the value sought is a maximum. This maximum is thus
$$f\left(\dfrac{1}{2}+\dfrac{\sqrt{2}}{4}\right) =  \dfrac{1}{2}+\dfrac{\sqrt{2}}{2}.  $$
\end{answer}
\end{pro}
\begin{pro}
Let $a, b$  be positive real constants. Maximise
$f(x,y)=x^ae^{-x}y^be^{-y}$ on the triangle in $\reals^2$ bounded by
the lines $x\geq 0$, $y \geq 0$, $x+y\leq 1$.
\begin{answer} Claim: the function achieves its maximum on the
boundary of the triangle. To prove  this claim we have to prove that
there are no critical points strictly inside the triangle. For this
we compute the gradient and set it equal to the zero vector:
$$ (\nabla f)(x,y) = \colvec{-ax^{a-1}y^be^{-(x+y)}\\ -bx^ay^{b-1}e^{-(x+y)} } =\colvec{0\\ 0} \implies x=0\ \mathrm{or}\ y=0, $$
which means that the critical points occur on the boundary. Since
the function is identically $0$ for $x=0$ or $y=0$, we only need to
look on the line $x+y=1$ for the maxima. Hence we maximise $f$
subject to the constraint $x+y=1$. Since $x+y=1$, we can see that
$f(x,y)= x^ay^be^{-(x+y)}=x^ay^be^{-1}$ on the line, so the problem
reduces to maximising $h(x,y)= x^ay^b$ subject to the constraint
$x+y=1$. Using Lagrange multipliers,
$$ (\nabla h)(x,y) = \lambda(\nabla g)(x,y) \implies \colvec{ax^{a-1}y^b\\ bx^ay^{b-1}} = \lambda \colvec{1 \\ 1},$$which in
turn $$\implies ax^{a-1}y^b=\lambda = bx^ay^{b-1} \implies ay=bx
\implies ay= b(1-y) \implies y= \dfrac{b}{a+b}, \quad
x=\dfrac{a}{a+b}.$$ Finally,
$$f(x,y) =  x^ay^be^{-(x+y)} \leq
x^ay^be^{-1}\leq
\left(\dfrac{a}{a+b}\right)^a\left(\dfrac{b}{a+b}\right)^be^{-1}.
$$

\end{answer}
\end{pro}

\begin{pro}
Determine the extrema of $f(x,y)=\cos^2x+\cos^2y$ subject to the
constraint $x-y=\dfrac{\pi}{4}$.
\end{pro}
\begin{pro}
Determine the extrema of $f(x,y,z)=x-2y+2z$ subject to the
constraint $x^2+y^2+z^2=1$.
\end{pro}
\begin{pro}Find the points on the curve determined by the equations
$$x^2+xy+y^2-z^2=1,
\quad  x^2+y^2=1  $$which are closest to the origin.
\end{pro}

\begin{pro}
Does there exist a polynomial in two variables with real
coefficients $p(x, y)$ such that $p(x, y)>0$ for all $x$ and $y$ and
that for all real numbers $c>0$ there exists $(x_0,y_0)\in\reals^2$
such that  $p(x_0,y_0)=c$?
\begin{answer}
Try $p(x,y)=(y^2+1)x^2+2xy+1$.
\end{answer}
\end{pro}
\begin{pro}
Maximise $$f(x,y,z)=\log x+\log y+3\log z$$ on the portion of sphere
$x^2+y^2+z^2=5r^2$ which lies on the first octant. Demonstrate using
this that for any positive real numbers  $a, b$ and $c$, there
follows the inequality
$$
abc^3\leq 27\left(\dfrac{a+b+c}{5}\right)^5.
$$
\end{pro}
\end{multicols}

\chapter{Integration}
\section{Differential Forms}
We will now consider integration in several variables. In order to
smooth our discussion, we need to consider the concept of
differential forms.
\begin{df}
Consider $n$ variables $$x_1, x_2, \ldots , x_n$$  in
$n$-dimensional space (used as the names of the axes), and let
$$ \point{a}_j = \colvec{a_{1j} \\ a_{2j} \\ \vdots \\ a_{nj}} \in \reals^n,  \ \ 1 \leq j \leq k,   $$
be $k \leq n$ vectors in $\reals^n$. Moreover, let $\{j_1, j_2,
\ldots , j_k\} \subseteq \{1,2,\ldots, n\}$ be a collection of $k$
sub-indices. An {\em elementary $k$-differential form ($k > 1$)
acting on the vectors $\point{a}_j,$ $ 1\leq j \leq k$} is defined
and denoted by
$$\d{x_{j_1}}\wedge\d{x_{j_2}}\wedge  \cdots\wedge \d{x_{j_k}} (\point{a}_1, \point{a_2}, \ldots , \point{a_k})
= \det \begin{bmatrix} a_{j_11} & a_{j_12} & \cdots & a_{j_1k} \cr
a_{j_21} & a_{j_22} & \cdots & a_{j_2k} \cr \vdots & \vdots &
\cdots & \vdots \cr a_{j_k1} & a_{j_k2} & \cdots & a_{j_kk} \cr
\end{bmatrix}.$$
In other words, $\d{x_{j_1}}\wedge\d{x_{j_2}}\wedge  \cdots\wedge
\d{x_{j_k}} (\point{a}_1, \point{a_2}, \ldots , \point{a_k})$ is the
$x_{j_1}x_{j_2}\ldots  x_{j_k}$ component of the signed $k$-volume
of a $k$-parallelotope in $\reals^n$ spanned by $\point{a}_1,
\point{a_2}, \ldots , \point{a_k}.$
\end{df}
\begin{rem}
By virtue of being a determinant, the wedge product $\wedge$ of
differential forms has the following properties
\begin{dingautolist}{202}
\item {\bf anti-commutativity:} $\d{a} \wedge \d{b} = -\d{b}\wedge
\d{a}$. \item {\bf linearity:} $\d{(a + b)} = \d{a} + \d{b}$.
\item {\bf scalar homogeneity:} if $\lambda \in \reals$, then
$\d{\lambda a} = \lambda \d{a}$. \item {\bf associativity:}
$(\d{a} \wedge \d{b}) \wedge \d{c} = \d{a} \wedge (\d{b} \wedge
\d{c})$.\footnote{Notice that associativity does not hold for the
wedge product of {\em vectors}.}


\end{dingautolist}

\end{rem}
\begin{rem}
Anti-commutativity yields
$$\d{a} \wedge \d{a}  = 0.$$
\end{rem}
\begin{exa}
Consider $$ \point{a} = \colvec{1 \\ 0 \\ -1} \in \reals^3.
$$ Then $$ \d{x}(\point{a}) = \det (1)
 = 1,$$ $$ \d{y}(\point{a}) = \det (0)
 = 0,$$ $$ \d{z}(\point{a}) = \det (-1)
 = -1,$$ are the (signed) 1-volumes (that is, the length) of the
 projections of $\point{a}$ onto the coordinate axes.
\end{exa}

\begin{exa}
In $\reals^3$ we have $\d{x}\wedge \d{y} \wedge \d{x} = 0$, since we
have a repeated variable.
\end{exa}
\begin{exa}
In $\reals^3$ we have $$\d{x}\wedge \d{z}  + 5 \d{z}\wedge \d{x} + 4
\d{x}\wedge \d{y} - \d{y}\wedge \d{x} + 12\d{x}\wedge \d{x} =
-4\d{x}\wedge \d{z} + 5\d{x}\wedge \d{y}.$$
\end{exa}

\begin{rem}
In order to avoid redundancy we will make the convention that if a
sum of two or more terms have the same differential form up to
permutation of the variables, we will simplify the summands and
express the other differential forms in terms of the one
differential form whose indices appear in increasing order.
\end{rem}



\begin{df}
A $0$-differential form in $\reals^n$ is simply a differentiable
function in $\reals^n$.
\end{df}
\begin{df}
A {\em $k$-differential form field in $\reals^n$} is an expression
of the form
$$\omega =  \sum _{ 1 \leq j_1 \leq j_2 \leq \cdots \leq j_k \leq n} a_{j_1j_2\ldots j_k}\d{x_{j_1}} \wedge \d{x_{j_2}} \wedge \cdots \d{x_{j_k}},
$$where the $a_{j_1j_2\ldots j_k}$ are differentiable
functions in $\reals^n$.
\end{df}

\begin{exa}
$$g(x, y, z, w) = x + y^2 + z^3 + w^4$$is a 0-form in $\reals^4$.
\end{exa}
\begin{exa}
An example of a  1-form field in $\reals^3$ is
$$\omega = x\d{x}+ y^2\d{y} + xyz^3\d{z}.$$
\end{exa}
\begin{exa}
An example of a  2-form field in $\reals^3$ is
$$\omega = x^2\d{x}\wedge \d{y} + y^2\d{y} \wedge \d{z} + \d{z} \wedge \d{x}.$$
\end{exa}
\begin{exa}
An example of a  3-form  field in $\reals^3$ is
$$\omega = (x + y + z)\d{x}\wedge \d{y} \wedge \d{z}.$$
\end{exa}
We shew now how to multiply differential forms.
\begin{exa}
The product of the 1-form fields in $\reals^3$
$$\omega_1 = y\d{x}+ x\d{y},$$
$$\omega_2 = -2x\d{x}+ 2y\d{y},$$is
$$\omega_1 \wedge \omega_2 = (2x^2 + 2y^2)\d{x}\wedge \d{y}.$$

\end{exa}

\begin{df}Let $f(x_1, x_2, \ldots , x_n)$ be a $0$-form in
$\reals^n$. The {\em exterior derivative} $\d{f}$ of $f$ is

$$\d{f} = \sum _{i = 1} ^n \dfrac{\partial f}{\partial x_i}\d{x_i}.     $$
Furthermore, if $$ \omega = f(x_1, x_2, \ldots , x_n) \d{x_{j_1}}
\wedge \d{x_{j_2}} \wedge \cdots \wedge \d{x_{j_k}}
$$is a $k$-form in $\reals^n$, the {\em exterior derivative} $\d{\omega}$ of $\omega$ is the $(k +
1 )$-form
$$ \d{\omega} = \d{f(x_1, x_2, \ldots , x_n)} \wedge \d{x_{j_1}} \wedge
\d{x_{j_2}} \wedge \cdots \wedge \d{x_{j_k}}.
                   $$
\end{df}
\begin{exa}
If in $\reals^2$, $\omega = x^3y^4$, then
$${\rm d}(x^3y^4) = 3x^2y^4\d{x}+ 4x^3y^3\d{y}.$$
\end{exa}
\begin{exa}
If in $\reals^2$, $\omega = x^2y\d{x}+ x^3y^4\d{y}$ then
$$\begin{array}{lll}
\d{\omega} & = & {\rm d}(x^2y\d{x}+ x^3y^4\d{y}) \\
& = & (2xy\d{x}+ x^2\d{y})\wedge \d{x}+ (3x^2y^4\d{x}+ 4x^3y^3\d{y})\wedge \d{y} \\
& = & x^2 \d{y} \wedge \d{x}+ 3x^2y^4\d{x}\wedge \d{y} \\
& = & (3x^2y^4 - x^2)\d{x}\wedge \d{y} \\
\end{array}$$
\end{exa}

\begin{exa}
Consider the change of variables $x = u + v, y = uv$. Then
$$\d{x}= \d{u}+\d{v},$$
$$\d{y}  = v\d{u}+ u{\rm d}v,$$whence
$$\d{x}\wedge \d{y} = (u - v) \d{u}\wedge\d{v}.$$
\end{exa}
\begin{exa}
Consider the transformation of coordinates $xyz$ into $uvw$
coordinates given by
$$u = x + y + z,\  v = \dfrac{z}{y + z},\  w = \dfrac{y + z}{x + y + z}.$$
Then
$$\d{u}= \d{x}+ \d{y} + \d{z},$$
$${\rm d}v = -\dfrac{z}{(y + z)^2}\d{y} + \dfrac{y}{(y + z)^2}\d{z},
$$
$$\d{w} =
-\dfrac{y + z}{(x + y + z)^2}\d{x}+ \dfrac{x}{(x + y + z)^2}\d{y} +
\dfrac{x}{(x + y + z)^2}\d{z}.$$ Multiplication gives
$$\everymath{\displaystyle}{\begin{array}{lll}\d{u}\wedge\d{v} \wedge \d{w} & = & \left(-\dfrac{zx}{(y + z)^2(x + y + z)^2} -
\dfrac{y(y + z)}{(y + z)^2(x + y + z)^2} \right. \\
& & \qquad \left. + \dfrac{z(y + z)}{(y + z)^2(x + y + z)^2} -
\dfrac{xy}{(y + z)^2(x + y + z)^2} \right)\d{x}\wedge \d{y} \wedge
\d{z}
\\ &
= &\dfrac{z^2 - y^2 - zx - xy}{(y + z)^2(x + y + z)^2}\d{x}\wedge
\d{y} \wedge \d{z}. \end{array}}$$
\end{exa}


\section{Zero-Manifolds }
\begin{df}
A  {\em $0$-dimensional  oriented manifold of $\reals^n$} is simply
a point $\point{x}\in \reals^n$, with a choice of the  $+$ or $-$
sign. A general oriented $0$-manifold is a union of oriented points.
\end{df}
\begin{df}
Let $M = +\{\point{b}\} \cup -\{\point{a}\}$ be an oriented
$0$-manifold, and let $\omega$ be a $0$-form. Then
$$ \int _M \omega = \omega (\point{b}) - \omega (\point{a}).   $$
\end{df}

\begin{rem}$-\point{x}$ has opposite orientation to $+\point{x}$ and
$$ \int _{-\point{x}} \omega = -\int _{+\point{x}} \omega .   $$
\end{rem}
\begin{exa}
Let $M = -\{(1,0,0)\} \cup +\{(1,2,3)\} \cup
-\{(0,-2,0)\}$\footnote{Do not confuse, say, $-\{(1,0,0)\}$ with
$-(1,0,0) = (-1,0,0)$. The first one means that the point
$(1,0,0)$ is given negative orientation, the second means that
$(-1,0,0)$ is the additive inverse of $(1,0,0)$. } be an oriented
$0$-manifold, and let $\omega = x + 2y + z^2$. Then
$$\int _M\omega = -\omega ((1,0,0)) + \omega (1,2,3) - \omega (0,0,3) = -(1) + (14) - (-4) = 17.         $$
\end{exa}

\section{One-Manifolds}
\begin{df}
A  {\em $1$-dimensional  oriented manifold of $\reals^n$} is simply
an oriented smooth curve  $\Gamma\in \reals^n$, with a choice of a
$+$ orientation if the curve traverses in the direction of
increasing $t$,  or with a choice of a $-$ sign if the curve
traverses in the direction of decreasing $t$. A general oriented
$1$-manifold is a union of oriented curves.
\end{df}
\begin{rem}The curve $-\Gamma$ has opposite orientation to $\Gamma$ and
$$ \int _{-\Gamma} \omega = -\int _\Gamma \omega .   $$If $\vector{f}:\reals ^2 \to \reals
^2$ and if $\d{\vector{r}} = \colvec{\d{x}\\ \d{y}}$, the classical
way of writing this is $$  \int _{\Gamma} \vector{f}\bullet
\d{\vector{r}}.
$$
\end{rem}
We now turn to the problem of integrating $1$-forms.
\begin{exa}
Calculate
$$\int _\Gamma xy\d{x} + (x + y)\d{y}$$ where $\Gamma$ is the parabola
$y = x^2, \ x \in [-1; 2]$ oriented in the positive direction.
\end{exa}
\begin{solu} We parametrise the curve as $x = t, y = t^2$. Then
$$xy\d{x} + (x + y)\d{y} = t^3\d{t} + (t + t^2)\d{t^2} = (3t^3 + 2t^2)\d{t},    $$
whence
$$\begin{array}{lll}
\int _{\Gamma} \omega & = & \int _{-1} ^2 (3t^3 + 2t^2)\d{t} \\
& = & \left[\dfrac{2}{3}t^3  + \dfrac{3}{4}t^4\right] _{-1} ^2\\ &
= & \dfrac{69}{4}.
\end{array}$$
What would happen if we had given the curve above a different
parametrisation? First observe that the curve travels from
$(-1,1)$ to $(2,4)$ on the parabola $y = x^2$. These conditions
are met with the parametrisation $x = \sqrt{t} - 1, y =
(\sqrt{t}-1)^2$, $t\in [0; 9]$. Then
$$\begin{array}{lll}xy\d{x} + (x + y)\d{y} & = & (\sqrt{t}-1)^3\d{(\sqrt{t}-1)} + ((\sqrt{t}-1) + (\sqrt{t}-1)^2)\d{(\sqrt{t}-1)^2}\\
& = & (3(\sqrt{t}-1)^3 + 2(\sqrt{t}-1)^2)\d{(\sqrt{t} - 1)} \\
& = & \dfrac{1}{2\sqrt{t}}(3(\sqrt{t}-1)^3 +
2(\sqrt{t}-1)^2)\d{t},
\end{array}$$ whence
$$\begin{array}{lll}
\int _{\Gamma} \omega & = & \int _{0} ^9 \dfrac{1}{2\sqrt{t}}(3(\sqrt{t}-1)^3 + 2(\sqrt{t}-1)^2)\d{t} \\
& = &
\left[\frac{3t^2}{4}-\frac{7t^{3/2}}{3}+\frac{5t}{2}-\sqrt{t}\right]
_{0} ^9\\[1ex] & = & \dfrac{69}{4},\\
\end{array}$$as before.




To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{LineInt( VectorField( <x*y,x+y> ), Path( <t,t^2>, t=-1..2));}{}%
\end{mapleinput}
\end{maplegroup}



\end{solu}

\begin{rem}
It turns out that if two different parametrisations of the same
curve have the same orientation, then their integrals are equal.
Hence, we only need to worry about finding a suitable
parametrisation.
\end{rem}







\begin{exa}
 Calculate the line integral $$\int _{\Gamma} y\sin x\d{x}+ x\cos y\d{y}  ,$$ where $\Gamma$ is the line
segment from $(0, 0)$ to $(1, 1)$ in the positive direction.
 \end{exa}
 \begin{solu} This line has equation $y = x$, so we choose the parametrisation $x = y = t$. The integral is thus
 $$\begin{array}{lll}
\int _{\Gamma} y\sin x\d{x}+ x\cos y\d{y}  & = & \int _0 ^1
(t\sin t  + t\cos t){\rm d}t \\
& = &  [t(\sin x - \cos t)]_0 ^1 - \int _0 ^1
(\sin t  - \cos t){\rm d}t\\
 & = & 2\sin 1 - 1,
 \end{array}$$upon integrating by parts.



To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{LineInt( VectorField( <y*sin(x),x*cos(y)> ), Line(<0,0>,<1,1>));}{}%
\end{mapleinput}
\end{maplegroup}


\end{solu}
\begin{exa}
 Calculate the path integral $$\int _{\Gamma} \dfrac{x + y}{x^2 + y^2} \ \ \d{y} + \dfrac{x - y}{x^2 +
y^2}\ \ \d{x}$$around the closed square   $\Gamma = ABCD$ with $A
= (1, 1)$, $B = (-1, 1)$, $C = (-1, -1)$, and $D = (1, -1)$ in the
direction $ABCDA$.
 \end{exa}
 \begin{solu}  On $AB$, $y=1, \d{y} = 0$, on $BC$, $x = -1, \d{x} =
 0$, on $CD$, $y = -1, \d{y} = 0$, and on $DA$, $x = 1, \d{x} =
 0$. The integral is thus
 \renewcommand{\arraystretch}{2}
 $$\begin{array}{lll}
\int _{\Gamma} \omega & = & \int _{AB} \omega + \int _{BC} \omega
+
\int _{CD} \omega +  \int _{DA} \omega \\
& = & \int ^{-1} _1 \dfrac{x - 1}{x^2 + 1}\ \d{x}+  \int ^{-1} _1
\dfrac{y - 1}{y^2 + 1}\ \d{y} +  \int _{-1} ^1 \dfrac{x + 1}{x^2 +
1}\ \d{x}+  \int _{-1} ^1 \dfrac{y + 1}{y^2 + 1}\
\d{y} \\
& = & 4 \int _{-1} ^1 \dfrac{1}{x^2 + 1}\ \d{x}\\
& = & 4\arctan x|_{-1} ^1 \\ & = & 2\pi .
 \end{array}$$


To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{LineInt( VectorField( <(x+y)/(x^2+y^2),(x-y)/(x^2+y^2)> ),
LineSegments(<1,1>,<-1,1>,<-1,-1>,<1,-1>,<1,1>));}{}%
\end{mapleinput}
\end{maplegroup}



 \end{solu}
 \begin{rem}
When the integral is along a closed path, like in the preceding
example, it is customary to use the symbol $\ \oint _\Gamma$
rather than $\int_\Gamma$. The positive direction of integration
is that sense that when traversing the path, the area enclosed by
the curve is to the left of the curve.
\end{rem}

\begin{exa}
 Calculate the path integral $$\oint _{\Gamma}  x^2\d{y} + y^2\d{x},$$where $\Gamma$ is the ellipse
 $\dis{9x^2 + 4y^2 = 36}$
traversed once in the positive sense. \end{exa} \begin{solu}
Parametrise the ellipse as $x = 2\cos t, y = 3\sin t, t\in [0;
2\pi]$. Observe that when traversing this closed curve, the area of
the ellipse is on the left hand side of the path, so this
parametrisation traverses the curve in the positive sense. We have
$$\begin{array}{lll}
\oint _{\Gamma} \omega & = & \int _0 ^{2\pi} ((4\cos^2t)(3\cos t)
+
(9\sin t)(-2\sin t) ){\rm d}t \\
& = & \int _0 ^{2\pi} (12\cos^3t - 18\sin^3t) {\rm d}t \\
& = & 0.
\end{array}$$



To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{LineInt( VectorField( <y^2,x^2> ),Ellipse(9*x^2 + 4*y^2 -36));}{}%
\end{mapleinput}
\end{maplegroup}


\end{solu}



\begin{df}
 Let $\Gamma$ be a smooth curve. The integral $$\int \limits_\Gamma f(\point{x}) \norm{\d{\point{x}}}
 $$is called the {\em path integral of $f$ along $\Gamma$.}
\end{df}
\begin{exa}\label{exa:int_along_a_length}
Find $\int \limits_\Gamma x \norm{\d{\point{x}}} $ where $\Gamma$
is the triangle starting at  $A:(-1,-1)$ to $B:(2,-2)$, and ending
in $C:(1,2)$.
\end{exa}\begin{solu} The lines passing through the given  points have
equations $L_{AB}: y = \dfrac{-x - 4}{3}$,  and $L_{BC}: y = -4x +
6$. On $L_{AB}$ $$ x\norm{\d{\point{x}}} = x\sqrt{(\d{x})^2 +
(\d{y})^2} = x\sqrt{1 + \left(-\dfrac{1}{3}\right)^2}\d{x} =
\dfrac{x\sqrt{10}\d{x}}{3},
$$and on $L_{BC}$
$$ x\norm{\d{\point{x}}} = x\sqrt{(\d{x})^2 +
(\d{y})^2} = x(\sqrt{1 + \left(-4\right)^2})\d{x} =
x\sqrt{17}\d{x}.
$$Hence
$$\begin{array}{lll}\int \limits_\Gamma x \norm{\d{\point{x}}} & = & \int \limits_{L_{AB}} x \norm{\d{\point{x}}}  + \int \limits_{L_{BC}} x \norm{\d{\point{x}}}  \\
& = & \int _{-1} ^2  \dfrac{x\sqrt{10}\d{x}}{3} + \int _2 ^1
x\sqrt{17}\d{x} \\
& = &  \dfrac{\sqrt{10}}{2}  - \dfrac{3\sqrt{17}}{2}.
\end{array}
$$



To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{PathInt( x, [x,y]=LineSegments( <-1,-1>, <2,-2>,<1,2> ) );}{}%
\end{mapleinput}
\end{maplegroup}


\end{solu}

\vspace*{2cm}
\begin{figure}[htpb]

$$ \psset{unit=2pc}\renewcommand{\pshlabel}[1]{{\tiny
#1}}
\renewcommand{\psvlabel}[1]{{\tiny #1}} \psaxes(0,0)(-3,-3)(3,3)
\psdots[dotscale=1, dotstyle=*](-1,-1)(2,-2)(1,2)
\psline(-1,-1)(2,-2)(1,2)
$$ \vspace*{2cm}\hangcaption{Example \ref{exa:int_along_a_length}. } \label{fig:int_along_a_length}
\end{figure}

\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Consider $\int _C x\d{x}+y\d{y}$ and $\dint _C xy
\norm{\d{\point{x}}} $.
\begin{enumerate}
\item  Evaluate $\int _C x\d{x}+y\d{y}$ where $C$ is the straight line path that starts at $(-1,0)$ goes to $(0,1)$ and ends at $(1,0)$, by parametrising this
path. Calculate also $\int _C xy \norm{\d{\point{x}}} $ using this
parametrisation.
\item  Evaluate $\int _C x\d{x}+yd{y}$ where $C$ is the semicircle that starts at $(-1,0)$ goes to $(0,1)$ and ends at $(1,0)$, by parametrising this
path. Calculate also $\int _C xy \norm{\d{\point{x}}} $ using this
parametrisation.
\end{enumerate}
\begin{answer}
\noindent
\begin{enumerate}
\item  Let $L_1: y =x+1$, $L_2: -x+1$. Then
$$
\begin{array}{lll}
\int _C x\d{x}+y\d{y} & = & \int _{L_1} x\d{x}+y\d{y}+\int _{L_2}
x\d{x}+y\d{y}\\
& = & \int _{-1} ^1 x\d{x} (x+1)\d{x} + \int _0 ^1 x\d{x}
-(-x+1)\d{x}\\
& = & 0.
\end{array}
$$
Also, both on $L_1$ and on $L_2$ we have
$\norm{\d{\point{x}}}=\sqrt{2}\d{x}$, thus
$$
\begin{array}{lll}
\int _C xy \norm{\d{\point{x}}}& = & \int _{L_1}xy
\norm{\d{\point{x}}}+\int _{L_2}
xy \norm{\d{\point{x}}}\\
& = & \sqrt{2}\int _{-1} ^1 x(x+1)\d{x} - \sqrt{2}\int _0 ^1 x(-x+1)\d{x}\\
& = & 0.
\end{array}
$$

\item We put $x=\sin t$, $y = \cos t$, $t\in\lcrc{-\frac{\pi}{2}}{\frac{\pi}{2}}$. Then

$$
\begin{array}{lll}
\int _C x\d{x}+y\d{y} & = & \int _{-\pi/2} ^{\pi/2}
(\sin t)(\cos t)\d{t}-(\cos t)(\sin t)\d{t}\\
& = & 0.
\end{array}
$$
Also, $\norm{\d{\point{x}}}=\sqrt{(\cos t)^2+(-\sin
t)^2}\d{t}=\d{t}$, and thus
$$
\begin{array}{lll}
\int _C xy \norm{\d{\point{x}}}& = & \int _{-\pi/2} ^{\pi/2} (\sin
t)(\cos t) \d{t}\\
& = & \dfrac{(\sin t)^2}{2}\Big| _{-\pi/2} ^{\pi/2} \\
& = & 0.
\end{array}
$$
\end{enumerate}
\end{answer}
\end{pro}


\begin{pro}
\label{pro:path-integral}  Find $\dint _{\Gamma} x\d{x} + y\d{y} $
where $\Gamma$ is the path shewn in figure \ref{fig:path-integral},
starting at  $O(0,0)$ going on a straight line to $A\left(4\cos
\tfrac{\pi}{6}, 4\sin \tfrac{\pi}{6}\right)$ and continuing on an
arc of a circle to $B\left(4\cos \tfrac{\pi}{5}, 4\sin
\tfrac{\pi}{5}\right)$.
\begin{answer}
Let $\Gamma _1$ denote the straight line segment path from $O$ to
$A=(2\sqrt{3},2)$ and $\Gamma _2$ denote the arc of the circle
centred at $(0,0)$ and radius $4$ going counterclockwise from
$\theta=\dfrac{\pi}{6}$ to  $\theta=\dfrac{\pi}{5}$.

\bigskip

Observe that the Cartesian equation of the line  $\line{OA}$ is $y
=\dfrac{x}{\sqrt{3}}$. Then on $\Gamma _1$
$$x\d{x} + y\d{y} = x\d{x}+ \dfrac{x}{\sqrt{3}}\d{\dfrac{x}{\sqrt{3}}} = \dfrac{4}{3}x\d{x}.$$
Hence $$\dint _{\Gamma _1} x\d{x} + y\d{y} = \dint _0 ^{2\sqrt{3}}
\dfrac{4}{3}x\d{x} = 8.
$$

On the arc of the circle we may put $x=4\cos \theta$, $y = 4\sin
\theta$ and integrate from $\theta = \dfrac{\pi}{6}$ to $\theta =
\dfrac{\pi}{5}$. Observe that there
$$ x\d{x} + y\d{y} = (\cos \theta )\d{\cos \theta}  +(\sin\theta)\d{\sin \theta} = -\sin\theta\cos\theta\d{\theta}+\sin\theta\cos\theta\d{\theta}=0,$$
and since the integrand is $0$, the integral will be zero.

\bigskip

Assembling these two pieces,
$$\dint _{\Gamma} x\d{x} + y\d{y} = \dint _{\Gamma _1} x\d{x} + y\d{y} +\dint _{\Gamma _2} x\d{x} + y\d{y}=8+0=8.    $$


\bigskip

To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{LineInt( VectorField( <x,y> ), Line( <0,0>, <2*sqrt(3),2> ))}{}%
\mapleinline{inert}{1d}{+LineInt( VectorField( <x,y> ), Arc(Circle( <0,0>, 4), Pi/6, Pi/5) );}{}%
\end{mapleinput}
\end{maplegroup}
\end{answer}
\end{pro}
\vspace{1cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\pstGeonode[PosAngle={-90,0,90}](0,0){O}(4;30){A}(4;72){B}
\pstLineAB[linewidth=2pt]{O}{A}\pstArcOAB[linewidth=2pt]{O}{A}{B}
\vspace{1cm}\footnotesize\hangcaption{Problems
\ref{pro:path-integral} and \ref{pro:path-integral2}.}
\label{fig:path-integral}
\end{figurehere}
\begin{pro}
 \label{pro:path-integral2}  Find $\dint _{\Gamma} x\norm{\d{\point{x}}} $ where $\Gamma$ is the
path shewn in figure \ref{fig:path-integral}.

\begin{answer}
Using the parametrisations from the solution of  problem
\ref{pro:path-integral2}, we find on $\Gamma _1$ that
$$ x\norm{\d{\point{x}}} = x\sqrt{(\d{x})^2+ (\d{y})^2} =x\sqrt{1+\dfrac{1}{3}}\d{x}=\dfrac{2}{\sqrt{3}}x\d{x},  $$
whence
$$ \dint _{\Gamma _1} x\norm{\d{\point{x}}} = \dint _0 ^{2\sqrt{3}}
\dfrac{2}{\sqrt{3}}x\d{x} = 4\sqrt{3}.  $$ On $\Gamma _2$ that
$$ x\norm{\d{\point{x}}} = x\sqrt{(\d{x})^2+ (\d{y})^2} =16\cos \theta\sqrt{\sin^2\theta + \cos^2\theta}\d{\theta}=16\cos\theta\d{\theta},  $$
whence
$$ \dint _{\Gamma _2} x\norm{\d{\point{x}}} = \dint _{\pi /6} ^{\pi /5}
16\cos\theta\d{\theta} = 16\sin \dfrac{\pi}{5} -16\sin
\dfrac{\pi}{6}= 4\sin \dfrac{\pi}{5}-8.
$$Assembling these we gather that
$$ \dint _{\Gamma } x\norm{\d{\point{x}}} =\dint _{\Gamma _1} x\norm{\d{\point{x}}}+\dint _{\Gamma _2}
x\norm{\d{\point{x}}}= 4\sqrt{3}-8+16\sin \dfrac{\pi}{5}.$$


\bigskip


To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{PathInt(x, [x,y]= Line( <0,0>, <2*sqrt(3),2> ))}{}%
\mapleinline{inert}{1d}{+PathInt(x, [x,y]=Arc(Circle( <0,0>, 4), Pi/6, Pi/5) );}{}%
\end{mapleinput}
\end{maplegroup}

Maple gives $16\cos\dfrac{3\pi}{10}$ rather than our $16\sin
\dfrac{\pi}{5}$. To check that these two are indeed the same, use
the code
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{is(16*cos(3*Pi/10)=16*sin(Pi/5));}{}%
\end{mapleinput}
\end{maplegroup}
which returns \verb+true+.
\end{answer}
\end{pro}
\begin{pro}
Find $\oint _\Gamma  z\d{x} + x\d{y} + y\d{z}$ where $\Gamma$ is the
intersection of the sphere $x^2 + y^2 + z^2 = 1$ and the plane $x +
y = 1$, traversed in the positive direction. \begin{answer} The
curve lies on the sphere, and to parametrise this curve, we dispose
of one of the variables, $y$ say, from where $y = 1-x$ and $x^2 +
y^2 + z^2 = 1$ give
$$\begin{array}{lll}x^2 + (1 - x)^2 + z^2 = 1  & \implies & 2x^2 -2x + z^2 = 0\\ & \implies & 2\left(x - \frac{1}{2}\right)^2   + z^2 = \frac{1}{2}\\
& \implies & 4\left(x - \frac{1}{2}\right)^2 + 2z^2 =
1.\end{array}$$ So we now put $$x = \frac{1}{2} +  \frac{\cos t}{2},
\ \ \ z = \dfrac{\sin t}{\sqrt{2}},\ \ \  y = 1 - x =
\frac{1}{2}-\frac{\cos t}{2}.
$$We must integrate on the side of the plane that can be viewed
from   the point $(1,1,0)$ (observe that the vector  $\colvec{1\\ 1 \\
0}$ is normal to the plane). On the $zx$-plane, $4\left(x -
\frac{1}{2}\right)^2 + 2z^2 = 1$ is an ellipse. To obtain a positive
parametrisation we must integrate from $t = 2\pi$ to $t = 0$ (this
is because when you look at the ellipse from the point $(1,1,0)$ the
positive $x$-axis is to your left, and not your right).   Thus
$$\begin{array}{lll}\oint _\Gamma  z\d{x} + x\d{y} + y\d{z} & = &
\int ^0 _{2\pi} \dfrac{\sin
t}{\sqrt{2}} \d{\left( \frac{1}{2} + \frac{\cos t}{2}\right)}  \\
& & + \int ^0 _{2\pi} \left( \frac{1}{2} + \frac{\cos
t}{2}\right)\d{\left(\frac{1}{2} -\frac{\cos t}{2}\right)} \\ & & +
\int ^0 _{2\pi} \left(\frac{1}{2} -\frac{\cos
t}{2}\right)\d{\left(\dfrac{\sin t}{\sqrt{2}}\right)} \\
& = & \int ^0 _{2\pi} \left(\frac{\sin t}{4}+ \frac{\cos
t}{2\sqrt{2}}+ \frac{\cos t\sin t}{4}  -
\frac{1}{2\sqrt{2}}\right)\ \d{t}  \\
& = & \dfrac{\pi}{\sqrt{2}}.
\end{array}$$

\end{answer}
\end{pro}

\end{multicols}



\section{Closed and Exact Forms}
\begin{lem}[Poincar\'{e} Lemma] \label{thm:poincare_lemma}
If $\omega$ is a $p$-differential form of continuously
differentiable functions  in $\reals^n$ then $$ \d{(\d{\omega})} =
0.
$$
\end{lem}
\begin{pf}
We will prove this  by induction on $p$. For $p= 0$ if
$$\omega = f(x_1, x_2, \ldots , x_n)  $$
then
$$\d{\omega} = \sum _{k = 1} ^n \frac{\partial f}{\partial x_k}\d{x_k}  $$
and
$$\begin{array} {lll}\d{(\d{\omega})} & =  & \sum _{k = 1} ^n \d{\left(\frac{\partial f}{\partial x_k}\right)}\wedge\d{x_k} \\
& = &  \sum _{k = 1} ^n \left(\sum _{j = 1} ^n \frac{\partial ^2
f}{\partial x_j\partial x_k} \wedge \d{x_j}\right)\wedge\d{x_k}\\
& = &  \sum _{1 \leq j \leq k \leq n} ^n  \left(\frac{\partial ^2
f}{\partial x_j\partial x_k} - \frac{\partial ^2
f}{\partial x_k\partial x_j} \right)\d{x_j}\wedge\d{x_k}\\
& = & 0,
\end{array}$$
since $\omega$ is continuously differentiable and so the mixed
partial derivatives are equal. Consider now an arbitrary $p$-form,
$p>0$. Since such a form can be written as
$$\omega =  \sum _{ 1 \leq j_1 \leq j_2 \leq \cdots \leq j_p \leq n} a_{j_1j_2\ldots j_p}\d{x_{j_1}} \wedge \d{x_{j_2}} \wedge \cdots \d{x_{j_p}},
$$where the $a_{j_1j_2\ldots j_p}$ are continuous differentiable
functions in $\reals^n$, we have
$$\begin{array}{lll}\d{\omega}  & = &   \sum _{ 1 \leq j_1 \leq j_2 \leq \cdots \leq j_p \leq n} \d{a_{j_1j_2\ldots j_p}} \wedge \d{x_{j_1}} \wedge \d{x_{j_2}} \wedge \cdots
\d{x_{j_p}}\\
& = &  \sum _{ 1 \leq j_1 \leq j_2 \leq \cdots \leq j_p \leq n}
\left(\sum _{i=1} ^n \frac{\partial a_{j_1j_2\ldots j_p}}{\partial
x_i}\d{x_i}\right) \wedge \d{x_{j_1}} \wedge \d{x_{j_2}} \wedge
\cdots \d{x_{j_p}}, \end{array}
$$
it is enough to prove that for each summand
$$\d{\left(\d{a} \wedge\d{x_{j_1}} \wedge \d{x_{j_2}} \wedge \cdots \d{x_{j_p}}\right)} = 0.$$
But $$\begin{array}{lll}\d{\left(\d{a}\wedge\d{x_{j_1}} \wedge
\d{x_{j_2}} \wedge \cdots \d{x_{j_p}}\right)}  & = &
\d{\d{a}}\wedge \left(\d{x_{j_1}} \wedge \d{x_{j_2}} \wedge \cdots
\d{x_{j_p}}\right) \\ & & \qquad  + \d{a}\wedge
\d{\left(\d{x_{j_1}} \wedge \d{x_{j_2}} \wedge \cdots
\d{x_{j_p}}\right)}\\ & = & \d{a}\wedge \d{\left(\d{x_{j_1}}
\wedge \d{x_{j_2}} \wedge \cdots \d{x_{j_p}}\right)},
\end{array} $$ since $\d{\d{a}} = 0$ from the case $p=0$. But an
independent induction argument proves that
$$  \d{\left(\d{x_{j_1}}
\wedge \d{x_{j_2}} \wedge \cdots \d{x_{j_p}}\right)}=0,$$
completing the proof.
\end{pf}


\begin{df}
A differential form $\omega$ is said to be {\em exact} if there is
a continuously differentiable function $F$ such that
$${\rm d}F = \omega .$$
\end{df}

\begin{exa}
The differential form $$x\d{x}+ y\d{y} $$is exact, since
$$x\d{x}+ y\d{y} = {\rm d}\left(\dfrac{1}{2}(x^2 + y^2)\right) . $$
\end{exa}
\begin{exa}
The differential form $$y\d{x}+ x\d{y} $$is exact, since
$$y\d{x}+ x\d{y} = {\rm d}\left(xy\right) . $$
\end{exa}

\begin{exa}
The differential form $$\dfrac{x}{x^2 + y^2}\d{x}+ \dfrac{y}{x^2 +
y^2}\d{y}
$$is exact, since
$$\dfrac{x}{x^2 + y^2}\d{x}+ \dfrac{y}{x^2 + y^2}\d{y} = {\rm d}\left(\dfrac{1}{2}\log_e (x^2 + y^2)\right) . $$
\end{exa}
\begin{rem}
Let $\omega = \d{F}$ be an exact form. By the Poincar\'{e} Lemma
Theorem \ref{thm:poincare_lemma}, $\d{\omega} = \d{\d{F}} = 0$.  A
result of Poincar\'{e} says that for certain domains (called {\em
star-shaped domains}) the converse is also true, that is, if
$\d{\omega} = 0$ on a star-shaped domain then $\omega$ is exact.
\end{rem}\begin{exa} Determine whether the differential form $$\omega =
\dfrac{2x(1 - e^y)}{(1 + x^2)^2}\d{x}+ \dfrac{e^y}{1 + x^2}\d{y}$$
is exact.
\end{exa}
\begin{solu} Assume there is a function $F$ such that
$${\rm d}F = \omega .$$By the Chain Rule
$${\rm d}F = \dfrac{\partial F}{\partial x}\d{x}+ \dfrac{\partial F}{\partial y}\d{y} .$$
This demands that
$$\dfrac{\partial F}{\partial x} = \dfrac{2x(1 -
e^y)}{(1 + x^2)^2},$$
$$\dfrac{\partial F}{\partial y} = \dfrac{e^y}{1 + x^2}.$$
We have a choice here of integrating either the first, or the
second expression. Since integrating the second expression (with
respect to $y$) is easier, we find
$$F(x, y) = \dfrac{e^y}{1 + x^2} + \phi (x),$$where $\phi (x)$ is a
function depending only on $x$. To find it, we differentiate the
obtained expression for $F$ with respect to $x$ and find
$$\dfrac{\partial F}{\partial x} = -\dfrac{2xe^y}{(1 + x^2)^2} + \phi '(x).$$Comparing this with our first
expression for $\dfrac{\partial F}{\partial x}$, we find
$$\phi '(x) = \dfrac{2x}{(1 + x^2)^2}, $$that is
$$\phi (x) = -\dfrac{1}{1 + x^2} + c,$$where $c$ is a constant.
We then take
$$F(x, y) =  \dfrac{e^y - 1}{1 + x^2} + c.$$
\end{solu}
\begin{exa}
Is there a continuously differentiable function such that $$ \d{F}
= \omega = y^2z^3 \d{x} + 2xyz^3\d{y} + 3xy^2z^2\d{z}\ \ ?
$$
\end{exa}
\begin{solu} We have $$\begin{array}{lll}\d{\omega} &  = & (2yz^3\d{y} +
3y^2z^2\d{z})\wedge \d{x} \\ & &  + (2yz^3\d{x} + 2xz^3\d{y} +
6xyz^2\d{z})\wedge \d{y} \\ & & +
(3y^2z^2\d{x} + 6xyz^2\d{y} + 6xy^2z\d{z})\wedge\d{z} \\
&  = &  0, \end{array}$$ so this form is exact in a star-shaped
domain. So put $$ \d{F} =  \frac{\partial F}{\partial x}\d{x} +
\frac{\partial F}{\partial y}\d{y} + \frac{\partial F}{\partial
z}\d{z} = y^2z^3 \d{x} + 2xyz^3\d{y} + 3xy^2z^2\d{z}.
$$Then $$\frac{\partial F}{\partial x} = y^2z^3 \implies F = xy^2z^3 + a(y,z), $$
$$\frac{\partial F}{\partial y} =  2xyz^3\implies F = xy^2z^3 + b(x,z), $$
$$\frac{\partial F}{\partial z} = 3xy^2z^2 \implies F = xy^2z^3 + c(x,y), $$
Comparing these three expressions for $F$, we obtain $F(x,y,z) =
xy^2z^3$.
\end{solu}













 We have the following equivalent of the Fundamental
Theorem of Calculus.
\begin{thm}\label{thm:exact_forms}
Let $U \subseteq \reals^n$ be an open set. Assume $\omega = {\rm
d}F$ is an exact form, and $\Gamma$ a path in $U$ with starting
point $A$ and endpoint $B$. Then
$$\int _{\Gamma} \omega = \int _{A} ^B {\rm d}F = F(B) - F(A).
$$In particular, if $\Gamma $ is a simple closed path, then
$$\oint _{\Gamma} \omega = 0.$$
\end{thm}
\begin{exa}
Evaluate the integral $$\oint\limits_\Gamma \dfrac{2x}{x^2 +
y^2}\d{x} + \dfrac{2y}{x^2 + y^2}\ \d{y}
$$ where $\Gamma$ is the closed polygon with vertices at $A=(0,0)$, $B=(5,0)$, $C=(7,2)$, $D= (3,2)$, $E=(1,1)$, traversed in the order
$ABCDEA$.
\end{exa}
\begin{solu}Observe that $$ \d{\left(\dfrac{2x}{x^2 + y^2}\d{x} +
\dfrac{2y}{x^2 + y^2}\ \d{y}\right)}   = -\dfrac{4xy}{(x^2 +
y^2)^2}\d{y} \wedge \d{x}  -\dfrac{4xy}{(x^2 + y^2)^2}\d{x} \wedge
\d{y} =0,
$$and so the form is exact in a start-shaped domain. By virtue of Theorem
\ref{thm:exact_forms}, the integral is $0$.
\end{solu}
\begin{exa}
Calculate the path integral $$\oint _{\Gamma} (x^2 - y)\d{x}+ (y^2 -
x)\d{y},$$ where $\Gamma$ is a loop of  $\dis{ x^3 + y^3 - 2xy = 0}$
traversed once in the positive sense.
\end{exa}\begin{solu} Since
$$\dfrac{\partial}{\partial y} (x^2 - y) = -1 =
\dfrac{\partial}{\partial x} (y^2 - x), $$the form is exact, and
since this is a closed simple path, the integral is $0$.
\end{solu}







\section{Two-Manifolds}
\begin{df}
A  {\em $2$-dimensional  oriented manifold of $\reals^2$} is simply
an open set  (region) $D\in \reals^2$, where the $+$ orientation is
counter-clockwise and the $-$  orientation is clockwise. A general
oriented $2$-manifold is a union of open sets.
\end{df}
\begin{rem}The region $-D$ has opposite orientation to $D$ and
$$ \int _{-D} \omega = -\int _D \omega .   $$ We will often write
$$\int _Df(x,y)\d{A} $$ where $\d{A}$ denotes the {\em area
element}.
\end{rem}

\begin{rem}
In this section, unless otherwise noticed, we will choose the
positive orientation for the regions considered. This corresponds to
using the area form $\d{x} \d{y}$.
\end{rem}
Let $D \subseteq \reals^2$. Given a function $f:D \rightarrow
\reals$, the integral
$$\dint \limits_D f\d{A} $$is the sum of all the values of $f$ restricted to $D$. In particular,
$$\dint \limits_D \d{A}$$is the area of $D$.

\bigskip
In order to evaluate double integrals, we need the following.
\begin{thm}[Fubini's Theorem] Let $D = [a; b]\times [c; d]$, and
let $f:A  \rightarrow \reals$ be continuous. Then
$$\dint \limits_D f\d{A}  = \int _a ^b \left(\int _c ^d f(x, y) \d{y}\right) \d{x}
= \int _c ^d \left(\int _a ^b f(x, y) \d{x}\right) \d{y}$$
\end{thm}
Fubini's Theorem allows us to convert the double integral into
iterated (single) integrals.
\begin{exa}
$$\begin{array}{lll}
\dint _{[0; 1]\times [2; 3]} xy \d{A} & = &
\int _0 ^1 \left(\int _2 ^3 xy \d{y}\right)\d{x}\\
& = & \int _0 ^1 \left(\left[\dfrac{xy^2}{2}\right]_2 ^3\right)
\d{x}\\
& = & \int _0 ^1 \left(\dfrac{9x}{2} - 2x \right) \d{x}\\
& = & \left[ \dfrac{5x^2}{4} \right] _0 ^1 \\
& = & \dfrac{5}{4}.
\end{array}$$
Notice that if we had integrated first with respect to $x$ we
would have obtained the same result:
$$\begin{array}{lll}
\int _2 ^3 \left(\int _0 ^1 xy \d{x}\right)\d{y}& = & \int _2 ^3
\left(\left[\dfrac{x^2y}{2}\right]_0 ^1\right)
\d{y}\\
& = & \int _2 ^3 \left(\dfrac{y}{2} \right) \d{x}\\
& = & \left[ \dfrac{y^2}{4} \right] _2 ^3 \\
& = & \dfrac{5}{4}.
\end{array}$$
Also, this integral is ``factorable into $x$ and $y$ pieces''
meaning that
$$\begin{array}{lll}
\dint _{[0; 1]\times [2; 3]} xy \d{A} & = & \left(\int _0 ^1
x\d{x}\right)\left(\int _2 ^3 y\d{y}\right)
\\
& = & \left(\dfrac{1}{2}\right)\left(\dfrac{5}{2}\right) \\
& = & \dfrac{5}{4}
\end{array}$$


To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{int(x*y, [x,y]=Region(0..1,2..3));}{}%
\end{mapleinput}
\end{maplegroup}

\end{exa}
\begin{exa}\label{exa:double_int_for_change1}
We have $$\begin{array}{lll}\int _3 ^4  \int_0 ^1 (x + 2y)(2x + y) \
\d{x} \d{y} & = & \int _3 ^4 \int _0 ^1 (2x^2+5xy+2y^2) \
\d{x}\d{y} \\
& = &  \int_3 ^4 \left(\frac{2}{3}+\frac{5}{2}y+2y^2\right)  \ \d{y} \\
& = & \frac{409}{12}.
\end{array}$$


To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{int((x + 2*y)*(2*x + y), [x,y]=Region(3..4,0..1));}{}%
\end{mapleinput}
\end{maplegroup}
\end{exa}

In the cases when the domain of integration is not a rectangle, we
decompose so that, one variable is kept constant.
\begin{exa}\label{exa:int_triag_region_1}
Find $\dint \limits_D xy \ \d{x}\d{y} $ in the triangle with
vertices $A:(-1,-1)$, $B:(2,-2)$, $C:(1,2)$. \end{exa}\begin{solu}
The lines passing through the given  points have equations $L_{AB}:
y = \dfrac{-x - 4}{3}$, $L_{BC}: y = -4x + 6$, $L_{CA}: y =
\dfrac{3x + 1}{2}$. Now, we draw the region {\em carefully}. If we
integrate first with respect to $y$, we must divide the region as in
figure \ref{fig:int_triag_region_1}, because there are two upper
lines which the upper value of $y$ might be. The lower point of the
dashed line is $(1, -5/3)$.  The integral is thus $$ \int _{-1} ^1 x
\left(\int _{(-x - 4)/3} ^{(3x + 1)/2} y \ \d{y}\right)\d{x}+ \int
_{1} ^2 x \left(\int _{(-x - 4)/3} ^{-4x + 6} y \ \d{y}\right)\d{x}=
-\dfrac{11}{8}.
$$
If we integrate first with respect to $x$, we must divide the region
as in figure \ref{fig:int_triag_region_1.1}, because there are two
left-most lines which the left value of $x$ might be. The right
point of the dashed line is $(7/4, -1)$. The integral is thus
$$ \int _{-2} ^{-1} y \left(\int _{-4 - 3y} ^{(6 - y)/4} x \ \d{x}\right)\d{y} +
\int _{-1} ^2 y \left(\int _{(2y - 1)/3} ^{(6 - y)/4} x \
\d{x}\right)\d{y} = -\dfrac{11}{8}.
$$

To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{int(x*y, [x,y]=Triangle(<-1,-1>,<2,-2>,<1,2>);}{}%
\end{mapleinput}
\end{maplegroup}

\end{solu}


\vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{4.5cm}
$$ \psset{unit=1.5pc}\renewcommand{\pshlabel}[1]{{\tiny
#1}}
\renewcommand{\psvlabel}[1]{{\tiny #1}} \psaxes(0,0)(-3,-3)(3,3)
\psdots[dotscale=1, dotstyle=*](-1,-1)(2,-2)(1,2)(1,-1.66)
\psline(-1,-1)(2,-2)(1,2)(-1,-1)
\psline[linestyle=dashed](1,2)(1,-1.66)
$$ \vspace*{2cm}\hangcaption{Example \ref{exa:int_triag_region_1}. Integration order $\d{y}\d{x}$.} \label{fig:int_triag_region_1}
\end{minipage}\hfill\begin{minipage}{4.5cm}     $$ \psset{unit=1.5pc}\renewcommand{\pshlabel}[1]{{\tiny #1}}
\renewcommand{\psvlabel}[1]{{\tiny #1}} \psaxes(0,0)(-3,-3)(3,3)
\psdots[dotscale=1, dotstyle=*](-1,-1)(2,-2)(1,2)(1.75,-1)
\psline(-1,-1)(2,-2)(1,2)(-1,-1)
\psline[linestyle=dashed](-1,-1)(1.75,-1)
$$\vspace*{2cm}\hangcaption{Example \ref{exa:int_triag_region_1}. Integration order $\d{x}\d{y}$.} \label{fig:int_triag_region_1.1}
     \end{minipage}
     \hfill
\begin{minipage}{4.5cm}
$$\psset{unit=1pc}
\renewcommand{\pshlabel}[1]{{\tiny
#1}}
\renewcommand{\psvlabel}[1]{{\tiny
#1}}\rput(-4,0){\psaxes(0,0)(-.5,-.5)(10,7)\psline(6,3)(8,4)(9,6)(7,5)(6,3)
\psline[linestyle=dashed](6.5,4)(8,
4)\psline[linestyle=dashed](7,5)(8.5,5)\psdots[dotstyle=*,dotscale=.8](6,3)(8,4)(7,5)(9,6)(6.5,4)(8.5,5)}
$$\vspace*{1cm} \footnotesize \hangcaption{Example \ref{exa:int_parall1}.} \label{fig:int_parall1}
\end{minipage}\end{figure}


\begin{exa}\label{exa:int_parall1}
Consider the region inside the parallelogram $P$ with vertices at
$A:(6, 3)$, $B:(8,4) $, $C:(9,6)$, $D:(7,5) $, as in figure
\ref{fig:int_parall1}. Find
$$\dint \limits_P  xy \ \ \d{x} \d{y}.    $$
\end{exa} \begin{solu} The lines joining the points have
equations
$$L_{AB}: \ y = \frac{x}{2},
$$ $$L_{BC}: \
y = 2x - 12,
$$ $$L_{CD}: \
y = \frac{x}{2} + \frac{3}{2},
$$ $$L_{DA}: \
y = 2x - 9.
$$
The integral is thus
$$\int _3 ^4 \int _{(y + 9)/2} ^{2y} xy\ \d{x}
\d{y}  + \int _4 ^{5}  \int _{(y + 9)/2} ^{(y + 12)/2} xy\  \d{x}
\d{y}    +
 \int _5 ^{6}  \int _{2y-3} ^{(y+12)/2} xy\  \d{x}  \d{y}   =   \frac{409}{4}. $$
To solve this problem using Maple you may use the code below. Notice
that we have split the parallelogram into two triangles.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{int(x*y, [x,y]=Triangle(<6,3>,<8,4>,<7,5>))
+ int(x*y, [x,y]=Triangle(<8,4>,<9,6>,<7,5>));}{}%
\end{mapleinput}
\end{maplegroup}


\end{solu}

\begin{exa}
 Find $$\dint \limits_D \dfrac{y}{x^2 + 1} \d{x}\d{y}$$where $$D =  \{(x, y)\in\reals^2|x \geq 0, x^2 + y^2 \leq
 1\}.$$\end{exa}
\begin{solu} The integral is $0$. Observe that if $(x, y)\in D$ then $(x,
-y)\in D$. Also, $f(x, -y) = -f(x, y)$.
\end{solu}

\vspace{3cm}
\begin{figure}[!hptb]

\begin{minipage}{5cm}
\centering \psset{unit=1pc}
\psaxes[linewidth=2pt,arrows={->},labelFontSize=\tiny](0,0)(0,0)(6.5,6.5)
\pscustom[fillcolor=red,fillstyle=solid]{\psplot[algebraic,linecolor=red,linewidth=2pt]{0}{2}{2*x}
\psplot[algebraic,linecolor=red,linewidth=2pt]{0}{2}{x^2}}
\vspace{1cm}\footnotesize\hangcaption{Example
\ref{exa:reverse-order}.}\label{fig:reverse-order}
\end{minipage}
\hfill
\begin{minipage}{5cm}
\centering \psset{unit=4.5pc}
\psaxes[linewidth=2pt,arrows={->},labelFontSize=\tiny](0,0)(0,0)(1.5,1.5)
\pscustom[fillcolor=red,fillstyle=solid]{\psplot[algebraic,linecolor=red,linewidth=2pt]{0}{1}{x-2*sqrt(x)+1}
\psplot[algebraic,linecolor=red,linewidth=2pt]{1}{0}{x-1+2*sqrt(1-x)}}
\vspace{1cm}\footnotesize\hangcaption{Example
\ref{exa:area-in-astroid}.}\label{fig:area-in-astroid}
\end{minipage}
\hfill
\begin{minipage}{5cm}
\centering \psset{unit=3.1pc}
\psaxes[linewidth=2pt,arrows={->},labelFontSize=\tiny](0,0)(0,0)(2.5,2.5)
\pswedge*[linecolor=yellow](0,0){2}{0}{90}
\pswedge*[linecolor=green](0,0){1.732050808}{0}{90}
\pswedge*[linecolor=magenta](0,0){1.414213562}{0}{90}
\pswedge*[linecolor=gray](0,0){1}{0}{90}
\vspace{1cm}\footnotesize\hangcaption{Example
\ref{exa:floor-1}.}\label{fig:floor-1}
\end{minipage}
\end{figure}

\begin{exa}\label{exa:reverse-order}
Find $$\int _0  ^4 \left(\int _{y/2} ^{\sqrt{y}} e^{y/x} \ \ \
\d{x}\right)\d{y}.
$$ \end{exa}\begin{solu} We have $$ 0 \leq y \leq 4,\ \ \  \dfrac{y}{2} \leq x \leq \sqrt{y} \implies 0 \leq x \leq 2,\ \ \   x^2 \leq y \leq 2x.$$
We then have
$$\begin{array}{lll} \int _0  ^4 \left(\int _{y/2}
^{\sqrt{y}} e^{y/x} \d{x}\right)\d{y} & = & \int _0  ^2
\left(\int _{x^2} ^{2x} e^{y/x} \d{y}\right)\d{x}\\
& = & \int _0  ^2 \left(xe^{y/x}\left|_{x^2} ^{2x} \right.
\right)\d{x}\\
& = & \int _0 ^2 (xe^{2} - xe^{x}) \  \d{x}\\
& = & 2e^2 - (2e^2 - e^2 + 1) \\
& = & e^2 - 1
\end{array}
$$
\end{solu}
\begin{exa}\label{exa:area-in-astroid}
Find the area of the region
$$R = \{(x,y)\in \reals^2: \sqrt{x} + \sqrt{y} \geq 1, \ \ \sqrt{1 -
x} + \sqrt{1 - y} \geq 1 \}. $$  \end{exa}\begin{solu} The area is
given by
$$\begin{array}{lll} \dint _D \d{A} & = & \int _0 ^1 \left(\int _{(1 - \sqrt{x})^2} ^{1 - (1 - \sqrt{1 - x})^2} \d{y}\right) \d{x} \\  & = &
2\int _0 ^1 (\sqrt{1 - x} + \sqrt{x} - 1) \d{x} \\
& = & \dfrac{2}{3}.\end{array}  $$
\end{solu}
\begin{exa}\label{exa:floor-1}
Evaluate $\int _R \floor{x^2+y^2} \d{A}$, where $R$ is the rectangle
$[0;\sqrt{2}]\times [0;\sqrt{2}]$ .
\end{exa}
\begin{solu}
The function $(x,y)\mapsto \floor{x^2+y^2}$ jumps every time
$x^2+y^2$ is an integer. For $(x,y)\in R$, we have $0 \leq
x^2+y^2\leq (\sqrt{2})^2+(\sqrt{2})^2=4$. Thus we decompose $R$ as
the union of the
$$ R_k =
 \{(x,y)\in \reals^2: x\geq 0, y \geq 0, k \leq x^2+y^2<k+1 \}, \qquad k\in \{1,2,3\}. $$
$$
\begin{array}{lll}
\int _R \floor{x^2+y^2} \d{A} & = &  \sum _{1\leq k \leq 3} \int
_{R_k} \floor{x^2+y^2} \d{A}\\ & = & \iint \limits _{1 \leq x^2+y^2
<2, x\geq 0, y \geq 0} 1\d{A} +  \iint \limits _{2 \leq x^2+y^2 <3,
x\geq 0, y \geq 0} 2\d{A} +  \iint \limits _{3 \leq x^2+y^2 <4,
x\geq 0, y \geq 0} 3\d{A}.  \\
\end{array}
$$
Now the integrals can be computed by realising that they are areas
of quarter annuli, and so,
$$\iint \limits _{k \leq x^2+y^2 <k+1,
x\geq 0, y \geq 0} k\d{A}  =k\cdot \dfrac{1}{4}\cdot \pi (k+1-k)
=\dfrac{\pi k}{4}.
  $$
  Hence
$$ \int _R \floor{x^2+y^2} \d{A} = \dfrac{\pi}{4}\left(1+2+3\right) =\dfrac{3\pi}{2}.$$
\end{solu}


\section*{\psframebox{Homework}}
\begin{multicols}{2}\columnseprule 1pt \columnsep 25pt\multicoltolerance=900
\begin{pro}
Evaluate the iterated integral $\dint _1 ^3 \dint _0 ^x
\dfrac{1}{x}\ \d{y}\d{x}$.
\begin{answer}
$2$
\end{answer}
\end{pro}
\begin{pro}
Let $S$ be the interior and boundary of the  triangle with vertices
$(0,0)$, $(2,1)$,  and $(2,0)$. Find $\dint \limits_{S} y\d{A}$.
\begin{answer}
$\dfrac{1}{3} $
\end{answer}
\end{pro}
\begin{pro}
Let $$S=\{(x,y)\in \reals^2: x\geq 0,\  y\geq 0,\  1 \leq
x^2+y^2\leq 4\}.$$ Find $\dint \limits_{S} x^2\d{A}$.
\begin{answer}
$\dfrac{15\pi}{16}$
\end{answer}
\end{pro}
\begin{pro}
 Find $$\dint \limits_D xy \d{x}\d{y}$$ where $$D =  \{(x, y)\in\reals^2|y \geq x^2, x \geq
 y^2\}.$$
\begin{answer} The integral equals
$$\begin{array}{lll}
\dint \limits_D xy \d{x}\d{y} & = & \int _0 ^1 x\left(\int _{x^2}
^{\sqrt{x}}  y \ \d{y} \right) \ \d{x}\\
& = & \int _0 ^1 \dfrac{1}{2}x(x - x^4) \ \d{x}\\
& = & \dfrac{1}{12}.
\end{array}$$
\end{answer}
\end{pro}

\begin{pro}
Find $$\dint \limits_D (x + y)(\sin x)(\sin y) \d{A}$$ where $D =
[0; \pi]^2.$ \begin{answer} The integral equals
$$
\begin{array}{lll}\dint \limits_D x\sin x\sin y \d{x}\d{y}  +
\dint \limits_D y\sin x\sin y \d{x}\d{y} & = & 2\left(\int_0 ^\pi
y\sin
y \ \d{y}\right)\left(\int_0 ^\pi \sin x \ \d{x}\right) \\
& = & 4\pi.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Find $\dint _0 ^1 \dint _0 ^1 \min (x^2,y^2)\d{x}\d{y}$.
\begin{answer}
The integral is
$$\begin{array}{lll}\dint\limits _{x\leq y} x^2 \d{x}\d{y} + \dint\limits_{y\leq x} y^2 \d{x}\d{y}
& = & \int _0 ^1 \int _0 ^y x^2 \d{x}\d{y} + \int _0 ^1 \int _y ^1
y^2 \d{x}\d{y}\\
& = & \int _0 ^1 \dfrac{y^3}{3}\d{y} + \int _0 ^1
\left(y^2-y^3\right)\d{y}\\
& = & \dfrac{y^4}{12}\Big| _0 ^1 +
\left(\dfrac{y^3}{3}-\dfrac{y^4}{4}\right) \Big| _0 ^1 \\
& = & \dfrac{1}{12} + \dfrac{1}{3} -\dfrac{1}{4} \\
& = & \dfrac{1}{6}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Find $\int _D xy\d{x}\d{y}$ where
$$ D=\{(x,y)\in \reals^2: x>0,y>0, 9<x^2+y^2<16, 1<x^2-y^2<16\}. $$
\begin{answer}
$\dfrac{21}{8}$
\end{answer}
\end{pro}
\begin{pro}
\label{pro:polar-integral2}  Evaluate $\int_{{\cal R}}x\d{A}$ where
${\cal R}$ is the (unoriented) circular segment in figure
\ref{fig:polar-integral2}, which is created by the intersection of
regions
$$\{(x,y)\in\reals^2: x^2+y^2 \leq 16 \}$$ and  $$\left\{(x,y)\in\reals^2:  y \geq -\dfrac{\sqrt{3}}{3}x+4\right\}. $$
\begin{answer}
Observe that $$ x^2+y^2=16, y = -\dfrac{\sqrt{3}}{3}x+4\implies
16-x^2=\left(-\dfrac{\sqrt{3}}{3}x+4\right)^2 \implies x = 0,
2\sqrt{3}.
$$The integral is
$$\begin{array}{lll} \dint _0 ^{2\sqrt{3}} \dint _{-\frac{\sqrt{3}}{3}x+4} ^{\sqrt{16-x^2}}x\d{y}\d{x} & = &
\dint _0 ^{2\sqrt{3}}
x\left(\sqrt{16-x^2}+\dfrac{\sqrt{3}}{3}x-4\right) \d{x}\\
& = & -\dfrac{1}{3}(16-x^2)^{3/2}+\dfrac{\sqrt{3}}{9}x^3-2x^2\Big|
_0
^{2\sqrt{3}}\\
& = & \dfrac{8}{3}.
\end{array}$$

\end{answer}
\end{pro}
\vspace{2cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\pstGeonode[PointName=none,PointSymbol=none](0,0){O}
\pstGeonode[PosAngle={-90,90}](4;30){A}(4;90){B}
\pscustom[fillcolor=green,fillstyle=solid]{\pstLineAB{B}{A}\pstArcOAB{O}{A}{B}}
\vspace{1cm}\footnotesize\hangcaption{Problem
\ref{pro:polar-integral2}.} \label{fig:polar-integral2}
\end{figurehere}

\begin{pro}
Find $\dint _0 ^1 \dint _y ^1 2e^{x^2}\d{x}\d{y}$
\begin{answer}
$ e-1 $
\end{answer}
\end{pro}

\begin{pro}
 Evaluate $\dint _{[0;1]^2}\min (x, y^2)\d{A}$.
\begin{answer}
We have
$$ \begin{array}{lll} \dint\limits _{[0;1]^2}\min (x, y^2)\d{A} & = &
\dint \limits _{\stackrel{[0;1]^2}{x\leq y^2}}x\d{A} + \dint\limits _{\stackrel{[0;1]^2}{y^2<x}}y^2\d{A} \\
& = & \dint _0 ^1\dint ^{y^2} _0 x\d{x}\d{y} + \dint _0 ^1\dint ^1
_{y^2} y^2\d{x}\d{y}\\
& = & \dfrac{1}{2}\dint _0 ^1 x^2\Big|  ^{y^2} _0\d{y} +
\dint _0 ^1 y^2x\Big| ^1 _{y^2}\d{y}\\
& = & \dfrac{1}{2}\dint _0 ^1 y^4\d{y}+\dint _0
^1(y^2-y^4) \d{y} \\
& = &\dfrac{1}{10} + \dfrac{2}{15}\\
& = & \dfrac{7}{30}.
\end{array}
$$
\end{answer}
\end{pro}
\begin{pro}
\label{pro:double-integral}  Find $\dint _{{\cal R}} xy \d{A}$,
where ${\cal R}$ is the (unoriented) $\triangle OAB$ in figure
\ref{fig:double-integral} with $O(0,0)$, $A(3,1)$, and $B(4,4)$.
\begin{answer}
Begin by finding the Cartesian equations of the various lines: for
$\line{OA}$ is $ y = \dfrac{x}{3} $ ($0 \leq x \leq 1$),  for
$\line{AB}$ is $y = 3x-8 $ ($3 \leq x \leq 4$), and for $\line{BO}$
is $ y =x$ ($0 \leq x \leq 4$).

\bigskip We have a choice of whether integrating with respect to $x$
or $y$ first. Upon examining the region, one notices that it does
not make much of a difference. I will integrate with respect to $y$
first. In such a case notice that for $0\leq x \leq 3$, $y$ goes
from the line $\line{OA}$ to the line $\line{OB}$, and for $3\leq x
\leq 4$, $y$ goes from the line $\line{AB}$ to the line $\line{OB}$
$$ \begin{array}{lll} \dint _{{\cal R}} xy
\d{A} & = & \dint _0 ^3 \dint _{x/3} ^{x} xy\d{y}\d{x}+\dint _3 ^4
\dint
_{3x-8} ^{x} xy\d{y}\d{x}\\
& = & \dfrac{1}{2}\dint _0 ^3  xy^2\Big|  _{x/3} ^{x}\d{x}+
\dfrac{1}{2}\dint _3 ^4
 xy^2\Big| _{3x-8} ^{x} \d{x}\\
& = & \dfrac{1}{2}\dint _0 ^3 x\left(x^2-
\dfrac{x^2}{9}\right)\d{x}+ \dfrac{1}{2}\dint _3 ^4
 x\left(x^2-(3x-8)^2\right)\d{x}\\
& = & \dfrac{4}{9}\dint _0 ^3 x^3\d{x}+ \dfrac{1}{2}\dint _3 ^4
 \left(-8x^3+48x^2-64x\right)\d{x}\\
 & = & 9 + 9 \\
 & = & 18.
\end{array}$$



To solve this problem using Maple you may use the code below.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{int(x*y, [x,y]=Triangle(<0,0>,<3,1>,<4,4>));}{}%
\end{mapleinput}
\end{maplegroup}


Maple can also provide the limits of integration, but this command
is limited, since Maple is quite whimsical about which order of
integration to choose. It also evaluates expressions that it deems
below its dignity to return unevaluated.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int(x*y, [x,y]=Triangle(<0,0>,<3,1>,<4,4>), 'inert');}{}%
\end{mapleinput}
\end{maplegroup}



\end{answer}


\end{pro}

\vspace{2cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\pstGeonode[PosAngle={-90,0,90}](0,0){O}(3,1){A}(4,4){B}
\pspolygon*[linecolor=red](O)(A)(B)
\psaxes[labels=none](0,0)(-.5,-.5)(5,5)
\vspace{1cm}\footnotesize\hangcaption{Problem
\ref{pro:double-integral}.} \label{fig:double-integral}
\end{figurehere}

\begin{pro}
Find $$\dint \limits_D \log_e (1 + x + y) \d{A}$$ where
$$D = \{(x, y)\in\reals^2|x \geq 0, y \geq 0, x + y \leq 1 \}.$$
\begin{answer} Integrating by parts,
$$\begin{array}{lll}
\dint \limits_D \log_e (1 + x + y) \d{x}\d{y} & = & \int _0
^1\left(\int_0
^{1 - x} \log_e (1 + x + y) \ \d{y}\right) \ \d{x}\\
& = & \int _0 ^1   \left[ (1 + x + y)\log_e (1 + x + y) - (1  + x +
y)\right]
_0 ^{1 - x} \ \d{x}\\
& = & \int _0 ^1  \left( 2\log_e(2)-1-\log_e(1+x)-x\log_e(1+x)+x \right)\ \d{x}\\
& = & \dfrac{1}{4}.
\end{array}$$
\end{answer}
\end{pro}

\begin{pro}
 Evaluate $\dint _{[0;2]^2}\floor{x+y^2}\d{A}$.
\begin{answer}
 First observe that on $[0;2]^2$, $0 \leq \floor{x+y^2}
\leq 6$, so we decompose the region of integration according to
where $\floor{x+y^2}$ jumps across integer values. We have
$$\begin{array}{lll}\dint _{[0;2]^2}\floor{x+y^2}\d{A}
& = & \dint \limits _{\stackrel{[0;2]^2}{\floor{x+y^2}=1}}1\d{A}+
\dint \limits _{\stackrel{[0;2]^2}{\floor{x+y^2}=2}}2\d{A} +\dint
\limits _{\stackrel{[0;2]^2}{\floor{x+y^2}=3}}3\d{A}+ \dint \limits
_{\stackrel{[0;2]^2}{\floor{x+y^2}=4}}4\d{A} +\dint \limits
_{\stackrel{[0;2]^2}{\floor{x+y^2}=5}}5\d{A}\\
& = &  \dint \limits _{\stackrel{[0;2]^2}{1\leq x+y^2<2}}\d{A}+
2\dint \limits _{\stackrel{[0;2]^2}{2\leq x+y^2<3}}\d{A} +3\dint
\limits _{\stackrel{[0;2]^2}{3\leq x+y^2<4}}\d{A}+ 4\dint \limits
_{\stackrel{[0;2]^2}{4\leq x+y^2<5}}\d{A} +5\dint \limits
_{\stackrel{[0;2]^2}{5\leq x+y^2<6}}\d{A}\\
  \end{array}$$
By looking at the regions (as in figures  \ref{fig:floor1} through
\ref{fig:floor5} below) (I am omitting the details of the
integrations, relying on Maple for the evaluations), we obtain
$$\dint \limits _{\stackrel{[0;2]^2}{1\leq x+y^2<2}}\d{A} = \int _0 ^1 \int _{\sqrt{1-x}} ^{\sqrt{2-x}}\d{y}\d{x} + \int _1 ^2 \int _{0} ^{\sqrt{2-x}}\d{y}\d{x}= -\dfrac{4}{3}+\dfrac{4}{3}\sqrt{2}+\dfrac{2}{3}= -\dfrac{2}{3}+\dfrac{4}{3}\sqrt{2}.   $$
$$2\dint \limits _{\stackrel{[0;2]^2}{2\leq x+y^2<3}}\d{A} = 2\int _0 ^2 \int _{\sqrt{2-x}} ^{\sqrt{3-x}}\d{y}\ \d{x} = 4\sqrt{3}-\dfrac{8}{3}\sqrt{2}-\dfrac{4}{3}.   $$
$$3\dint \limits _{\stackrel{[0;2]^2}{3\leq x+y^2<4}}\d{A} = 3\int _0 ^2 \int _{\sqrt{3-x}} ^{\sqrt{4-x}}\d{y}\ \d{x} = 18 - 6\sqrt{3}-4\sqrt{2} .   $$
$$4\dint \limits _{\stackrel{[0;2]^2}{4\leq x+y^2<5}}\d{A} = 4\int _0 ^1 \int _{\sqrt{4-x}} ^{2}\d{y}\ \d{x}
+ 4\int _1 ^2 \int _{\sqrt{4-x}} ^{\sqrt{5-x}}\d{y}\ \d{x} =
-\dfrac{40}{3}+8\sqrt{3}+\dfrac{64}{3}-16\sqrt{3}+\dfrac{16}{3}\sqrt{2}
.
$$
$$5\dint \limits _{\stackrel{[0;2]^2}{4\leq x+y^2<5}}\d{A} = 5\int _1 ^2 \int _{\sqrt{5-x}} ^{5}\d{y}\ \d{x} = -\dfrac{50}{3}+10\sqrt{3} .   $$

Adding all the above, we obtain
$$\dint _{[0;2]^2}\floor{x+y^2}\d{A}=  \dfrac {22}{3}+\dfrac{4}{3}\sqrt {3}-\dfrac{4}{3}\sqrt {2}\approx 7.7571. $$


\vspace{2cm}
\begin{figure}[htpb]
\begin{minipage}{3.2cm}
\centering \psaxes[labelFontSize=\tiny](0,0)(0,0)(2,2)
\pspolygon*[linecolor=yellow](0,0)(2,0)(2,2)(0,2)
\pscustom[fillstyle=solid,fillcolor=green]{\parametricplot[algebraic,linewidth=2pt]{0}{1}{1-t^2|t}
\parametricplot[algebraic,linewidth=2pt]{2 sqrt}{0}{2-t^2|t}}
\vspace{1cm}\footnotesize\hangcaption{$1\leq x+y^2< 2$.}
\label{fig:floor1}
\end{minipage}
\hfill
\begin{minipage}{3.2cm}
\centering \psaxes[labelFontSize=\tiny](0,0)(0,0)(2,2)
\pspolygon*[linecolor=yellow](0,0)(2,0)(2,2)(0,2)
\pscustom[fillstyle=solid,fillcolor=green]{\parametricplot[algebraic,linewidth=2pt]{1}{3
sqrt}{3-t^2|t}
\parametricplot[algebraic,linewidth=2pt]{2 sqrt}{0}{2-t^2|t}}
\vspace{1cm}\footnotesize\hangcaption{$2\leq x+y^2<
3$.}\label{fig:floor2}
\end{minipage}
\hfill
\begin{minipage}{3.2cm}
\centering \psaxes[labelFontSize=\tiny](0,0)(0,0)(2,2)
\pspolygon*[linecolor=yellow](0,0)(2,0)(2,2)(0,2)
\pscustom[fillstyle=solid,fillcolor=green]{\parametricplot[algebraic,linewidth=2pt]{1}{3
sqrt}{3-t^2|t}
\parametricplot[algebraic,linewidth=2pt]{2}{2 sqrt}{4-t^2|t}}
\vspace{1cm}\footnotesize\hangcaption{$3\leq x+y^2< 4$.}
\label{fig:floor3}
\end{minipage}
\hfill
\begin{minipage}{3.2cm}
\centering \psaxes[labelFontSize=\tiny](0,0)(0,0)(2,2)
\pspolygon*[linecolor=yellow](0,0)(2,0)(2,2)(0,2)
\pscustom[fillstyle=solid,fillcolor=green]{
\parametricplot[algebraic,linewidth=2pt]{2}{2 sqrt}{4-t^2|t}
\parametricplot[algebraic,linewidth=2pt]{3 sqrt}{2}{5-t^2|t} }
\vspace{1cm}\footnotesize\hangcaption{$4\leq x+y^2<
5$.}\label{fig:floor4}
\end{minipage}
\hfill
\begin{minipage}{3.2cm}
\centering \psaxes[labelFontSize=\tiny](0,0)(0,0)(2,2)
\pspolygon*[linecolor=yellow](0,0)(2,0)(2,2)(0,2)
\pscustom[fillstyle=solid,fillcolor=green]{\parametricplot[algebraic,linewidth=2pt]{3
sqrt}{2}{5-t^2|t} \psline[linewidth=2pt](1,2)(2,2)(2,1.732050808)}
\vspace{1cm}\footnotesize\hangcaption{$5\leq x+y^2< 6$.}
\label{fig:floor5}
\end{minipage}
\end{figure}


\end{answer}

\end{pro}


\begin{pro}
Evaluate $\int _R\floor{x+y}\d{A}$, where $R$ is the rectangle
$\lcrc{0}{1}\times \lcrc{0}{2}$.
\begin{answer}
Observe that in the rectangle $\lcrc{0}{1}\times \lcrc{0}{2}$ we
have $0 \leq x+y \leq 3$. Hence
$$ \begin{array}{lll} \int _R\floor{x+y}\d{A} & = & \int _{\stackrel{R}{1 \leq x+y <
2}} 1\d{A} + \int _{\stackrel{R}{2 \leq x+y < 3}} 2\d{A}\\
& = & \int _1 ^2 \int _{1-x} ^{2-x}  1\d{y}\d{x} + \int _1 ^2 \int
_{2-x} ^2  2\d{y}\d{x}\\
& = & 4.
\end{array} $$
\end{answer}
\end{pro}

\begin{pro}\label{pro:quarter-anus}
Evaluate $\int _R x\d{A}$ where $R$ is the quarter annulus in figure
\ref{fig:quarter-anus}, which formed by the the area between the
circles $x^2+y^2=1$ and  $x^2+y^2=4$ in the first quadrant.
\begin{answer}
$\dint _0 ^1 \dint  _{\sqrt{1-x^2}} ^{\sqrt{4-x^2}} x\d{y}\d{x} +
\dint _1 ^2 \dint  _{0} ^{\sqrt{4-x^2}} x\d{y}\d{x}=\dfrac{7}{3}. $
\end{answer}
\end{pro}
\vspace{1cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\pscustom[fillstyle=solid,fillcolor=red]{\psarc(0,0){1}{0}{90}\psline(0,1)(0,2)\psarcn(0,0){2}{90}{0}}
\vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:quarter-anus}.}\label{fig:quarter-anus}
\end{figurehere}

\begin{pro}\label{pro:E}
Evaluate $\int _R x\d{A}$ where $R$ is the E-shaped figure in figure
\ref{fig:E}.
\begin{answer}
$\dint _0 ^1\dint _{-2} ^3 x\d{x}\d{y} + \dint _1 ^2\dint _{-2}
^{-1} x\d{x}\d{y} + \dint _1 ^2\dint _0 ^{1} x\d{x}\d{y}+ \dint _1
^2\dint _{2} ^{3} x\d{x}\d{y}=7.$
\end{answer}
\end{pro}
\vspace{2cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\pscustom[fillstyle=solid,fillcolor=red]{\psline(0,-2)(2,-2)(2,-1)(1,-1)(1,0)(2,0)(2,1)(1,1)(1,2)(2,2)(2,3)(0,3)(0,-2)}
\psdots[dotscale=.75](0,-2)(2,-2)(2,-1)(1,-1)(1,0)(2,0)(2,1)(1,1)(1,2)(2,2)(2,3)(0,3)
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:E}.}\label{fig:E}

\end{figurehere}


\begin{pro}Evaluate
$\int _0 ^{\pi/2}\int _{x} ^{\pi/2} \dfrac{\cos y}{y}\d{y}\d{x}$.
\begin{answer}
Exchanging the order of integration,
$$ \int _0 ^{\pi/2}\int _0 ^{y} \dfrac{\cos y}{y}\d{x}\d{y}
=\int _0 ^{\pi/2} \cos y\d{y} =1.$$
\end{answer}
\end{pro}


\begin{pro}
Find
$$\int _1 ^2 \left(\int _{\sqrt{x}} ^x \sin \frac{\pi x}{2y} \ \d{y}\right) \ \d{x}
+ \int _2 ^4 \left(\int _{\sqrt{x}} ^2 \sin \frac{\pi x}{2y} \
\d{y}\right) \ \d{x}.$$ \begin{answer} Upon splitting the domain of
integration, we find that the integral equals
$$\begin{array}{lll}
\int_1 ^2 \left(\int_y ^{y^2} \sin \frac{\pi x}{2y}\d{x}\right)
\d{y} & = & \int _1 ^2 \left[-\frac{2y}{\pi} \cos \frac{\pi x}{2y}
\right]_y ^{y^2} \d{y} \\
& = & -\int_1 ^2-\frac{2y}{\pi} \cos \frac{\pi y}{2} \d{y}
\\
& = & \frac{4(\pi + 2)}{\pi^3},
\end{array}$$upon integrating by parts.
\end{answer}
\end{pro}

\begin{pro}
Find $$\dint \limits_D  2x(x^2 + y^2) \d{A}$$ where
$$D = \{(x, y)\in\reals^2:x^4 + y^4 + x^2 - y^2 \leq 1\}.$$ \begin{answer} The
integral is $0$. Observe that if $(x, y)\in D$ then $( -x, y)\in D$.
Also, $f(-x, y) = -f(x, y)$.
\end{answer}
\end{pro}

\begin{pro}\label{pro:inside-ellipses1} Find the area bounded by the
ellipses $x^2+\dfrac{y^2}{4}=1$ and $\dfrac{x^2}{4}+y^2=1$, as in
figure \ref{fig:inside-ellipses1}.
\begin{answer}
$\dint _{-2/\sqrt{5}} ^{2/\sqrt{5}}  \dint
_{-\frac{1}{2}\sqrt{4-y^2}} ^{\frac{1}{2}\sqrt{4-y^2}}
\d{x}\d{y}=\dfrac{8}{5}+4\arcsin\left(\dfrac{\sqrt{5}}{5}\right).$
\end{answer}
\end{pro}
\vspace{2cm}
\begin{figurehere}
\centering \psset{unit=1pc}
\psclip{\psellipse*[linecolor=white](0,0)(2,1)}
\psellipse*[linecolor=blue](0,0)(1,2)
\endpsclip
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:inside-ellipses1}.}\label{fig:inside-ellipses1}
\end{figurehere}
\begin{pro}
Find $$\dint \limits_D xy\d{A}$$ where $$D = \{(x, y)\in\reals^2:x
\geq 0, y \geq 0, xy + y + x \leq 1\}.$$
\begin{answer} The integral equals
$$\begin{array}{lll}
\dint \limits_D xy \d{A} & = & \int _0 ^1\left(\int_0
^{\dfrac{1 - x}{1 + x}} xy \ \d{y}\right) \ \d{x}\\
& = & \int _0 ^1  \left( \dfrac{1}{2}x\left(\dfrac{1 - x}{1 +
x}\right)^2\right)\ \d{x}\\
& = & \int_1 ^2 \dfrac{(t - 1)(t - 2)^2}{t^2} \ {\rm d}t\\
 & = & 4 \log_e 2 - \dfrac{11}{4}.
\end{array}$$
\end{answer}
\end{pro}



\begin{pro}
Find $$\dint \limits_D \log_e (1 + x^2 + y) \d{A}$$ where
$$D = \{(x, y)\in\reals^2:x \geq 0, y \geq 0, x^2 + y \leq 1\}.$$

\begin{answer} Using integration by parts,
$$\begin{array}{lll}
\dint \limits_D  \log_e (1 + x^2 + y) \d{A} & = & \int _0 ^1
\left(\int _0
^{1 - x^2} \log_e (1 + x^2 + y) \ \d{y} \right) \ \d{x}\\
& = & \int _0 ^1 (2\log_e(2)-1-\log_e(1+x^2))\d{x} \\ & & +\int _0
^1 (-x^2\log_e(1+x^2)+x^2)
\ \d{x}\\
 & = & \dfrac{2}{3}\log_e 2 + \dfrac{8}{9} - \dfrac{\pi}{3}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}\label{pro:bet-circles1}
Evaluate $\int _R x\d{A}$, where $R$ is the region between the
circles $x^2+y^2=4$ and $x^2+y^2=2y$, as shewn in figure
\ref{fig:bet-circles1}.
\begin{answer}
$\dint _{0} ^{2}  \dint _{\sqrt{2y-y^2}} ^{\sqrt{4-y^2}}x
\d{x}\d{y}=2$.
\end{answer}
\end{pro}
\vspace{2cm} \begin{figurehere} \centering \psset{unit=1pc}
\pswedge*[linecolor=red](0,0){2}{0}{90}\pswedge*[linecolor=white](0,1){1}{-90}{90}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:bet-circles1}.}\label{fig:bet-circles1}
\end{figurehere}
\begin{pro}
Evaluate $\int _0 ^1\int _{\sqrt{x}} ^1
\dfrac{e^{x/y}}{y}\d{y}\d{x}$.
\end{pro}
\begin{pro}
Find $$\dint \limits_D |x - y| \d{A}$$ where $$D = \{(x,
y)\in\reals^2:|x| \leq 1, |y| \leq 1\}.$$
\begin{answer} Let
$$D_1 =  \{(x,
y)\in\reals^2|-1 \leq x \leq 1, x \leq y\},$$
$$D_2 =  \{(x,
y)\in\reals^2|-1 \leq x \leq 1, x > y\}.$$ Then $D = D_1 \cup D_2,
D_1 \cap D_2 = \emptyset$ and so
$$\dint \limits_D f(x, y) \d{x}\d{y} = \dint _{D_1} f(x, y) \d{x}\d{y} + \dint _{D_2} f(x, y) \d{x}\d{y}.$$
By symmetry,
$$\dint _{D_1} f(x, y) \d{x}\d{y} = \dint _{D_2} f(x, y) \d{x}\d{y},$$and so
$$\begin{array}{lll}
\dint _{D} f(x, y) \d{x}\d{y} & = &  2\dint _{D_1} f(x, y)
\d{x}\d{y} \\
& = & 2 \int_{-1} ^1 \left(\int _x ^1 (y - x) \ \d{y}\right) \
\d{x}\\
& = & \int _{-1} ^1 (1 - 2x + x^2) \ \d{x}\\
& = & \dfrac{8}{3}.

\end{array}$$
\end{answer}
\end{pro}

\begin{pro}Find $\dint \limits_D (2x+ 3y + 1) \ \d{A}$, where $D$ is
the triangle with vertices at $A(-1,-1)$, $B(2,-4)$, and $C(1,3)$.
\begin{answer} The line joining $A$, and $B$ has equation $y = -x - 2$, line
joining $B$, and $C$ has equation $y = -7x + 10$, and line joining
$A$, and $C$ has equation $y = 2x + 1$. We split the triangle along
the vertical line $x = 1$, and integrate first with respect to $y$.
The desired integral is then
$${\everymath{\dis}\begin{array}{lll}\dint _D (2x+ 3y + 1) \ \d{x}\d{y} & = & \int _{-1} ^1\left( \int _{-x-2} ^{2x + 1} (2x + 3y + 1)\d{y}\right)\d{x} \\
& & \quad + \int _{1} ^2\left( \int _{-x-2} ^{-7x + 10} (2x + 3y + 1)\d{y}\right)\d{x} \\
& = & \int _{-1} ^{1} \left( \dfrac{21}{2}x^2 + 9x - \dfrac{3}{2}
\right) \d{x}\\ & & \quad + \int _{1} ^{2} \left(60x^2 - 198x + 156\right) \d{x}  \\
& = & 4 -1 \\ & = & 3.

\end{array}}$$
\end{answer}
\end{pro}
\begin{pro}
Let $f:[0;1]\to ]0;+\infty]$ be a decreasing function. Prove that
$$\dfrac{\dint _0 ^1 xf^2(x)\d{x}}{\dint _0 ^1 xf(x)\d{x}} \leq  \dfrac{\dint _0 ^1 f^2(x)\d{x}}{\dint _0 ^1 f(x)\d{x}}. $$
\begin{answer}
Since $f$ is positive and decreasing,
$$\dint _0 ^1 \dint _0 ^1 f(x)f(y)(y-x)(f(x)-f(y))\d{x}\d{y} \geq 0, $$from
where the desired inequality follows.
\end{answer}
\end{pro}


\begin{pro}
Find $$\dint \limits_D (xy(x + y)) \d{A}$$ where
$$D = \{(x, y)\in\reals^2| x \geq 0, y \geq 0, x + y \leq 1\}.$$
\begin{answer}
The domain of integration is a triangle. The integral equals
$$\begin{array}{lll}
\dint \limits_D xy(x + y) \d{x}\d{y} & = & \int _0 ^1\left(\int_0
^{1 - x} xy(x + y) \ \d{y}\right) \ \d{x}\\
& = & \int _0 ^1  x \left[ x\dfrac{y^2}{2} + \dfrac{y^3}{3}\right]
_0 ^{1 - x} \ \d{x}\\
& = & \int _0 ^1 x \left(\dfrac{x(1 - x)^2}{2} + \dfrac{(1 - x
)^3}{3}\right)\ \d{x}\\
& = & \dfrac{1}{30}.
\end{array}$$
\end{answer}
\end{pro}

\begin{pro}
Let $f, g:[0;1]\to [0;1]$ be continuous, with $f$ increasing. Prove
that
$$ \dint _0 ^1 (f\circ g)(x)\d{x} \leq \dint _0 ^1 f(x)\d{x}+\dint _0 ^1 g(x)\d{x}. $$
\begin{answer}
For $t\in [0;1]$, first argue that $\dint _0 ^1 f(x)\d{x} \geq
(1-t)f(t) \geq f(t)-t$. Hence
$$\dint _0 ^1 \dint _0 ^1 \left(f(x)\d{x}\right)\d{y} \geq \dint _0 ^1 (f\circ g)(y)\d{y} - \dint _0 ^1 g(y)\d{y}.  $$
Since $\dint _0 ^1 \dint _0 ^1 f(x)\d{x}\d{y}= \dint _0 ^1
f(x)\d{x}$, the desired inequality is established.
\end{answer}
\end{pro}
\begin{pro}
Compute  $\dint \limits_S (xy + y^2)\d{A}$ where
 $$S=\{(x, y)\in\reals^2: |x|^{1/2} + |y|^{1/2}
\leq 1\}.$$ \begin{answer} Put $f(x, y) = xy + y^2$. If I, II, III,
IV stand for the intersection of the region with each quadrant, then
$$\dint \limits_{II}f(x,y)\d{x}\d{y} = \dint
\limits_{II}f(-x,y)\d{(-x)}\d{y} = -\dint
\limits_{I}f(x,y)\d{x}\d{y},   $$
$$\dint \limits_{IV}f(x,y)\d{x}\d{y} = \dint
\limits_{IV}f(x,-y)\d{x}\d{(-y)} = -\dint
\limits_{I}f(x,y)\d{x}\d{y},   $$and
$$\dint \limits_{III}f(x,y)\d{x}\d{y} = \dint
\limits_{III}f(-x,-y)\d{(-x)}\d{(-y)} = +\dint
\limits_{I}f(x,y)\d{x}\d{y}.   $$Thus
$$\begin{array}{lll}\dint \limits_S (xy + y^2)\d{x}\d{y}&  = &  \dint
\limits_If(x,y)\d{x}\d{y} +  \dint \limits_{II}f(x,y)\d{x}\d{y} +
 \dint
\limits_{III}f(x,y)\d{x}\d{y} +  \dint
\limits_{IV}f(x,y)\d{x}\d{y}\\
& = &  \dint \limits_If(x,y)\d{x}\d{y} -  \dint
\limits_If(x,y)\d{x}\d{y} +  \dint \limits_If(x,y)\d{x}\d{y} -
\dint \limits_If(x,y)\d{x}\d{y}\\
 & = & 0.
\end{array}$$


\end{answer}
\end{pro}
\begin{pro}
Evaluate $$\int_0 ^a \int _0 ^b e^{\max (b^2x^2, a^2y^2)} \
\d{y}\d{x},$$ where $a$ and $b$ are positive. \begin{answer} We
split the rectangle $[0;a]\times [0;b]$ into two triangles,
depending on whether $bx < ay$ or $bx \geq ay$. Hence

$$\begin{array}{lll}\int_0 ^a \int _0 ^b e^{\max (b^2x^2,
a^2y^2)} \ \d{y}\d{x} & = & \dint \limits_{bx < ay} e^{\max (b^2x^2,
a^2y^2)} \ \d{y}\d{x}  + \dint \limits_{bx \geq ay} e^{\max (b^2x^2,
a^2y^2)} \ \d{y}\d{x} \\ & = & \dint \limits_{bx < ay} e^{a^2y^2} \
\d{y}\d{x}  + \dint \limits_{bx \geq ay} e^{b^2x^2} \ \d{y}\d{x} \\
&  = & \int _0 ^b \int _0 ^{ay/b}   e^{a^2y^2} \d{x}\d{y} + \int _0
^a \int _0 ^{bx/a}  e^{a^2y^2} \d{y}\d{x} \\
&  = & \int _0 ^b \dfrac{aye^{a^2y^2}}{b} \d{y} + \int _0
^a \dfrac{bxe^{a^2y^2}}{a}\d{x} \\
& = & \dfrac{e^{a^2b^2}-1}{2ab} + \dfrac{e^{a^2b^2}-1}{2ab} \\
& = & \dfrac{e^{a^2b^2}-1}{ab}.
\end{array}$$


\end{answer}
\end{pro}

\begin{pro}
Find $\dint _D \sqrt{xy} \ \d{A}$, where
$$D = \{(x,y)\in \reals^2: y \geq 0, (x + y)^2 \leq 2x\}.
$$ \begin{answer} Observe that $x \geq \frac{1}{2}(x + y)^2 \geq 0$.
Hence we may take the positive square root giving $y \leq \sqrt{2x}
- x.$ Since $y \geq 0$, we must have $\sqrt{2x} - x \geq 0$ which
means that $x \leq 2.$ The integral equals
$$\begin{array}{lll} \int _0 ^2 \left(\int _0 ^{\sqrt{2x} - x} \sqrt{xy}\d{y} \right) \d{x} & = & \frac{2}{3} \int _0 ^2 \sqrt{x}(\sqrt{2x} - x)^{3/2} \d{x} \\
& = & \frac{4}{3} \int _0 ^{\sqrt{2}} u^2(u\sqrt{2} - u^2)^{3/2}
\d{u} \\
& = & \frac{1}{6}\int  _{-1} ^1 (1-v^2)^{3/2}(1 + v)^2 \d{v} \\
& = & \frac{1}{6}\int  _{-\pi/2} ^{\pi/2}  \cos^4\theta (1 +
\sin^2\theta)\d{\theta} \\
& = & \frac{7\pi}{96}.
\end{array}
$$
\end{answer}
\end{pro}
\begin{pro}
A rectangle $R$ on the plane is the disjoint union $R = \cup _{k =
1} ^N R_k$ of rectangles $R_k$. It is known that at least one side
of each of the rectangles $R_k$ is an integer. Shew that at least
one side of $R$ is an integer. \begin{answer} Observe that
$$\int _0 ^a \sin 2\pi x \ \d{x}= \left\{ \begin{array}{ll}
0 & {\rm if} \ a \ {\rm is \ an \ integer} \\
\dfrac{1}{2\pi}(1 - \cos 2\pi a) & {\rm if} \ a \ {\rm is \ not \ \ an \ integer} \\
\end{array}\right.$$
Thus
$$\int _0 ^a \sin 2\pi x \ \d{x}= 0 \iff a \ {\rm is \ an \ integer}.$$
Now
$$\sum _{k = 1} ^N \dint _{R_k} \sin 2\pi x \sin 2\pi y \ \d{x}
 \d{y}  = 0$$since at least one of the sides of each $R_k$
is an integer. Since

$$\dint _R \sin 2\pi x \sin 2\pi y \ \d{x}\d{y}
= \sum _{k = 1} ^N \dint _{R_k} \sin 2\pi x \sin 2\pi y \ \d{x}
 \d{y},$$we deduce that at least one of the sides of $R$ is
an integer, finishing the proof.
\end{answer}
\end{pro}
\begin{pro} Evaluate
$$\int_0 ^1 \int_0 ^1 \cdots \int_0
^1 (x_1x_2\cdots x_n) \d{x_1}\d{x_2} \ldots \d{x_n}.
$$\begin{answer} We have $$\int_0 ^1 \int_0 ^1 \cdots \int_0
^1 (x_1x_2\cdots x_n) \d{x_1}\d{x_2} \ldots \d{x_n} = \prod _{k = 1}
^n \left(\int _0 ^1 x_k\d{x_k}\right) = \prod _{k = 1} ^n
\dfrac{1}{2} = \dfrac{1}{2^n}.
$$
\end{answer}
\end{pro}
\begin{pro}
Evaluate
$$\int_0 ^1 \int_0 ^1 \cdots \int_0
^1 \left(x_1 + x_2 + \cdots + x_n\right) \d{x_1}\d{x_2} \ldots
\d{x_n}.
$$\begin{answer} This is
$$\begin{array}{lll} \int_0 ^1 \int_0 ^1 \cdots \int_0 ^1
\left(\sum _{k = 1} ^n x_k\right)\d{x_1}\d{x_2} \ldots \d{x_n}  & =
&\sum _{k = 1} ^n  \int_0 ^1 \int_0 ^1 \cdots \int_0 ^1
x_k\d{x_1}\d{x_2} \ldots \d{x_n} \\
& = & \sum _{k = 1} ^n \dfrac{1}{2} \\
& = & \dfrac{n}{2}.
\end{array}
$$
\end{answer}
\end{pro}
\begin{pro}
Let $I$ be the rectangle $[1;2]\times [1;2]$ and let $f, g$ be
continuous functions $f,g:[1;2]\to [1;2]$ such that $f(x)\leq g(x)$.
Demonstrate that $$\dint _{I}\left(g(y)-f(x)\right)\d{x}\d{y}\geq 0.
$$
\end{pro}
\begin{pro}
Find $\dint _0 ^1 \dint _0 ^1 x^y \d{x}\d{y}$. Then demonstrate that
$\dint _0 ^1 \dfrac{x-1}{\log x}\d{x} = \log 2$.
\end{pro}

\begin{pro}
Evaluate $$\dint _0 ^4 \dint _0
^{\sqrt{4-y}}\sqrt{12x-x^3}\d{x}\d{y}.$$
\end{pro}
\begin{pro}
Evaluate $\dint _0 ^2 \dint _y ^2 y\sqrt{1+x^3}\d{x}\d{y}$.
\end{pro}
\begin{pro}
Evaluate $\dint _0 ^1 \dint _y
^1\dfrac{xy}{\sqrt{1+x^4}}\d{x}\d{y}$.
\end{pro}

\begin{pro}
Find $$\dint \limits_D \dfrac{1}{(x + y)^4} \d{A}$$ where
$$D = \{(x, y)\in\reals^2|x \geq 1, y \geq 1, x + y \leq 4\}.$$
\begin{answer} The integral equals
$$\begin{array}{lll}
\dint \limits_D \dfrac{1}{(x + y)^4} \d{x}\d{y} & = & \int _1 ^3
\left( \int _1
^{4 - x} \dfrac{\d{y}}{(x + y)^4} \ \d{y} \right) \ \d{x}\\
& = & \int_1 ^3 \left[ -\dfrac{1}{3}(x + y)^{-3}\right] _1 ^{4 - x}
\
\d{x}\\
& = & \dfrac{1}{3} \int _1 ^3 \left(\dfrac{1}{(1 + x)^3} -
\dfrac{1}{64}\right) \ \d{x}\\
& = & \dfrac{1}{48}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Prove that  $$\int _0 ^{+\infty}\int _{2x} ^{+\infty}
\dfrac{xe^{-y}\sin y}{y^2}\d{y}\d{x}=\dfrac{1}{16}.$$
\end{pro}
\begin{pro}
Prove that $$\int _0 ^1 \int _{y^2} ^y
\dfrac{y}{x\sqrt{x^2+y^2}}\d{x}\d{y}=\log (1+\sqrt{2}).
$$
\end{pro}
\begin{pro}
Prove that $$\dint _0 ^1 \dint _0 ^1 \dfrac{x-y}{(x+y)^3}\d{y}\d{x}
= \dfrac{1}{2}= -\dint _0 ^1 \dint _0 ^1
\dfrac{x-y}{(x+y)^3}\d{x}\d{y}.$$Is this a contradiction to Fubini's
Theorem?
\end{pro}


\begin{pro}
Find $$\dint \limits_D x \d{A}$$ where $$D = \{(x, y)\in\reals^2|y
\geq 0, x - y + 1 \geq 0, x + 2y - 4 \leq 0\}.$$
\begin{answer} The integral equals
$$\begin{array}{lll}
\dint \limits_D x \d{x}\d{y} & = & \int _{-1} ^{2/3} \left(\int _0
^{x + 1} \ \d{y}\right) x\ \d{x}+ \int _{2/3} ^{4} \left(\int _0 ^{2
- \frac{x}{2}} \ \d{y}\right) x\ \d{x}
\\ & = & \int _{-1} ^{2/3} x(x + 1)\ \d{x}+ \int _{2/3}
^{4} x\left(2 - \dfrac{x}{2}\right)\ \d{x}\\
& = & \dfrac{275}{54}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro} Evaluate
$${\small\lim _{n \rightarrow +\infty} \int_0 ^1 \int_0 ^1 \cdots \int_0 ^1 \cos^2 \left(
\frac{\pi}{2n}(x_1 + x_2 + \cdots + x_n)\right) \d{x}_1 \  \d{x}_2
\ldots \ \d{x}_n.}
$$ \begin{answer} Make the change of variables $x_k = 1 - y_k$. Then
$$I = \int_0 ^1 \int_0 ^1 \cdots \int_0 ^1 \cos^2
\left( \frac{\pi}{2n}(x_1 + x_2 + \cdots + x_n)\right) \d{x}_1 \
\d{x}_2 \ldots \ \d{x}_n $$ equals $$ \int_0 ^1 \int_0 ^1 \cdots
\int_0 ^1 \sin^2 \left( \frac{\pi}{2n}(y_1 + y_2 + \cdots +
y_n)\right) \d{y}_1 \  \d{y}_2 \ldots \ \d{y}_n .$$Since $\sin^2t +
\cos^2t = 1$, we have $2I = 1,$ and so $I = \frac{1}{2}$.
\end{answer}
\end{pro}

\begin{pro}
Let $f, g$ be continuous functions in the interval $[a;b]$. Prove
that
$$\dfrac{1}{2}\dint _a ^b \left(\dint _a ^b\det \begin{bmatrix} f(x) & g(x) \\ f(y) & g(y) \end{bmatrix}^2 \d{x}\right)\d{y}
$$  equals $$ \left(\dint _a ^b (f(x))^2 \d{x}\right) \left(\dint _a ^b (g(x))^2
\d{x}\right) -\left( \dint _a ^b (f(x)g(x)) \d{x}\right)^2.
$$This is an integral analogue of Lagrange's Identity. Deduce
Cauchy's Inequality for integrals,
$$ \left( \dint _a ^b (f(x)g(x)) \d{x}\right)^2 \leq \left(\dint _a ^b (f(x))^2 \d{x}\right) \left(\dint _a ^b (g(x))^2
\d{x}\right).  $$
\end{pro}

\begin{pro} Let $a\in \reals, n\in \BBN$, $a>0$, $n>0$. Let $f:[0;a]\to \reals$ be continuous. Prove that
$$\int_0 ^a \int_0 ^{x_1} \cdots \int_0
^{x_{n-2}} \int_0 ^{x_{n-1}} (f(x_1)f(x_2)\cdots f(x_n))
\d{x_n}\d{x_{n-1}} \ldots \d{x_2}\d{x_1} $$ equals $$
\dfrac{1}{n!}\left(\dint _0 ^a f(x)\d{x}\right)^n.
$$
\end{pro}
\end{multicols}
\section{Change of Variables}
We now perform a multidimensional analogue of  the change of
variables theorem in one variable.
\begin{thm}
Let $(D, \Delta) \in (\reals^n)^2$ be open, bounded sets in
$\reals^n$ with volume and let $g:\Delta \rightarrow D$ be a
continuously differentiable bijective mapping such that $\det g'(u)
\neq 0$, and both $|\det g'(u)|, \dfrac{1}{|\det g'(u)|}$ are
bounded on $\Delta$. For $f:D \rightarrow \reals$ bounded and
integrable, $f\circ g|\det g'(u)|$ is integrable on $\Delta$ and
$$\int \cdots \int _D f = \int \cdots \int _\Delta (f\circ g)|\det
 g'(u)|,$$ that is
$$\int \cdots \int _D f(x_1, x_2, \ldots, x_n) \d{x}_1 \wedge
\d{x}_2 \wedge \ldots \wedge \d{x}_n  $$
$$\qquad \qquad \qquad = \int \cdots \int _\Delta f(g(u_1, u_2, \ldots, u_n))
|\det g'(u)|\d{u}_1 \wedge \d{u}_2 \wedge \ldots \wedge \d{u}_n .$$
\end{thm}
One normally chooses changes of variables that map into
rectangular regions, or that simplify the integrand. Let us start
with a rather trivial example.


\vspace*{4cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
$$\psset{unit=1pc}
\renewcommand{\pshlabel}[1]{{\tiny
#1}}
\renewcommand{\psvlabel}[1]{{\tiny #1}}
\rput(-4,0){\psaxes(0,0)(-.5,-.5)(10,7)\pscustom[fillcolor=yellow,fillstyle=solid]{\psline(0,3)(0,4)(1,4)(1,3)(0,3)}\psdots[dotstyle=*,dotscale=.8](0,3)(0,4)(1,4)(1,3)}$$
\vspace*{1cm} \footnotesize \hangcaption{Example
\ref{exa:change_of_var_1}. $xy$-plane.} \label{fig:change_of_var_1}
\end{minipage}
\hfill
\begin{minipage}{7cm}
$$\psset{unit=1pc}
\renewcommand{\pshlabel}[1]{{\tiny
#1}}
\renewcommand{\psvlabel}[1]{{\tiny
#1}}\rput(-4,0){\psaxes(0,0)(-.5,-.5)(10,7)\pscustom[fillcolor=yellow,fillstyle=solid]{\psline(6,3)(8,4)(9,6)(7,5)(6,3)}\psdots[dotstyle=*,dotscale=.8](6,3)(8,4)(7,5)(9,6)}
$$\vspace*{1cm} \footnotesize \hangcaption{Example \ref{exa:change_of_var_1}. $uv$-plane.} \label{fig:change_of_var_1}\end{minipage}
\end{figure}


\begin{exa}
Evaluate the integral $$\int _3 ^4 \int _0 ^1  (x + 2y)(2x + y)\\
\d{x} \d{y}.
$$
\label{exa:change_of_var_1}\end{exa} \begin{solu} Observe that we
have already computed this integral in example
\ref{exa:double_int_for_change1}. Put
$$u = x + 2y \implies \d{u} = \d{x} + 2\d{y},     $$
$$v = 2x + y \implies \d{v} = 2\d{x} + \d{y},     $$

giving $$\d{u}\wedge\d{v} = -3\d{x}\wedge\d{y}.
$$
Now, $$(u,v) = \begin{bmatrix} 1 & 2 \cr 2 & 1 \cr
\end{bmatrix}\colvec{x
\\ y}
$$is a linear transformation, and hence it maps quadrilaterals into
quadrilaterals. The corners of the rectangle in the area of
integration in the $xy$-plane are $(0,3)$,  $(1,3)$, $(1,4)$, and
$(0, 4)$, (traversed counter-clockwise) and they map into $(6, 3)$,
$(7,5) $, $(9,6)$, and $(8,4) $, respectively, in the $uv$-plane
(see figure \ref{fig:change_of_var_1}). The form $\d{x}\wedge\d{y}$
has opposite orientation to $\d{u}\wedge\d{v}$ so we use $$
\d{v}\wedge\d{u} = 3\d{x}\wedge\d{y}    $$instead. The integral
sought is
$$  \frac{1}{3}\dint\limits_P uv \ \d{v}\d{u}     =
\frac{409}{12},
$$from example \ref{exa:int_parall1}.
\end{solu}


\begin{exa}
The integral
$$\dint _{[0;1]^2} (x^4 - y^4) \d{A}
= \int _0 ^1  \left( \dfrac{1}{5} - y^4\right)\d{y}
 = 0.$$ Evaluate it
using the change of variables $u = x^2 - y^2, v = 2xy.$
\end{exa}
\begin{solu} First we find
$$\d{u}= 2x\d{x}- 2y\d{y},$$
$${\rm d}v = 2y\d{x}+ 2x\d{y},$$and so
$$\d{u}\wedge\d{v} = (4x^2 + 4y^2)\d{x}\wedge \d{y}.$$


We now determine the region $\Delta$ into which the square $D =
[0; 1 ]^2$ is mapped. We use the fact that boundaries will be
mapped into boundaries. Put $$AB = \{(x, 0): 0 \leq x \leq 1\},$$
$$BC = \{(1, y): 0 \leq y \leq 1\},$$ $$CD = \{(1 - x, 1): 0 \leq x
\leq 1\},$$ $$DA = \{(0, 1 - y): 0 \leq y \leq 1\}.$$




On $AB$ we have $u = x, v = 0.$ Since $0 \leq x \leq 1$, $AB$ is
thus mapped into the line segment $0 \leq u \leq 1, v = 0$.




On $BC$ we have $u = 1 - y^2, v = 2y$. Thus $u = 1 -
\dfrac{v^2}{4}$. Hence $BC$ is mapped to the portion of the
parabola $u = 1 - \dfrac{v^2}{4}, 0 \leq v \leq 2.$




On $CD$ we have $u = (1 - x)^2 - 1, v = 2(1 - x).$ This means that
$u = \dfrac{v^2}{4} - 1, 0 \leq v \leq 2.$




Finally, on $DA,$ we have $u = -(1 - y)^2, v = 0.$ Since $0 \leq y
\leq 1$, $DA$ is mapped into the line segment $-1 \leq u \leq 0, v
= 0.$ The region $\Delta$ is thus the area in the $uv$ plane
enclosed by the parabolas $u \leq \dfrac{v^2}{4} - 1, u \leq 1 -
\dfrac{v^2}{4}$ with $ -1 \leq u \leq 1, 0 \leq v \leq 2.$



We deduce that
$$\begin{array}{lll}\dint _{[0;1]^2} (x^4 - y^4) \d{A}& = &  \dint _{\Delta} (x^4 - y^4) \dfrac{1}{4(x^2 + y^2)}
\d{u}\d{v} \\
& = &  \dfrac{1}{4}\dint _{\Delta} (x^2 - y^2)
\d{u}\d{v} \\
& = &  \dfrac{1}{4}\dint _{\Delta} u
\d{u}\d{v} \\
& = & \dfrac{1}{4}\int _0 ^2 \left( \int _{v^2/4 - 1} ^{1 - v^2/4}
u
\d{u}\right)\d{v} \\
& = & 0,
\end{array}$$as before.
\end{solu}
\begin{exa}
Find $$\dint \limits_D  e^{(x^3 + y^3)/xy} \ \ \ \d{A}$$ where
$$D =  \{(x, y)\in\reals^2|y^2 - 2px \leq 0, x^2 - 2py \leq 0, p\in
]0;+\infty[ \ {\rm fixed}\},$$  using the change of variables $x =
u^2v, \ y = uv^2$.
\end{exa}
\begin{solu} We have $$\d{x} = 2uv\d{u} + u^2\d{v},    $$
$$\d{y} = v^2\d{u} + 2uv\d{v},    $$
$$\d{x} \wedge \d{y} = 3u^2v^2\d{u}\wedge\d{v}.    $$
The region transforms into
$$\Delta = \{(u, v)\in\reals^2| 0 \leq u \leq (2p)^{1/3}, \ 0 \leq v \leq
(2p)^{1/3}\}.$$The integral becomes
$$\begin{array}{lll}
\dint \limits_D  f(x, y) \d{x}\d{y} & = & \dint \limits_\Delta \exp
\left(\dfrac{u^6v^3 +
u^3v^6}{u^3v^3}\right) (3u^2v^2) \ \d{u}{\rm d}v \\
& = & 3\dint \limits_\Delta e^{u^3}e^{v^3}u^2v^2 \ \d{u}{\rm d}v \\
& = & \dfrac{1}{3}\left(\int _0 ^{(2p)^{1/3}} 3u^2e^{u^3}\ \d{u}
\right)^2 \\
& = & \dfrac{1}{3}(e^{2p} - 1)^2.
\end{array}$$
As an exercise, you may try the (more natural) substitution $x^3 =
u^2v, y^3 = v^2u$ and verify that the same result is obtained.
\end{solu}


\vspace*{2cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
$$
\psaxes[linewidth=2pt,arrows={->}](0,0)(0,0)(1.5,1.5)
\pspolygon*[showpoints=true,linecolor=green](0,0)(1,0)(1,1)(0,1)
$$
\vspace*{1cm} \footnotesize \hangcaption{Example
\ref{exa:change_of_var_4}. $xy$-plane.} \label{fig:change_of_var_4}
\end{minipage}
\hfill
\begin{minipage}{7cm}
$$\psaxes[linewidth=2pt,arrows={->},labels=none](0,0)(0,0)(1.9,1.9)
\pspolygon*[showpoints=true,linecolor=green](0,0)(1.5708,0)(0,1.5708)
\uput[d](1.5708,0){\frac{\pi}{2}} \uput[l](0,1.5708){\frac{\pi}{2}}
$$\vspace*{1cm} \footnotesize \hangcaption{Example \ref{exa:change_of_var_4}. $uv$-plane.} \label{fig:change_of_var_5}\end{minipage}
\end{figure}


\begin{exa}In this problem we will follow an argument of Calabi, Beukers, and Kock to prove that $\sum _{n=1}
^{+\infty}\dfrac{1}{n^2}=\dfrac{\pi ^2}{6}$.
\begin{enumerate}
\item
Prove that if $S = \sum _{n=1} ^{+\infty}\dfrac{1}{n^2}$, then
$\dfrac{3}{4}S = \sum _{n=1} ^{+\infty}\dfrac{1}{(2n-1)^2}$.
\item Prove that $ \sum _{n=1} ^{+\infty}\dfrac{1}{(2n-1)^2} = \int _0 ^1 \int _0 ^1
\dfrac{\d{x}\d{y}}{1-x^2y^2}$.
\item Use the change of variables $x=\dfrac{\sin u}{\cos v}$, $y=\dfrac{\sin
v}{\cos u}$ in order to evaluate $\int _0 ^1 \int _0 ^1
\dfrac{\d{x}\d{y}}{1-x^2y^2}$.
\end{enumerate}
\label{exa:change_of_var_4}
\end{exa}
\begin{solu}
\noindent
\begin{enumerate}
\item Observe that the sum of the even terms is
$$ \sum _{n=1} ^{+\infty}\dfrac{1}{(2n)^2} = \dfrac{1}{4}\sum _{n=1} ^{+\infty}\dfrac{1}{n^2} = \dfrac{1}{4}S,
$$a quarter of the sum, hence the sum of the odd terms must be three quarters of the sum,
$\dfrac{3}{4}S$.
\item Observe that
$$ \dfrac{1}{2n-1} = \int _0 ^1 x^{2n-2}\d{x} \implies \left(\dfrac{1}{2n-1}\right)^2 = \left(\int _0 ^1 x^{2n-2}\d{x}\right)\left(\int _0 ^1 y^{2n-2}\d{y}\right)= \int _0 ^1 \int _0 ^1 (xy)^{2n-2}\d{x}\d{y}. $$
Thus
$$\sum _{n=1} ^{+\infty}\dfrac{1}{(2n-1)^2} =  \sum _{n=1} ^{+\infty} \int _0 ^1 \int _0 ^1 (xy)^{2n-2}\d{x}\d{y} = \int _0 ^1 \int _0 ^1  \sum _{n=1} ^{+\infty}(xy)^{2n-2}\d{x}\d{y}
=\int _0 ^1 \int _0 ^1 \dfrac{\d{x}\d{y}}{1-x^2y^2},$$ as
claimed.\footnote{This exchange of integral and sum needs
justification. We will accept it for our purposes.}


\item If $x=\dfrac{\sin u}{\cos v}$, $y=\dfrac{\sin
v}{\cos u}$, then
$$\d{x} = (\cos u)(\sec v)\d{u} + (\sin u)(\sec v)(\tan v)\d{v}, \quad \d{y} = (\sec u)(\tan u)(\sin v)\d{u}  + (\sec u)(\cos v)\d{v}, $$
from where
$$ \d{x}\wedge\d{y}= \d{u}\wedge\d{v} - (\tan^2u)(\tan^2v)\d{u}\wedge\d{v} = \left(1-(\tan^2u)(\tan^2v)\right)\d{u}\wedge\d{v}. $$
Also,
$$ 1-x^2y^2 = 1-\dfrac{\sin ^2v}{\cos^2v}\cdot \dfrac{\sin^2v}{\cos^2u} =1-(\tan^2u)(\tan^2v). $$
This gives
$$ \dfrac{\d{x}\d{y}}{1-x^2y^2}=\d{u}\d{v}. $$
We now have to determine the region that the transformation
$x=\dfrac{\sin u}{\cos v}$, $y=\dfrac{\sin v}{\cos u}$ forms in the
$uv$-plane. Observe that
$$ u=\arctan x\sqrt{\dfrac{1-y^2}{1-x^2}}, \qquad v =\arctan y \sqrt{\dfrac{1-x^2}{1-y^2}}.  $$
This means that the square in the $xy$-plane in figure
\ref{fig:change_of_var_4} is transformed into the triangle in the
$uv$-plane in figure \ref{fig:change_of_var_5}.



We deduce,
 $$\int _0 ^1 \int _0 ^1
\dfrac{\d{x}\d{y}}{1-x^2y^2} = \int _0 ^{\pi /2}\int _0 ^{\pi/2
-v}\d{u}\d{v} =\int _0 ^{\pi /2}\left(\pi/2 -v\right)\d{v} =
\left(\dfrac{\pi}{2}v -\dfrac{v^2}{2}\right)\Big| _0 ^{\pi/2} =
\dfrac{\pi ^2}{4} - \dfrac{\pi ^2}{8} =\dfrac{\pi ^2}{8}.
$$
Finally,
$$ \dfrac{3}{4}S=\dfrac{\pi ^2}{8} \implies S =\dfrac{\pi ^2}{6}.$$
\end{enumerate}
\end{solu}






\section*{\psframebox{Homework}}
\begin{pro}
Let $D' = \{(u, v)\in\reals^2: u  \leq 1, -u \leq v \leq u\}$.
Consider $$\fun{\Phi}{(u, v)}{\left(\frac{u + v}{2}, \frac{u -
v}{2}\right)}{\reals^2}{\reals^2}.$$
\begin{dingautolist}{202}
\item Find the image of $\Phi$ on $D'$, that is, find $D = \Phi
(D')$. \item Find $$\dint_D (x + y)^2e^{x^2 - y^2}\d{A}.$$
\end{dingautolist} \begin{answer}
\begin{dingautolist}{202}
\item  Put $x = \frac{u + v}{2}$ and $y = \frac{u - v}{2}$ . Then
$x + y = u$ and  $x - y$. Observe that $D'$ is the triangle in the
$uv$ plane bounded by the lines $u = 0, u = 1, v = u, v = -u.$ Its
image under $\Phi$ is the triangle bounded by the equations $x = 0,
y = 0, x + y = 1.$ Clearly also
$$\d{x}\wedge \d{y} = \frac{1}{2}\d{u}\wedge\d{v}.$$

\item  From the above
$$\begin{array}{lll}\dint_D (x + y)^2e^{x^2 - y^2}\d{A}
& = & \frac{1}{2}\dint_{D'} u^2e^{uv}\d{u}{\rm d}v \\
& = & \frac{1}{2}\int _0 ^1 \int _{-u} ^u u^2 e^{uv} \d{u}\d{v} \\
& = & \frac{1}{2}\int _0 ^1 u(e^{u^2} - e^{-u^2})\d{u}\\
& = & \frac{1}{4}(e + e^{-1} - 2).
\end{array}$$
\end{dingautolist}
\end{answer}
\end{pro}
\begin{pro}
Using the change of variables $x=u^2-v^2$, $y=2uv$, $u \geq 0$,
$v\geq 0$, evaluate $\int _R \sqrt{x^2+y^2}\d{A}$, where
$$R=\{(x,y)\in\reals^2: -1\leq x \leq 1, 0 \leq y \leq 2\sqrt{1-|x|}\}$$
\end{pro}
\begin{pro}Using  the change of variables $u = x-y$ and $v = x + y$,
evaluate $\int _R \dfrac{x-y}{x+y}\d{A}$, where
 $R$ is the square with vertices at  $(0, 2)$, $(1, 1)$, $ (2, 2)$,
$(1, 3)$.
\end{pro}
\begin{pro}
Find $\dint \limits_D f(x, y) \d{A}$ where $$D = \{(x,
y)\in\reals^2|a \leq xy \leq b, y \geq x \geq 0, y^2 - x^2 \leq 1,
(a, b) \in\reals^2, 0 < a < b\}$$ and $f(x, y) = y^4 - x^4$ by using
the change of variables $u = xy, v = y^2 - x^2$.
\begin{answer} Here we argue that
$$\d{u}= y\d{x}+ x\d{y},$$
$${\rm d}v = -2x\d{x}+ 2y\d{y}.$$
Taking the wedge product of differential forms,
$$\d{u}\wedge\d{v} = 2(y^2  + x^2) \d{x}\wedge \d{y}. $$
Hence
$$\begin{array}{lll}f(x, y) \d{x}\wedge \d{y} & = & (y^4 - x^4) \dfrac{1}{2(y^2 + x^2)}\d{u}\wedge{\rm
d}v\\
& = &  \dfrac{1}{2}(y^2 - x^2)\d{u}\wedge{\rm d}v \\
& = &  \dfrac{v}{2}\d{u}\wedge{\rm d}v\end{array}$$ The region
transforms into
$$\Delta = [a; b]\times[0;1].$$The integral becomes
$$\begin{array}{lll}
\dint \limits_D f(x, y) \d{x}\wedge\d{y} & = & \dint \limits_\Delta
v \ \d{u}\wedge{\rm d}v \\
& = & \dfrac{1}{2}\left(\int _a ^b \ \d{u}\right)\left(\int _0 ^1 v\ \d{v}\right) \\
& = & \dfrac{b - a}{4}.
\end{array}$$
\end{answer}
\end{pro}

\begin{pro}Use the following steps (due to Tom Apostol) in order to
prove that
$$\sum _{n = 1} ^\infty \frac{1}{n^2}  = \frac{\pi ^2}{6}.$$
\begin{dingautolist}{202}
\item  Use the series expansion
$$ \frac{1}{1 - t} = 1 + t + t^2 + t^3 + \cdots  \ \ \ \ |t| <
1,$$in order to prove (formally) that
$$\int _0 ^1 \int _0 ^1 \frac{\d{x}\d{y}}{1 - xy} = \sum _{n = 1} ^\infty \frac{1}{n^2}.$$

\item  Use the change of variables $u = x + y, v = x - y$ to shew
that
$$\int _0 ^1 \int _0 ^1 \frac{\d{x}\d{y}}{1 - xy}  =
2\int _0 ^1 \left(\int _{-u} ^u\frac{{\rm d}v}{4 - u^2 + v^2}\right)
\d{u}+ 2\int _1 ^2 \left(\int _{u - 2} ^{2 - u }\frac{{\rm d}v}{4 -
u^2 + v^2}\right) \d{u}.$$

\item  Shew that the above integral reduces to
$$2\int _0 ^1 \frac{2}{\sqrt{4 - u^2}} \arctan \frac{u}{\sqrt{4 - u^2}} \ \d{u}
+ 2\int _1 ^2 \frac{2}{\sqrt{4 - u^2}} \arctan \frac{ 2 - u}{\sqrt{4
- u^2}} \ \d{u}.$$ \item Finally, prove that the above integral is
$\frac{\pi^2}{6}$ by using the substitution $\theta = \arcsin
\frac{u}{2}$.
\end{dingautolist}

\begin{answer}\begin{dingautolist}{202} \item  Formally,
$$\begin{array}{lll}
\int _0 ^1 \int _0 ^1 \frac{\d{x}\d{y}}{1 - xy} & = & \int _0 ^1
\int _0 ^1 (1 + xy + x^2y^2 + x^3y^3 + \cdots )\d{x}\d{y} \\
& = & \int _0 ^1 \left(y + \frac{xy^2}{2} + \frac{x^2y^3}{3}   +
\frac{x^3y^4}{4} + \cdots \right)_0 ^1 \ \d{x}\\ & = & \int _0 ^1 (1
+ \frac{x}{2} + \frac{x^2}{3}  + \frac{x^3}{4} + \cdots )\d{x}\\
& = & 1 + \frac{1}{2^2} + \frac{1}{3^2} + \frac{1}{4^2}  + \cdots
\end{array}$$
\item This change of variables transforms the square $[0; 1]\times
[0;1]$ in the $xy$ plane into the square with vertices at $(0, 0)$,
$(1, 1)$, $(2, 0)$, and $(1, -1)$ in the $uv$ plane. We will split
this region of integration into two disjoint triangles: $T_1$ with
vertices at  $(0, 0)$, $(1, 1)$, $(1, -1)$, and $T_2$ with vertices
at $(1, -1)$, $(1, 1)$, $(2, 0)$. Observe that
$$\d{x}\wedge \d{y} = \frac{1}{2}\d{u}\wedge\d{v},$$
and that $u + v = 2x, u - v = 2y$ and so $4xy = u^2 - v^2$. The
integral becomes
$$\begin{array}{lll}
\int _0 ^1 \int _0 ^1 \frac{\d{x}\d{y}}{1 - xy}  & = &
\frac{1}{2}\dint\limits_{T_1\cup T_2} \frac{\d{u}\wedge {\rm d
}v}{1 - \frac{u^2 - v^2}{4}} \\
& = & 2\int _0 ^1 \left(\int _{-u} ^u\frac{{\rm d}v}{4 - u^2 +
v^2}\right) \d{u}+ 2\int _1 ^2 \left(\int _{u - 2} ^{2 - u
}\frac{{\rm d}v}{4 - u^2 + v^2}\right) \d{u},
\end{array}$$as desired.

\item  This follows by using the identity
$$\int_0 ^t \frac{\d{\omega}}{1 + \Omega^2} = \arctan t.$$
\item  This is straightforward but tedious!
\end{dingautolist}

\end{answer}
\end{pro}

\section{Change to Polar Coordinates}
One of the most common changes of variable is the passage to polar
coordinates  where
$$x = \rho\cos\theta \implies \d{x} = \cos\theta\d{\rho} - \rho\sin\theta\d{\theta}, $$
$$y = \rho\sin\theta \implies \d{y} = \sin\theta\d{\rho} + \rho\cos\theta\d{\theta}, $$
whence
$$\d{x} \wedge \d{y} = (\rho\cos^2\theta + \rho\sin^2\theta)\d{\rho}\wedge\d{\theta} = \rho\d{\rho}\wedge\d{\theta}. $$
\begin{exa}\label{exa:pol-coor1}
Find $$\dint \limits_D  xy\sqrt{x^2 + y^2}\d{A} $$ where
$$D = \{(x, y)\in\reals^2|x \geq 0, y \geq 0, y \leq x, x^2 + y^2
\leq 1\}.$$
\end{exa}
\begin{solu} We use polar coordinates. The region $D$ transforms into the
region $$\Delta = [0; 1]\times \left[0; \dfrac{\pi}{4}
\right].$$Therefore the integral becomes
$$\begin{array}{lll}
\dint \limits_\Delta \rho ^4 \cos\theta\sin\theta \ \d{\rho}
\d{\theta} & = & \left(\int _0 ^{\pi/4} \cos\theta\sin\theta \ \d{\theta}\right)\left(\int _0 ^1 \rho ^4 \ \d{\rho}\right) \\
& = & \dfrac{1}{20}.
\end{array}$$
\end{solu}
\vspace{2cm}
\begin{figure}[!hptb]
\begin{minipage}{4cm}
\centering \psset{unit=1pc} \pswedge*[linecolor=red](0,0){2}{0}{45}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\vspace{2cm}\footnotesize\hangcaption{Example
\ref{exa:pol-coor1}.}\label{fig:pol-coor1}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\pswedge*[linecolor=red](0,0){2}{0}{90}\pswedge*[linecolor=white](0,1){1}{-90}{90}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\vspace{2cm}\footnotesize\hangcaption{Example
\ref{exa:pol-coor2}.}\label{fig:pol-coor2}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\parametricplot[algebraic,linewidth=2pt,linecolor=red]{0}{6.29}{-sqrt(3)*sin(t)/3+cos(t)|2*sqrt(3)*sin(t)/3}
\vspace{2cm}\footnotesize\hangcaption{Example
\ref{exa:pol-coor3}.}\label{fig:pol-coor3}
\end{minipage}
\hfill
\begin{minipage}{4cm}
\centering \psset{unit=1pc}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\pstGeonode[PointName=none,PointSymbol=none](0,0){O}(2,0){A}(-1,1){C}(1,1){D}
\pstInterLC[PointName=none]{C}{D}{O}{A}{L}{L'}
\pscustom[fillstyle=solid,fillcolor=red]{\psline(L)(L')\pstArcOAB{O}{L'}{L}}
\vspace{2cm}\footnotesize\hangcaption{Example
\ref{exa:pol-coor4}.}\label{fig:pol-coor4}
\end{minipage}
\end{figure}

\begin{exa}\label{exa:pol-coor2}
Evaluate $\int _R xd{A}$, where $R$ is the region bounded by the
circles $x^2+y^2=4$ and $x^2+y^2=2y$.
\end{exa}
\begin{solu}
Observe that this is problem \ref{pro:bet-circles1}. Since
$x^2+y^2=r^2$, the radius sweeps from  $r^2=2r\sin \theta$ to
$r^2=4$, that is, from $2\sin \theta$ to  $2$. The angle clearly
sweeps from $0$ to $\dfrac{\pi}{2}$. Thus the integral becomes
$$\begin{array}{lll}\int _R xd{A} & = & \int _0 ^{\pi/2}\int _2 ^{2\sin\theta} r^2\cos\theta \d{r}\d{\theta} \\
& = & \dfrac{1}{3}\int _0 ^{\pi/2}(8\cos\theta -8\cos\theta\sin^3\theta)\d{\theta} \\
& =& 2.
 \end{array} $$
\end{solu}
\begin{exa}\label{exa:pol-coor3}
Find $\dint _D e^{-x^2-xy-y^2} \ \d{A}$, where
$$D = \{(x,y)\in \reals^2: x^2 + xy + y^2 \leq 1\}.
$$ \end{exa} \begin{solu}
 Completing squares $$ x^2 + xy + y^2 =  \left(x + \frac{y}{2}\right)^2 + \left(\frac{\sqrt{3}y}{2}\right)^2.  $$ Put $U= x + \frac{y}{2}$, $V= \frac{\sqrt{3}y}{2}$.
The integral becomes $$\begin{array}{lll}\dint _{\{x^2 + xy + y^2
\leq 1\}} e^{-x^2-xy-y^2}\d{x} \d{y} & = & \frac{2}{\sqrt{3}}\dint
_{\{U^2 +V^2 \leq 1\}} e^{-(U^2 + V^2)}\d{U} \d{V}. \end{array}
$$Passing to polar coordinates, the above equals $$ \frac{2}{\sqrt{3}}\int _0 ^{2\pi}\int _{0} ^1  \rho e^{-\rho^2}\d{\rho}\d{\theta} =  \dfrac{2\pi}{\sqrt{3}} (1 - e^{-1}).   $$
\end{solu}
\begin{exa}\label{exa:pol-coor4}
Evaluate $\int _{\cal R} \dfrac{1}{(x^2+y^2)^{3/2}}\d{A}$ over the
region $\left\{(x,y)\in\reals^2:x^2+y^2\leq 4, y\geq 1\right\}$
(figure \ref{fig:pol-coor4}).
\end{exa}
\begin{solu}
The radius sweeps from $r=\dfrac{1}{\sin\theta} $ to $r=2$. The
desired integral is $$\begin{array}{lll}\int _{\cal R}
\dfrac{1}{(x^2+y^2)^{3/2}}\d{A} & = & \int _{\pi/6} ^{5\pi /6} \int
_{\csc \theta} ^{2}\dfrac{1}{r^2} \d{r}\d{\theta}\\
& = & \int _{\pi/6} ^{5\pi /6} \left(\sin\theta-\dfrac{1}{2}\right)\d{\theta}\\
& = &\sqrt{3} -\dfrac{\pi}{3}.
\end{array}$$
\end{solu}
\begin{exa}
Evaluate $\int _R (x^3+y^3)\d{A}$ where $R$ is the region bounded by
the ellipse $\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1$ and the first
quadrant, $a>0$ and $b>0$.
\begin{solu}
Put $x=ar\cos \theta$, $y=br\sin \theta$. Then
$$x = ar\cos\theta \implies \d{x} = a\cos\theta\d{r} - ar\sin\theta\d{\theta}, $$
$$y = br\sin\theta \implies \d{y} = b\sin\theta\d{r} + br\cos\theta\d{\theta}, $$
whence
$$\d{x} \wedge \d{y} = (abr\cos^2\theta + abr\sin^2\theta)\d{r}\wedge\d{\theta} = abr\d{r}\wedge\d{\theta}. $$
Observe that on the ellipse
$$\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1 \implies \dfrac{a^2r^2\cos^2\theta}{a^2}+\dfrac{b^2r^2\sin^2\theta}{b^2}=1\implies r=1.  $$
Thus the required integral is
$$\begin{array}{lll}\int _R (x^3+y^3)\d{A} & = & \int _0 ^{\pi/2} \int _0 ^1 abr^4(\cos ^3\theta + \sin ^3\theta)\d{r}\d{\theta} \\
& = & ab\left(\int _0 ^1 r^4\d{r}\right)\left( \int _0 ^{\pi/2}
(a^3\cos ^3\theta + b^3\sin ^3\theta)\d{\theta}\right)\\
& = & ab\left(\dfrac{1}{5}\right)\left(\dfrac{2a^3+2b^3}{3}\right)\\
& = & \dfrac{2ab(a^3+b^3)}{15}.
 \end{array}$$

\end{solu}
\end{exa}
\section*{\psframebox{Homework}}

\begin{pro}\label{pro:inside-circles}
Evaluate $\dint _{\cal R} xy\d{A}$ where ${\cal R}$ is the region
$${\cal R} =\left\{(x,y)\in\reals^2: x^2+y^2\leq 16, x\geq 1, y \geq
1\right\},$$as in the figure \ref{fig:inside-circles1}. Set up the
integral in both Cartesian and polar coordinates.
\begin{answer}
The integral in Cartesian coordinates is
$$\begin{array}{lll}  \int _{1} ^{\sqrt{15}} \int _{1} ^{\sqrt{16-y^2}}xy\d{x}\d{y}
& = & \dfrac{1}{2}\int \int _{1} ^{\sqrt{15}} 15y-y^3 \d{y}\\
& = & \dfrac{49}{2}.
\end{array}$$



The integral in polar coordinates is $$\begin{array}{lll}\dint
_{\arcsin \frac{1}{4}} ^{\frac{\pi}{4}} \dint _{1/\sin \theta}
^4r^3\sin\theta\cos\theta  \d{r}\d{\theta}
  + \dint  _{\frac{\pi}{4}} ^{\arccos \frac{1}{4}}\dint _{1/\cos \theta} ^4r^3\sin\theta\cos\theta  \d{r}\d{\theta} & =
& \dfrac{1}{4}\dint _{\arcsin \frac{1}{4}} ^{\frac{\pi}{4}}
\left(4^4-\dfrac{1}{\sin^4\theta}\right)\sin\theta\cos\theta
\d{\theta}\\
& & \quad
  + \dfrac{1}{4}\dint  _{\frac{\pi}{4}} ^{\arccos \frac{1}{4}}\left(4^4-\dfrac{1}{\cos^4\theta}\right)\sin\theta\cos\theta
  \d{\theta}\\
  & = & \dfrac{4^4}{4}\dint  _{\arcsin \frac{\pi}{4}} ^{\arccos
  \frac{1}{4}} \sin\theta\cos \theta\d{\theta} \\ & & \quad -  \dfrac{1}{4}\dint  ^{\frac{\pi}{4}}
  _{\arcsin
  \frac{1}{4}} (\cot \theta)(\csc^2\theta) \d{\theta} \\ & & \quad -\dfrac{1}{4}\dint  _{\frac{\pi}{4}} ^{\arccos
  \frac{1}{4}} (\tan\theta)(\sec^2\theta)\d{\theta}\\
  & = & 28-\dfrac{7}{4}-\dfrac{7}{4}\\
  & = & \dfrac{49}{2}
\end{array}$$

\end{answer}
\end{pro}
\vspace{2cm}
\begin{figure}[!hptb]
\centering \psset{unit=1pc}
\psaxes[labels=none,linewidth=2pt](0,0)(-4,-4)(4,4)
\pstGeonode[PointName=none,PointSymbol=none](0,0){O}(1,1){A}(1.732050808,1){B}(1,1.732050808){C}(4,0){D}
\pstInterLC[PointName=none,PointSymbol=none]{A}{B}{O}{D}{M}{M'}
\pstInterLC[PointName=none,PointSymbol=none]{A}{C}{O}{D}{N}{N'}
\pscustom[fillcolor=red,fillstyle=solid]{
\psline(A)(M')\pstArcOAB{O}{M'}{N'}\psline(N')(A) }
\vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:inside-circles}.}\label{fig:inside-circles1}
\end{figure}


\begin{pro}

Find $$\dint \limits_D (x^2 - y^2) \d{A} $$ where
$$D = \{(x, y)\in\reals^2|(x - 1)^2 + y^2 \leq 1\}.$$
\begin{answer} Using polar coordinates,
$$\begin{array}{lll}
\dint \limits_D x^2 - y^2 \d{x}\d{y} & = & \int _{-\pi/2}
^{\pi/2}\left(\int ^{2\cos\theta} _0 \rho^3 \ \d{\rho}\right)
(\cos^2\theta - \sin^2\theta) \d{\theta} \\
& = & 8 \int _0 ^{\pi/2} \cos^4\theta(\cos^2\theta - \sin^2\theta) \
\d{\theta} \\
& = & \pi.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Find $$\dint \limits_D \sqrt{xy} \d{A}$$ where
$$D = \{(x, y)\in\reals^2|(x^2 + y^2)^2 \leq 2xy\}.$$
\begin{answer} Using polar coordinates,
$$\begin{array}{lll}
\dint \limits_D \sqrt{xy} \d{x}\d{y} & = & 4\int _{0}
^{\pi/4}\left(\int ^{\sqrt{\sin 2\theta}} _0 \rho\sqrt{\rho
^2\cos\theta\sin\theta} \ \d{\rho}\right) \d{\theta} \\
& = & \dfrac{4}{3} \int _0 ^{\pi/4} (\sqrt{\sin
2\theta})^3\sqrt{\cos\theta\sin\theta} \ \d{\theta} \\
& = & \dfrac{4}{3\sqrt{2}} \int _0 ^{\pi/4} \sin^2 2\theta \ \d{\theta} \\
& = & \dfrac{\pi\sqrt{2}}{12}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}Find $\dint _D f \d{A}$ where $$D =
\{(x, y)\in\reals^2:b^2x^2 + a^2y^2 = a^2b^2, (a, b)\in ]0;+\infty[
\ {\rm fixed}\}$$ and $f(x, y) = x^3 + y^3$. \begin{answer} Using $x
= a\rho \cos \theta$, $y = b\rho\sin\theta,$ the integral becomes
$$
(ab)\left(\int _0 ^{2\pi} a^3\cos^3\theta +
b^3\sin^3\theta\d{\theta}\right)\left(\int _0 ^{1} \rho^4
\d{\rho}\right)  = \frac{2}{15}(ab)(a^3 + b^3). $$
\end{answer}
\end{pro}
\begin{pro}
Let $a>0$ and $b>0$. Prove that
$$ \int _R \sqrt{\dfrac{a^2b^2-a^2y^2-b^2x^2}{a^2b^2+a^2y^2+b^2x^2}}\d{A} =\dfrac{\pi ab(\pi -2)}{8},$$
where $R$ is the region bounded by the ellipse
$\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1$ and the first quadrant.
\end{pro}
\begin{pro}
Prove that
$$ \int _R \dfrac{y}{\sqrt{x^2+y^2}}\d{x}\d{y}=\sqrt{2}-1, $$
where $$R=\{(x,y)\in \reals^2:0<x<1, o<y<x^2\}.$$
\end{pro}
\begin{pro}
Prove that the ellipse $$(x - 2y + 3)^2 + (3x + 4y - 1)^2 = 4$$
bounds an area of $\dfrac{2\pi}{5}$.
\end{pro}
\begin{pro} Find $$\dint \limits_D \sqrt{x^2 + y^2} \d{A} $$ where $$D =
\{(x, y)\in\reals^2|x \geq 0, y \geq 0, x^2 + y^2 \leq 1, x^2 + y^2
- 2y \geq
 0\}.$$
\begin{answer} Using polar coordinates,
$$\begin{array}{lll}
\dint \limits_D f(x, y) \d{A} & = & \int _{0} ^{\pi/6}\left(\int
_{2\sin\theta} ^1 \rho^2 \ \d{\rho}\right)
\d{\theta} \\
& = & \dfrac{1}{3} \int _0 ^{\pi/6} (1 - 8\sin^3\theta) \ \d{\theta} \\
& = & \dfrac{\pi}{18} - \dfrac{16}{9} + \sqrt{3}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro} Find $\dint _D f \d{A}$ where
$$D =  \{(x, y)\in\reals^2|y \geq 0, x^2 + y^2 - 2x \leq 0\}$$ and
$f(x, y) = x^2y$.  \begin{answer} Using polar coordinates the
integral becomes
$$\int _0 ^{\pi/2}\left(\int _0 ^{2\cos\theta} \rho^4 \d{\rho}\right) \cos^2\theta\sin\theta \d{\theta} = \frac{4}{5}.$$

\end{answer}
\end{pro}
\begin{pro}
Let $D=\{(x,y)\in \reals^2: x\geq 1, x^2+y^2 \leq 4\}$. Find $\int
_D x\d{A}$.
\end{pro}

\begin{pro} Find $\dint _D f \d{A}$ where
$$D =  \{(x, y)\in\reals^2|x \geq 1, x^2 + y^2 - 2x \leq 0\}$$ and
$f(x, y) = \frac{1}{(x^2 + y^2)^2}$. \begin{answer} Using polar
coordinates the integral becomes
$$\int _{-\pi/4} ^{\pi/4}\left(\int_{1/\cos\theta} ^{2\cos\theta} \frac{1}{\rho^3}\d{\rho}\right)\d{\theta}  =
\int_0 ^{\pi/4} \left(\cos^2\theta -
\frac{\sec^2\theta}{4}\right)\d{\theta} = \frac{\pi}{8}.
$$
\end{answer}
\end{pro}

\begin{pro}
 Let $$D = \{(x, y) \in \reals^2: x^2 + y^2 - y \leq 0, x^2 + y^2
- x \leq 0\}.$$ Find the integral $$\dint_D (x +
y)^2\d{A}.$$\begin{answer} Put  $$D' = \{(x, y) \in \reals^2:
 y \geq x, x^2 + y^2 - y \leq 0, x^2 + y^2 - x \leq 0\}.$$ Then
 the integral equals$$2\dint_{D'} (x + y)^2\d{x}\d{y}.$$Using polar coordinates the integral equals
$$\begin{array}{lll}2\int _{\pi/4} ^{\pi/2}(\cos\theta + \sin\theta)^2\left(\int_0 ^{\cos\theta} \rho^3{\rm d\rho}\right) \d{\theta}
& = & \frac{1}{2}\int _{\pi/4} ^{\pi/2} \cos^4\theta (1 +
2\sin\theta\cos\theta)\d{\theta} \\ &  = &  \frac{3\pi}{64} -
\frac{5}{48}. \end{array}$$
\end{answer}
\end{pro}
\begin{pro}
 Let $D = \{(x, y)\in\reals^2| y \leq x^2
+ y^2 \leq 1\}$. Compute
$$\dint _{D} \frac{\d{A}}{(1 + x^2 + y^2)^2}.$$
\begin{answer} Observe that $D = D_2 \setminus D_1$ where $D_2$ is the disk
limited by the equation $x^2 + y^2 = 1$ and $D_1$ is the disk
limited by the equation $x^2 + y^2 = y.$ Hence
$$\dint _{D} \frac{\d{x}\d{y}}{(1 + x^2 + y^2)^2} = \dint _{D_2} \frac{\d{x}\d{y}}{(1 + x^2 + y^2)^2}
- \dint _{D_1} \frac{\d{x}\d{y}}{(1 + x^2 + y^2)^2}.$$ Using polar
coordinates we have
$$\dint _{D_2} \frac{\d{x}\d{y}}{(1 + x^2 + y^2)^2} =
\int _{0} ^{2\pi}\int_0 ^1 \frac{\rho}{(1 + \rho^2)^2} \d{\rho}
\d{\theta} =  \frac{\pi}{2}$$and
$$\begin{array}{lll}\dint _{D_1} \frac{\d{x}\d{y}}{(1 + x^2 + y^2)^2} &
=& 2\int _{0} ^{\pi/2}\int_0 ^{\sin\theta} \frac{\rho}{(1 +
\rho^2)^2} \d{\rho} \d{\theta} =  \int _0 ^{\pi/2}
\frac{\sin^2\theta \d{\theta}}{1 + \sin^2\theta} \\ & = & \int _0
^{+\infty}\frac{\d{t}}{t^2 + 1} -  \frac{{\rm d}t}{2t^2 + 1} =
\frac{\pi}{2} - \frac{\pi\sqrt{2}}{4}. \\ \end{array}
$$(We evaluated this last integral using $t = \tan\theta$) Finally, the integral equals
$$\frac{\pi}{2} - \left(\frac{\pi}{2} -
\frac{\pi\sqrt{2}}{4}\right) = \frac{\pi\sqrt{2}}{4}.$$



\end{answer}
\end{pro}


\begin{pro}
Evaluate $$\dint \limits_{\{(x,y)\in\reals^2: x \geq 0, y \geq 0,
x^4 + y^4 \leq 1\}} \ \ x^3y^3 \sqrt{1 - x^4-y^4} \ \d{A}
$$using $x^2 = \rho\cos \theta$, $y^2 = \rho\sin\theta$.
\begin{answer} We have $$2x\d{x} = \cos\theta\d{\rho} -
\rho\sin\theta\d{\theta}, \ \ \ 2y\d{y} = \sin\theta\d{\rho} +
\rho\cos\theta\d{\theta},
$$whence $$ 4xy\d{x}\wedge \d{y} = \rho\d{\rho}\wedge\d{\theta}.    $$
It follows that $$\begin{array}{lll} x^3y^3 \sqrt{1 - x^4-y^4} \
\d{x}\wedge\d{y} & = & \frac{1}{4}(x^2y^2)(\sqrt{1 - x^4 -
y^4})(4xy\ \d{x}\wedge \d{y}) \\ & = &
\frac{1}{4}(\rho^{3}\cos\theta\sin\theta\sqrt{1-\rho^2})\d{\rho}\wedge\d{\theta}
\end{array}$$ Observe that $$x^4 + y^4 \leq 1 \implies \rho^2\cos^2\theta +
\rho^2\sin^2\theta \leq 1 \implies \rho \leq 1.$$Since the
integration takes place on the first quadrant, we have $0 \leq
\theta \leq \pi/2$. Hence the integral becomes
$$\begin{array}{lll} \int _0 ^{\pi/2} \int _0 ^1  \frac{1}{4}(\rho^{3}\cos\theta\sin\theta\sqrt{1-\rho^2})\d{\rho}\d{\theta} & = &
\frac{1}{4}\left(\int _0
^{\pi/2}\cos\theta\sin\theta\d{\theta}\right)\left(\int _0
^1\rho^{3}\sqrt{1 - \rho^2}\d{\rho}\right) \\
& = & \frac{1}{4}\cdot\frac{1}{2}\cdot\frac{2}{15} \\ & = &
\frac{1}{60}.
\end{array} $$


\end{answer}
\end{pro}


\begin{pro}
William Thompson (Lord Kelvin) is credited to have said: ``A
mathematician is someone to whom
$$\int _0 ^{+\infty} e^{-x^2} \d{x}= \frac{\sqrt{\pi}}{2}$$is
as obvious as twice two is four to you. Liouville was a
mathematician.'' Prove that $$\int _0 ^{+\infty} e^{-x^2} \d{x}=
\frac{\sqrt{\pi}}{2}$$ by following these steps.
\begin{dingautolist}{202}
\item  Let $a > 0$ be a real number and put $D_a = \{(x,
y)\in\reals^2| x^2 + y^2 \leq a^2\}$. Find
$$I_a = \dint _{D_a} e^{-(x^2 + y^2)} \ \d{x} \d{y}.$$
\item  Let $a > 0$ be a real number and put $\Delta_a = \{(x,
y)\in\reals^2| |x| \leq a, |y| \leq a\}$. Let
$$J_a = \dint _{\Delta_a} e^{-(x^2 + y^2)} \ \d{x} \d{y}.$$Prove that
$$I_a \leq J_a \leq I_{a\sqrt{2}}.$$
\item  Deduce that
$$\int _0 ^{+\infty} e^{-x^2} \d{x}= \frac{\sqrt{\pi}}{2}.$$

\end{dingautolist}
\begin{answer}
\begin{dingautolist}{202}
\item   Using polar coordinates
$$I_a = \int_0 ^{2\pi}\left(\int _0 ^a\rho e^{-\rho^2}\d{\rho}\right)\d{\theta} = \pi(1 - e^{-a^2}).$$
\item   The domain of integration of $J_a$ is a square of side
$2a$ centred at the origin. The respective domains of integration of
$I_a$ and $I_{a\sqrt{2}}$ are the inscribed and the exscribed
circles to the square. \item  First observe that
$$J_a = \left(\int_{-a} ^a e^{-x^2}\d{x}\right)^2.$$ Since both
$I_a$ and $I_{a\sqrt{2}}$ tend to $\pi$ as $a\rightarrow +\infty$,
we deduce that $J_a \rightarrow \pi.$ This gives the result.

\end{dingautolist}
\end{answer}
\end{pro}
\begin{pro}
Let $D = \{(x,y)\in \reals^2: 4 \leq x^2 + y^2 \leq 16\}$ and
$f(x,y) = \dfrac{1}{x^2 + xy + y^2}$. Find $\dint \limits_D
f(x,y)\d{A}$.
\begin{answer}
$$\begin{array}{lll}
\dint \limits_{4 \leq x^2 + y^2 \leq 16} \dfrac{1}{x^2 + xy +
y^2}\d{A} & = & \int _0 ^{2\pi} \int _2 ^4 \dfrac{r}{r^2 +
r^2\sin\theta\cos\theta}\d{r}\d{\theta} \\
& = & \int _0 ^{2\pi} \int _2 ^4 \dfrac{1}{r(1 +
\sin\theta\cos\theta)}\d{r}\d{\theta} \\
& = & \left(\int _0 ^{2\pi} \dfrac{\d{\theta}}{1 +
\sin\theta\cos\theta}\right)\left(\int _2 ^4 \dfrac{\d{r}}{r}\right) \\
& = &  \left(\int _0 ^{2\pi} \dfrac{\d{\theta}}{1 +
\sin\theta\cos\theta}\right)\log 2\\
& = &  2\left(\int _0 ^{2\pi} \dfrac{\d{\theta}}{2 + \sin
2\theta}\right)\log 2 \\
& = &  4\left(\int _0 ^{\pi} \dfrac{\d{\theta}}{2 + \sin
2\theta}\right)\log 2 \\
& = & 4I\log 2,
\end{array}$$so the problem reduces to evaluate $I = \int _0 ^{\pi} \dfrac{\d{\theta}}{2 +
\sin 2\theta}$. To find this integral, we now use what has been
dubbed as ``the world's sneakiest substitution''\footnote{by Michael
Spivak, whose {\em Calculus} book I recommend greatly.}: we put
$\tan \theta = t$. In so doing we have to pay attention to the fact
that $\theta \mapsto \tan \theta $ is not continuous on $[0;\pi]$,
so we split the interval of integration into two pieces, $[0;\pi] =
[0;\frac{\pi}{2}] \cup ]\frac{\pi}{2};\pi]$. Then $\sin 2\theta =
\dfrac{2t}{1+t^2}$, $\cos 2\theta = \dfrac{1-t^2}{1+t^2}$,
$\d{\theta} = \dfrac{\d{t}}{1+t^2}$. Hence

$$\begin{array}{lll} \int _0 ^{\pi} \dfrac{\d{\theta}}{2 +
\sin 2\theta}  & = &  \int _0 ^{\pi/2} \dfrac{\d{\theta}}{2 + \sin
2\theta} +  \int _{\pi/2} ^{\pi} \dfrac{\d{\theta}}{2 +
\sin 2\theta}\\
&  = & \int _0 ^{+\infty} \dfrac{\frac{\d{t}}{1+t^2}}{2 +
\frac{2t}{1+t^2}} + \int ^0 _{-\infty} \dfrac{\frac{\d{t}}{1+t^2}}{2
+ \frac{2t}{1+t^2}} \\ & =  & \int _0 ^{+\infty}
\dfrac{\d{t}}{2(t^2+t+1)} + \int ^0 _{-\infty}
\dfrac{\d{t}}{2(t^2+t+1)} \\ & = & \dfrac{2}{3}\int _0 ^{+\infty}
\dfrac{\d{t}}{(\frac{2t}{\sqrt{3}}+\frac{1}{\sqrt{3}})^2+1} +
\dfrac{2}{3}\int ^0 _{-\infty}
\dfrac{\d{t}}{(\frac{2t}{\sqrt{3}}+\frac{1}{\sqrt{3}})^2+1}
\\ & = & \dfrac{\sqrt{3}}{3}\Big| _0 ^{+\infty}\arctan
\left(\dfrac{2t\sqrt{3}}{3}+\frac{\sqrt{3}}{3}\right) +
\dfrac{\sqrt{3}}{3}\Big| ^0 _{-\infty}\arctan
\left(\dfrac{2t\sqrt{3}}{3}+\frac{\sqrt{3}}{3}\right) \\ & = &
\dfrac{\sqrt{3}}{3}\left(\dfrac{\pi}{2}-\dfrac{\pi}{6}\right) +
\dfrac{\sqrt{3}}{3}\left(\dfrac{\pi}{6}-\left(-\dfrac{\pi}{2}\right)\right)
\\
& = & \dfrac{\pi\sqrt{3}}{3}.\end{array}$$ We conclude that
$$\dint \limits_{4 \leq x^2 + y^2 \leq 16} \dfrac{1}{x^2 + xy +
y^2}\d{A} = \dfrac{4\pi\sqrt{3}\log 2}{3}.   $$

\end{answer}
\end{pro}
\begin{pro}
 Prove that every closed convex region in the
plane of area $ \geq \pi$ has two points which are two units apart.
\begin{answer}Recall from formula \ref{eq:area_inside_curve} that the area
enclosed by a simple closed curve $\Gamma$ is given by $$
\frac{1}{2}\int _\Gamma x\d{y} - y\d{x}.
$$Using polar  coordinates $$\begin{array}{lll}x\d{y} - y\d{x} & = &
(\rho\cos\theta)(\sin\theta\d{\rho} + \rho\cos\theta\d{\theta}) -
(\rho\sin\theta)(\cos\theta\d{\rho} - \rho\sin\theta\d{\theta}) \\
& = & \rho^2\d{\theta}.
\end{array}$$
 Parametrise the curve enclosing the region by polar
coordinates so that the region is tangent to the polar axis at the
origin. Let the equation of the curve be $\rho = f(\theta)$. The
area of the region is then given by
$$\frac{1}{2}\int_0 ^\pi \rho^2 \d{\theta} = \frac{1}{2}\int_0 ^\pi (f(\theta))^2 \d{\theta}
=  \frac{1}{2}\int_0 ^{\pi/2}( (f(\theta))^2  +   (f(\theta +
\pi/2))^2 )\d{\theta} .$$ By the Pythagorean Theorem, the integral
above is the integral of the square of the chord in question. If no
two points are farther than 2 units, their squares are no farther
than 4 units, and so the area
$$< \frac{1}{2}\int_0 ^{\pi/2} 4\d{\theta} = \pi,$$a
contradiction.
\end{answer}
\end{pro}
\begin{pro} In the $xy$-plane, if $R$ is the set of points
inside and on a convex polygon, let $D(x, y)$ be the distance from
$(x, y)$ to the nearest point $R$. Show that
$$\int _{-\infty} ^{+\infty}\int _{-\infty} ^{+\infty} e^{-D(x, y)} \ \d{x} \d{y} = 2\pi +  L +
A,$$where $L$ is the perimeter of $R$ and $A$ is the area of $R$.
\begin{answer} Let $I(S)$ denote the integral sought over a region $S$. Since
$D(x, y) = 0$ inside $R$, $I(R) = A$. Let ${\mathscr  L}$ be a side
of $R$ with length $l$ and let $S({\mathscr  L})$ be the half strip
consisting of the points of the plane having a point on ${\mathscr
L}$ as nearest point of $R$. Set up coordinates $uv$ so that $u$ is
measured parallel to ${\mathscr  L}$ and $v$ is measured
perpendicular to $L$. Then
$$I(S({\mathscr  L})) = \int _{0} ^{l}\int _{0} ^{+\infty} e^{-v} \ \d{u}\d{v} =
l.$$The sum of these integrals over all the sides of $R$ is $L$.


If ${\mathscr  V}$ is a vertex of $R$, the points that have
${\mathscr  V}$ as nearest from $R$ lie inside an angle $S({\mathscr
V})$ bounded by the rays from ${\mathscr  V}$ perpendicular to the
edges meeting at ${\mathscr  V}$. If $\alpha$ is the measure of that
angle, then using polar coordinates
$$I(S({\mathscr  V})) = \int _{0} ^{\alpha}\int _{0} ^{+\infty} \rho e^{-\rho} \ \d{\rho} \d{\theta} =
\alpha.$$The sum of these integrals over all the vertices of $R$ is
$2\pi$. Assembling all these integrals we deduce the result.
\end{answer}
\end{pro}

\section{Three-Manifolds}
\begin{df}
A  {\em $3$-dimensional  oriented manifold of $\reals^3$} is simply
an open set  (body) $V\in \reals^3$, where the $+$ orientation is in
the direction of the outward pointing normal to the body, and
 the $-$ orientation is in the direction of the inward pointing  normal to the body. A general
oriented $3$-manifold is a union of open sets.
\end{df}
\begin{rem}The region $-M$ has opposite orientation to $M$ and
$$ \dint _{-M} \omega = -\dint _M \omega .   $$ We will often write
$$\int _Mf\d{V} $$ where $\d{V}$ denotes the {\em volume
element}.
\end{rem}

\begin{rem}
In this section, unless otherwise noticed, we will choose the
positive orientation for the regions considered. This corresponds
to using the volume form $\d{x}\wedge \d{y}\wedge \d{z}$.
\end{rem}
Let $V \subseteq \reals^3$. Given a function $f:V \rightarrow
\reals$, the integral
$$\dint \limits_V f\d{V} $$is the sum of all the values of $f$ restricted to $V$. In particular,
$$\dint \limits_V \d{V} $$is the oriented volume of $V$.

\begin{exa}
Find $$\dint \limits_{[0;1]^3} \ x^2ye^{xyz} \ \d{V}.$$
\end{exa}
\begin{solu}The integral is
$$\begin{array}{lll}
\int_0 ^1 \left(\int_0 ^1 \left(\int_0 ^1 x^2ye^{xyz}\
\d{z}\right)\d{y}\right) \d{x}& = & \int_0 ^1 \left(\int_0 ^1
x(e^{xy} - 1)\ \d{y}\right) \d{x}\\
& = & \int_0 ^1 (e^x - x - 1) \d{x}\\
& = & e  - \dfrac{5}{2}.
\end{array}$$
\end{solu}
\begin{exa}
Find $\dint \limits_R z \ \d{V}$ if
$$R = \{(x, y, z)\in\reals^3| x \geq 0, y \geq 0, z \geq 0, \sqrt{x}
+ \sqrt{y} + \sqrt{z} \leq 1\}.$$
\end{exa}
\begin{solu} The integral is
$$\begin{array}{lll}
\dint _R z\d{x}\d{y}\d{z} & =  &  \int _0 ^1 z\left(\int _0 ^{(1 -
\sqrt{z})^2}\left( \int _0 ^{(1 - \sqrt{z} - \sqrt{x})^2} \d{y}
\right)\d{x}\right)\
\d{z} \\
& = &  \int _0 ^1 z\left(\int _0 ^{(1 - \sqrt{z})^2} (1 - \sqrt{z} -
\sqrt{x} )^2\d{x}\right)\
\d{z} \\
& = &  \dfrac{1}{6}\int _0 ^1 z(1 - \sqrt{z})^4\
\d{z} \\
 & = & \dfrac{1}{840}.
\end{array}$$
\end{solu}
\begin{exa}
Prove that $$\dint \limits_{V} x \d{V} = \dfrac{a^2bc}{24},
$$where $V$ is the tetrahedron $$V = \left\{(x,y,z)\in\reals^3: x \geq 0, y \geq 0, z \geq 0, \dfrac{x}{a} + \dfrac{y}{b} + \dfrac{z}{c} \leq
1\right\}.$$\end{exa} \begin{solu} We have
$$\begin{array}{lll}\dint \limits_{V} x \d{x}\d{y}\d{z} & = &
\int_0 ^{c}  \int _0 ^{b-bz/c}  \int _0 ^{a - {ay}/{b}-{az}/{c} }         x \d{x}\d{y}\d{z} \\
& = & \frac{1}{2}\int_0 ^{c}  \int _0 ^{b-bz/c}  \left(a - \dfrac{ay}{b}-\dfrac{az}{c}\right)^2\d{y}\d{z} \\
&  = & \frac{1}{6} \int _0 ^c \frac {{a}^{2} \left( -z+c \right) ^{3}b}{{c}^{3}} \d{x} \\
& = & \dfrac{a^2bc}{24}
\end{array}$$
\end{solu}
\vspace{2cm}
\begin{figure}[htpb]
\begin{minipage}{7cm}
\centering \psset{unit=2pc}\pstThreeDCoor[IIIDticks=false,xMin=
0,xMax=3.5,yMin=0,yMax=4.5,zMin=0,zMax=4.5] \pstThreeDNode(0,0,0){O}
     \psdot[linecolor=red](A) \uput[35](O){$O$}
      \pstThreeDNode(3,2,0){A}
     \psdot[linecolor=red](A) \uput[-90](A){$A$}
      \pstThreeDNode(0,3,0){B}
     \psdot[linecolor=red](B) \uput[-90](B){$B$}
     \pstThreeDNode(0,0,2){C}
     \psdot[linecolor=red](C) \uput[0](C){$C$}
     \pstLineAB[linewidth=2pt]{O}{A}
      \pstLineAB[linewidth=2pt]{O}{B}
       \pstLineAB[linewidth=2pt]{O}{C}
       \pspolygon[linewidth=2pt](A)(B)(C)
       \vspace{2cm}\footnotesize\hangcaption{Problem
\ref{pro:vol-integral}.} \label{fig:vol-integral}
\end{minipage} \hfill
\begin{minipage}{7cm}\centering\psset{unit=1pc}
\psaxes[subticks=0,labels=none]{->}(0,0)(-5,-2)(5,5)
\pstGeonode[PosAngle={0,30,210},dotscale=2](3,2){A}(0,3){B}(0,0){C}
\pspolygon[linewidth=2pt](A)(B)(C)
\vspace{1cm}\footnotesize\hangcaption{$xy$-projection.}\label{fig:xyprojection}
\end{minipage}
\end{figure}

\begin{exa}
\label{pro:vol-integral} Evaluate the integral $\dint _{S} x\d{V}$
where $S$ is the (unoriented) tetrahedron with vertices $(0,0,0)$,
$(3,2,0)$, $(0,3,0)$, and $(0,0,2)$. See figure
\ref{fig:vol-integral}.
\end{exa}
\begin{solu}A short computation shews that the plane passing through
$(3,2,0)$, $(0,3,0)$, and $(0,0,2)$ has equation $2x+6y+9z=18$.
Hence, $0 \leq z \leq \dfrac{18-2x-6y}{9}.$ We must now figure out
the $xy$ limits of integration. In figure \ref{fig:xyprojection} we
draw the projection of the tetrahedron on the $xy$ plane. The line
passing through $AB$ has equation $y=-\dfrac{x}{3}+3$. The line
passing through $AC$ has equation $y=\dfrac{2}{3}x$.

We find, finally,
$$ \begin{array}{lll} \dint _{S} x\d{V} & = & \dint _0 ^3 \dint _{2x/3} ^{3-x/3} \dint _0 ^{(18-2x-6y)/9} x\d{z}\d{y}\d{x} \\
& = & \dint _0 ^3 \dint _{2x/3} ^{3-x/3} \dfrac{18x-2x^2-6yx}{9}
\d{y}\d{x}\\
& = & \dint _0 ^3   \dfrac{18xy-2x^2y-3y^2x}{9} \Big| _{2x/3}
^{3-x/3} \d{x}\\
& = &\dint _0 ^3 \left(\dfrac{x^3}{3}-2x^2+3x\right)\d{x} \\
& = & \dfrac{9}{4}
 \end{array}$$


To solve this problem using Maple you may use the code below.
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(Student[VectorCalculus]):}{}%
\mapleinline{active}{1d}{int(x,[x,y,z]=Tetrahedron(<0,0,0>,<3,2,0>,<0,3,0>,<0,0,2>));}{}%
\end{mapleinput}
\end{maplegroup}


\end{solu}

\begin{exa}
Evaluate $\int _R xyz \d{V}$, where $R$ is the solid formed by the
intersection of the parabolic cylinder $z=4-x^2$, the planes $z=0$,
$y=x$, and $y=0$. Use the following orders of integration:
\begin{enumerate}
\item $\d{z}\d{x}\d{y}$
\item $\d{x}\d{y}\d{z}$
\end{enumerate}
\end{exa}
\begin{solu}
We must find the projections of the solid on the the coordinate
planes.
\begin{enumerate}
\item With the order $\d{z}\d{x}\d{y}$, the limits of integration of $z$ can only depend, if at all, on $x$ and $y$.
Given an arbitrary point in the solid,  its lowest $z$ coordinate is
$0$ and its highest one is on the cylinder, so the limits for $z$
are from $z=0$ to $z=4-x^2$. The projection of the solid on the
$xy$-plane is the area bounded by the lines $y=x$, $x=2$, and the
$x$ and $y$ axes.
$$\begin{array}{lll}\int _0 ^2\int _0 ^y\int _0 ^{4-x^2}   xyz \d{z}\d{x}\d{y} &
= &  \dfrac{1}{2}\int _0 ^2 \int _0 ^y  xy(4-x^2)^2 \d{x}\d{y}\\
&
= &  \dfrac{1}{2}\int _0 ^2 \int _0 ^y  y(16x-8x^3+x^5) \d{x}\d{y}\\
&
= &  \int _0 ^2 \left(4y^3-y^5+\dfrac{y^7}{12}\right)\d{y}\\
& = & 8.
\end{array}$$
\item With the order $\d{x}\d{y}\d{z}$, the limits of integration of $x$ can only depend, if at all, on $y$ and $z$.
Given an arbitrary point in the solid,   $x$ sweeps from the plane
to $x=2$, so the limits for $x$ are from $x=y$ to $x=\sqrt{4-z}$.
The projection of the solid on the $yz$-plane is the area bounded by
$z=4-y^2$, and the  $z$ and $y$ axes.
$$\begin{array}{lll}\int _0 ^4\int _0 ^{\sqrt{4-z}}\int _y ^2   xyz \d{x}\d{y}\d{z} &
= &  \dfrac{1}{2}\int _0 ^4 \int _0 ^{\sqrt{4-z}}  (4y-y^3)z \d{y}\d{z}\\
&
= &  \int _0 ^4 \left(2z-\dfrac{z^3}{8}\right)  \d{z}\\
& = & 8.
\end{array}$$
\end{enumerate}
\end{solu}

\section*{\psframebox{Homework}}
\begin{pro}
Compute $\int _E z\d{V}$ where $E$ is the region in the first octant
bounded by the planes $y+z = 1$ and $x+z = 1$.
\begin{answer}
We have
$$\begin{array}{lll}
\int _E z\d{V} & = & \int _0 ^1 \int _0 ^{1-y}\int _0
^{1-z}z\d{x}\d{z}\d{y}
\\
& = & \int _0 ^1 \int _0 ^{1-y}z-z^2\d{z}\d{y}
\\
& = & \int _0 ^1 \dfrac{(1-y)^2}{2}-\dfrac{(1-y)^3}{3}\d{y}
\\
& = &  \dfrac{(1-y)^4}{12}-\dfrac{(1-y)^3}{6}\Big| _0 ^1
\\
& = & =\dfrac{1}{6}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Consider the solid $S$ in the first octant, bounded by the parabolic
cylinder $z=2-\dfrac{x^2}{2}$ and the planes $z=0$, $y=x$, and
$y=0$. Prove that $\dint _S xyz = \dfrac{2}{3}$ first by integrating
in the order $\d{z}\d{y}\d{x}$, and then by integrating in the order
$\d{y}\d{x}\d{z}$.
\end{pro}

\begin{pro}
 Evaluate the integrals $\int _R 1\d{V}$ and  $\int _R x\d{V}$, where $R$ is the
tetrahedron with vertices at $(0,0,0)$, $(1,1,1)$, $(1,0,0)$, and
$(0,0,1)$.
\begin{answer}
Let $A=(1,1,1)$, $B=(1,0,0)$,  $C=(0,0,1)$, and $O=(0,0,0)$. We have
four planes passing through each triplet of points:
$$\begin{array}{lll}P_1: & A, B, C, &  x-y+z=1\\
P_2: & A, B, O & z=y \\
P_3: & A,C, O & x=y \\
P_4: & B, C, O & y = 0. \\
  \end{array}$$
Using the order of integration $\d{z}\d{x}\d{y}$, $z$ sweeps from
$P_2$ to $P_1$, so the limits are $z=y$ to $z=1-x+y$. The projection
of the solid on the $xy$ plane produces the region bounded by the
lines $x=0$, $x=1$ and $x=y$ on the first quadrant of the
$xy$-plane. Thus
$$\begin{array}{lll} \int _0 ^1\int _0 ^{x} \int _y ^{1-x+y} \d{z}\d{y}\d{x} & = &
\dint _0 ^1\int _0 ^{x} (1-x)\d{y}\d{x} \\
& = & \int _0 ^1 \left(x-x^2\right)\d{x}\\
& = & \left(\dfrac{x^2}{2}-\dfrac{x^3}{3}\right)\Big|_0 ^1\\
& = & \dfrac{1}{6}.
\end{array}$$


\bigskip


 We use the same limits of integration as in the previous integral. We have
$$\begin{array}{lll} \int _0 ^1\int _0 ^{x} \int _y ^{1-x+y}x \d{z}\d{y}\d{x} & = &
\int _0 ^1\int _0 ^{x} (x-x^2)\d{y}\d{x} \\
& = & \int _0 ^1 \left(x^2-x^3\right)\d{x}\\
& = & \left(\dfrac{x^3}{3}-\dfrac{x^4}{4}\right)\Big|_0 ^1\\
& = & \dfrac{1}{12}.
\end{array}$$

\end{answer}
\end{pro}

\begin{pro}
Compute $\int _E x\d{V}$   where $E$ is the region in the first
octant bounded by the plane $y=3z$ and the cylinder $x^2+y^2 = 9$.
\begin{answer}
We have
$$
\int _E x\d{V}  = \int _0 ^3 \int _0 ^{\sqrt{9-x^2}}\int _0
^{y/3}x\d{z}\d{y}\d{x}=\dfrac{27}{8}.
$$
\end{answer}
\end{pro}
\begin{pro}
Find $\dint \limits_D \dfrac{\d{V}}{(1+x^2z^2)(1+y^2z^2)}$ where
$$D=\{(x,y,z)\in \reals^3: 0 \leq x \leq 1, 0 \leq y \leq 1, z \geq 0\}.
$$\begin{answer} The desired integral is
$$\begin{array}{lll} \int_0 ^1 \int_0 ^1 \int_0 ^\infty \dfrac{\d{x}\d{y}\d{z}}{(1+x^2z^2)(1+y^2z^2)}
& = & \int_0 ^1 \int_0 ^1 \int_0 ^\infty
\dfrac{1}{x^2-y^2}\left(\dfrac{x^2}{1+x^2z^2}-\dfrac{y^2}{1+y^2z^2}\right)\d{x}\d{y}\d{z}\\
& = & \int_0 ^1 \int_0 ^1 \dfrac{1}{x^2-y^2}\left(x\arctan (xz) -
y\arctan(yz)\right)\Bigg|_{z=0} ^{z=\infty}\d{x}\d{y}\\
& = & \int_0 ^1 \int_0 ^1 \dfrac{\pi
(x-y)}{2(x^2-y^2)}\d{x}\d{y}\\
& = & \int_0 ^1 \int_0 ^1 \dfrac{\pi}{2(x+y)}\d{x}\d{y}\\
& = & \dfrac{\pi}{2}\int _0 ^1 \log (y + 1)  - \log y\d{y} \\
& = & \dfrac{\pi}{2}\cdot( (y + 1)\log (y + 1) - (y + 1) -y\log y + y)\Bigg|_0 ^1 \\
& = & \pi \log 2.
\end{array}$$
\end{answer}
\end{pro}

\section{Change of Variables}
\begin{exa}
Find $$\dint\limits_R (x + y + z)(x + y - z)(x - y - z) \d{V},
$$where $R$ is the tetrahedron bounded by the planes $x + y + z =
0$, $x + y - z= 0$, $x - y - z = 0$, and $2x - z = 1$.
\end{exa}
\begin{solu} We make the change of variables $$  u  = x + y + z \implies
\d{u} = \d{x} + \d{y} + \d{z},$$
$$  v = x + y - z
\implies \d{v} = \d{x} + \d{y} - \d{z},$$
$$  w  = x - y - z
\implies \d{w} = \d{x} - \d{y} -\d{z}.$$ This gives $$\d{u} \wedge
\d{v} \wedge \d{w} = -4\d{x} \wedge \d{y} \wedge \d{z}.
$$ These forms have opposite orientations, so we choose, say,  $$\d{u} \wedge
\d{w} \wedge \d{v} = 4\d{x} \wedge \d{y} \wedge \d{z}
$$ which have the same orientation. Also,
$$ 2x - z = 1 \implies u + v + 2w = 2.$$ The tetrahedron in the
$xyz$-coordinate frame is mapped into a tetrahedron bounded by $u =
0$, $v = 0$, $u + v + 2w = 1 $ in the $uvw$-coordinate frame. The
integral becomes
$$\frac{1}{4}\int _0 ^2 \int _0 ^{1 - v/2} \int _0 ^{2 - v - 2w} uvw\  \d{u}
\d{w}  \d{v} = \dfrac{1}{180}. $$

Consider a transformation to cylindrical coordinates $$(x, y, z) =
(\rho\cos\theta, \rho\sin\theta, z).$$From what we know about polar
coordinates
$$\d{x} \wedge \d{y} = \rho \d{\rho}\wedge \d{\theta}.   $$
Since the wedge product of forms is associative,
$$\d{x} \wedge \d{y} \wedge \d{z} = \rho \d{\rho}\wedge \d{\theta} \wedge\d{z}.   $$
\end{solu}
\begin{exa}
Find $\dint _R z^2\d{x}\d{y}\d{z}$ if
$$R = \{(x, y, z)\in\reals^3| x^2 + y^2 \leq 1, 0 \leq z \leq 1\}.$$

\end{exa}
\begin{solu}  The region of integration is mapped into
$$\Delta = [0; 2\pi]\times[0; 1]\times[0 ; 1]$$ through a
cylindrical coordinate change. The integral is therefore
$$\begin{array}{lll}
\dint _R f(x, y, z)\d{x}\d{y}\d{z}  & = & \left(\int _0 ^{2\pi} \
\d{\theta}\right)\left(\int _0 ^{1} \rho\ \d{\rho}\right)\left(\int
_0 ^{1} z^2\ \d{z}\right)
\\
& = & \dfrac{\pi}{3}.
\end{array}$$
\end{solu}
\begin{exa}
Evaluate $\dint _D (x^2 + y^2)\d{x}\d{y}\d{z}$ over the first octant
region bounded by the cylinders $x^2 + y^2 =1$ and $x^2 + y^2 = 4$
and the planes $z = 0, z = 1,$ $x = 0, x = y$.
\end{exa} \begin{solu} The integral is $$\int _0 ^1  \int _{\pi /4}
^{\pi /2} \int _1 ^2 \rho^3\d{\rho}\d{\theta}\d{z} =
\dfrac{15\pi}{16}.
$$
\end{solu}


\begin{exa}\label{exa:3cylinders}
Three long cylinders of radius $R$ intersect at right angles. Find
the volume of their intersection.
\end{exa}
\begin{solu} Let $V$ be the desired volume. By symmetry, $V = 2^4V'$, where
$$V' = \dint _{D'} \d{x} \d{y}  \d{z},$$
$$D' = \{(x, y, z)\in \reals^3: 0 \leq y \leq x, 0 \leq z, x^2 + y^2 \leq R^2, y^2 + z^2 \leq R^2, z^2 + x^2 \leq R^2\}.$$
In this case it is easier to integrate with respect to $z$ first.
Using cylindrical coordinates
$$\Delta' = \left\{(\theta, \rho, z)\in \left[0;\dfrac{\pi}{4}\right]\times [0; R]\times [0; +\infty[,
0 \leq z \leq \sqrt{R^2 - \rho^2\cos^2\theta}\right\}.$$ Now,
$$\begin{array}{lll}
V' & = & \int _0 ^{\pi/4}\left(\int _0 ^R \left( \int _0 ^{\sqrt{R^2
- \rho^2\cos^2\theta}} \d{z}\right)\rho \d{\rho}
\right) \d{\theta} \\
& = & \int _0 ^{\pi/4}\left(\int _0 ^R \rho\sqrt{R^2 -
\rho^2\cos^2\theta} \d{\rho}
\right) \d{\theta} \\
& = & \int _0 ^{\pi/4}-\dfrac{1}{3\cos^2\theta}\left[ (R^2 -
\rho^2\cos^2\theta)^{3/2}
\right] _0 ^R \d{\theta} \\
& =  & \dfrac{R^3}{3}\int _0 ^{\pi/4} \dfrac{1 - \sin^3\theta}{\cos^2\theta} \d{\theta} \\
& \stackrel{=}{u = \cos\theta} &
\dfrac{R^3}{3}\left([\tan\theta]_0 ^{\pi/4} + \int _1
^{\frac{\sqrt{2}}{2}} \dfrac{1 - u^2}{u^2}\d{u}\right) \\
& = &  \dfrac{R^3}{3}\left(1 - \left[u^{-1} + u\right] _1
^{\frac{\sqrt{2}}{2}}\right)
\\
& = & \dfrac{\sqrt{2} - 1}{\sqrt{2}}R^3.
\end{array}$$
Finally
$$V = 16V' = 8(2 - \sqrt{2})R^3.$$
\end{solu}



Consider now a change to spherical coordinates
$$ x=\rho\cos\theta\sin\phi, \ \  y=\rho\sin\theta\sin\phi, \ \
z=\rho\cos\phi.
$$ We have

$$\begin{array}{lll} \d{x} & = &
\cos\theta\sin\phi\d{\rho} - \rho\sin\theta\sin\phi\d{\theta} +
\rho\cos\theta\cos\phi\d{\phi},    \\
 \d{y} & = & \sin\theta\sin\phi\d{\rho} +
\rho\cos\theta\sin\phi\d{\theta} + \rho\sin\theta\cos\phi\d{\phi},
\\
  \d{z} & = & \cos\phi\d{\rho} - \rho\sin\phi\d{\phi}.  \end{array}   $$ This
gives
$$\d{x}\wedge\d{y}\wedge\d{z}  = -\rho^2\sin\phi\d{\rho}\wedge\d{\theta}\wedge\d{\phi}.  $$
From this derivation, the form
$\d{\rho}\wedge\d{\theta}\wedge\d{\phi}$ is negatively oriented,
and so we choose
$$\d{x}\wedge\d{y}\wedge\d{z}  = \rho^2\sin\phi\d{\rho}\wedge\d{\phi}\wedge\d{\theta} $$
instead.

\begin{exa}
Let $(a, b, c)\in ]0;+\infty[^3$ be fixed. Find $\dint _R xyz\
\d{V}$ if
$$R = \left\{(x, y, z)\in\reals^3:  \dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} +
\dfrac{z^2}{c^2}
 \leq 1, x \geq 0, y \geq 0, z \geq 0\right\}.$$

\end{exa}\begin{solu}We use spherical coordinates, where $$(x, y, z) = (a\rho\cos\theta\sin\phi,
b\rho\sin\theta\sin\phi, c\rho\cos\phi).$$ We have
$$ \d{x}\wedge\d{y}\wedge\d{z} = abc\rho^2\sin\phi \d{\rho}\wedge\d{\phi}\wedge\d{\rho}. $$ The integration region is mapped into
$$\Delta = [0 ; 1] \times [0 ; \dfrac{\pi}{2}]\times [0; \dfrac{\pi}{2}].$$
The integral becomes
$$ (abc)^2\left(\int _0 ^{\pi/2}\cos\theta\sin\theta \ \d{\theta}\right)\left(\int _0 ^{1} \rho^5\ \d{\rho}\right)\left(\int
_0 ^{\pi/2} \cos^3\phi\sin\phi\ \d{\phi}\right) \\
= \dfrac{(abc)^2}{48}.
$$
\end{solu}
 \begin{exa} Let $V = \{(x,y,z)\in\reals^3: x^2 + y^2 + z^2 \leq 9, 1 \leq z \leq
2\}$. Then  $$\begin{array}{lll} \dint \limits_{V} \d{x}\d{y}\d{z} &
= & \int _{0} ^{2\pi}\int _{\pi/2 - \arcsin 2/3} ^{\pi/2 - \arcsin
1/3}   \int _{1/\cos\phi}
^{2/\cos\phi} \rho^2\sin\phi \ \d{\rho} \d{\phi}\d{\theta}\\
& = & \dfrac{63\pi}{4}. \end{array}$$
\end{exa}


\section*{\psframebox{Homework}}
\begin{pro}
Consider the region ${\cal R}$  below the cone $z=\sqrt{x^2+y^2}$
and above the paraboloid $z=x^2+y^2$ for $0 \leq z \leq 1$. Set up
integrals for the volume of this region in Cartesian, cylindrical
and spherical coordinates. Also, find this volume.
\begin{answer}Cartesian:
$$\dint _{-1} ^1\dint _{-\sqrt{1-y^2}} ^{\sqrt{1-y^2}} \dint
_{x^2+y^2} ^{\sqrt{x^2+y^2}} \d{z}\d{x}\d{y} .$$ Cylindrical:
$$\dint _{0} ^1\dint _{0} ^{2\pi} \dint _{r^2} ^{r}
r\d{z}\d{\theta}\d{r} .$$ Spherical: $$\dint _{\pi/4} ^{\pi/2}\dint
_{0} ^{2\pi} \dint _{0} ^{(\cos \phi)/(\sin \phi)^2} r^2\sin\phi
\d{r}\d{\theta}\d{\phi} . $$ The volume is $\dfrac{\pi}{3}$.
\end{answer}
\end{pro}

\begin{pro}
Consider the integral $\dint _{{\cal R}} x \d{V}$, where ${\cal R}$
is the region above the paraboloid $z=x^2+y^2$ and under the sphere
$x^2+y^2+z^2 =4$. Set up integrals for the volume of this region in
Cartesian, cylindrical and spherical coordinates. Also, find this
volume.
\begin{answer}
\noindent
\begin{enumerate}
\item Since $x^2+y^2\leq z\leq \sqrt{4-x^2-y^2}$, we start our
integration with the $z$-variable. Observe that if $(x,y,z)$ is on
the intersection of the surfaces then  $$ z^2+z=4 \implies
z=\dfrac{-1\pm \sqrt{17}}{2}.
$$Since $x^2+y^2+z^2 =4 \implies -2 \leq z \leq 2$, we must have
$z=\dfrac{\sqrt{17}-1}{2}$ only. The projection of the circle of
intersection of the paraboloid and the sphere onto the $xy$-plane
satisfies the equation
$$z^2+z=4 \implies x^2+y^2+(x^2+y^2)^2=4 \implies x^2+y^2=\dfrac{\sqrt{17}-1}{2},  $$a circle of radius
$\sqrt{\frac{\sqrt{17}-1}{2}}$. The desired integral is thus
$$\int _{-\sqrt{\frac{\sqrt{17}-1}{2}}} ^{\sqrt{\frac{\sqrt{17}-1}{2}}} \int _{-\sqrt{\frac{\sqrt{17}-1}{2}-x^2}}  ^{\sqrt{\frac{\sqrt{17}-1}{2}-x^2}} \int _{x^2+y^2} ^{\sqrt{4-x^2-y^2}} x\d{z}\d{y}\d{x}.  $$
\item  The $z$-limits remain the same as in the Cartesian coordinates, but translated into cylindrical coordinates, and so
$r^2\leq z\leq \sqrt{4-r^2}$. The projection of the intersection
circle onto the $xy$-plane is again a circle with centre at the
origin and radius $\sqrt{\frac{\sqrt{17}-1}{2}}$. The desired
integral
$$\int _{0} ^{2\pi} \int _{0}  ^{\sqrt{\frac{\sqrt{17}-1}{2}}} \int _{r^2} ^{\sqrt{4-r^2}} r^2\cos \theta \d{z}\d{r}\d{\theta}.  $$


\item  Observe that $$ z=x^2+y^2 \implies r\cos \phi=r^2(\cos \theta)^2(\sin\phi)^2+r^2(\sin\theta)^2(\sin\phi)^2 \implies
r \in \{0, (\csc \phi)(\cot \phi)\}. $$It is clear that the limits
of the angle $\theta$ are from $\theta =0$ to $\theta =2\pi$. The
angle $\phi$ starts at $\phi=0$.   Now,
$$z=r\cos\phi \implies \cos \phi = \dfrac{\dfrac{\sqrt{17}-1}{2}}{2} \implies \phi = \arccos \left(\dfrac{\sqrt{17}-1}{4}\right)$$

The desired integral
$$\int _{0} ^{2\pi} \int _{0}  ^{\arccos \left(\dfrac{\sqrt{17}-1}{4}\right)} \int _{(\csc \phi)(\cot \phi)} ^{2} r^3\cos \theta\sin ^2 \phi \d{r}\d{\phi}\d{\theta}.  $$

\end{enumerate}


Perhaps it is easiest to evaluate the integral using cylindrical
coordinates. We obtain
$$\int _{0} ^{2\pi} \int _{0}  ^{\sqrt{\dfrac{\sqrt{17}-1}{2}}} \int _{r^2} ^{\sqrt{4-r^2}} r^2\cos \theta \d{z}\d{r}\d{\theta} = 0,  $$
a conclusion that is easily reached, since the integrand is an odd
function of $x$ and the domain of integration is symmetric about the
origin in $x$.
\end{answer}

\end{pro}
\begin{pro}
Consider the region ${\cal R}$  bounded by the sphere
$x^2+y^2+z^2=4$ and the plane $z=1$. Set up integrals for the volume
of this region in Cartesian, cylindrical and spherical coordinates.
Also, find this volume.
\begin{answer}Cartesian:
$$\dint _{-\sqrt{3}} ^{\sqrt{3}}\dint _{-\sqrt{3-y^2}} ^{\sqrt{3-y^2}} \dint
_{1} ^{\sqrt{4-x^2-y^2}} \d{z}\d{x}\d{y} .$$ Cylindrical:
$$\dint _{0} ^{\sqrt{3}}\dint _{0} ^{2\pi} \dint _{1} ^{\sqrt{4-r^2}}
r\d{z}\d{\theta}\d{r} .$$ Spherical: $$\dint _{0} ^{\pi/3}\dint _{0}
^{2\pi} \dint _{1/\cos\phi} ^{2} r^2\sin\phi \d{r}\d{\theta}\d{\phi}
.
$$ The volume is $\dfrac{5\pi}{3}$.

\end{answer}
\end{pro}
\begin{pro}
Prove that the volume enclosed by the ellipsoid
$$\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}+\dfrac{z^2}{c^2}=1
$$is $\dfrac{4\pi abc}{3}$. Here $a>0$, $b>0$, $c>0$.
\end{pro}

\begin{pro}
Compute $\int _E y\d{V}$   where $E$ is the region between the
cylinders  $x^2+y^2=1$ and  \mbox{$x^2+y^2 = 4$}, below the plane
$x-z=-2$ and above the $xy$-plane.
\begin{answer}
We have
$$\int _E y\d{V} = \int _0 ^{2\pi}\int _1 ^2 \int _0 ^{2+r\cos\theta}r^2\sin\theta \d{z}\d{r}\d{\theta} =0. $$
\end{answer}
\end{pro}
\begin{pro}
Prove that $$ \int \limits _{\stackrel{x\geq 0, y \geq
0}{x^2+y^2+z^2\leq R^2}} e^{-\sqrt{x^2+y^2+z^2}}\d{V}=
\pi\left(2-2e^{-R}-2Re^{-R}-R^2e^{-R}\right).$$
\end{pro}

\begin{pro}
Compute $\int _E y^2z^2\d{V}$   where $E$ is bounded by the
paraboloid \mbox{$x=1-y^2-z^2$} and the plane $x=0$.
\begin{answer}
$\dfrac{\pi}{96}$
\end{answer}
\end{pro}

\begin{pro}
Compute $\int _E z\sqrt{x^2+y^2+z^2}\d{V}$   where $E$ is is the
upper solid hemisphere bounded by the $xy$-plane and the sphere of
radius $1$ about the origin.
\begin{answer}
$\dfrac{\pi}{14}$
\end{answer}
\end{pro}




\begin{pro}
Compute the $4$-dimensional integral
$$\iiiint\limits_{x^2 + y^2 + u^2 + v^2 \leq 1} e^{x^2 + y^2 + u^2 + v^2 } \d{x}\d{y}\d{u}\d{v}.   $$
\begin{answer} We put $$x = \rho\cos \theta\sin\phi\sin t; y
=\rho\sin\theta\sin\phi\sin t; u =\rho\cos \phi\sin t; v = \rho\cos
t.
$$ Upon using $\sin^2a+\cos^2a = 1$ three times,
$$\begin{array}{lll}x^2+y^2+u^2+v^2 & =
&r^2\cos^2\theta\sin^2\phi\sin^2 t+r^2\sin^2\theta\sin^2\phi\sin^2t
+ r^2\cos^2\phi\sin^2 t + r^2\cos^2 t \\
& = &r^2\cos^2\theta\sin^2\phi+r^2\sin^2\theta\sin^2\phi
+ r^2\cos^2\phi \\
& = &r^2\cos^2\theta+r^2\sin^2\theta \\
& = & r^2.
\end{array}$$
Now,
$$\begin{array}{lll}\d{x} & = & \cos\theta\sin\phi\sin t\d{r} -\rho\sin\theta\sin\phi\sin t\d{\theta} + \rho\cos \theta\cos\phi\sin t\d{\phi}
+ \rho\cos \theta\sin\phi\cos t\d{t} \\
\d{y} & = & \sin\theta\sin\phi\sin t\d{r} +\rho\cos
\theta\sin\phi\sin t\d{\theta} + \rho\sin\theta\cos\phi\sin
t\d{\phi} +
\rho\sin\theta\sin\phi\cos t\d{t} \\
\d{u} & = & \cos\phi\sin t\d{r} -\rho\sin\phi\sin t\d{\phi} + \rho\cos \phi\cos t\d{t}\\
\d{v}  & = & \cos t\d{r} - \rho\sin t\d{t}   \end{array}.$$After
some calculation,
$$ \d{x}\wedge\d{y}\wedge\d{u}\wedge\d{v} = r^3\sin\phi\sin^2t\d{r}\wedge\d{\phi}\wedge\d{\theta}\wedge\d{t}. $$
Therefore
$$\begin{array}{lll}\iiiint\limits_{x^2 + y^2 + u^2 + v^2 \leq 1} e^{x^2 + y^2 + u^2 + v^2 } \d{x}\d{y}\d{u}\d{v} & = &
\int _{0} ^{\pi}\int _0 ^{2\pi}\int _0 ^\pi\int _0 ^1
r^3e^{r^2}\sin\phi\sin^2t\d{r}\d{\phi}\d{\theta}\d{t} \\ & = &
\left(\int _{0} ^{1} r^3e^{r^2}\d{r}\right)\left(\int _{0} ^{2\pi}
\d{\theta}\right)\left(\int _{0} ^{\pi}\sin\phi
\d{\phi}\right)\left(\int _{0} ^{\pi}\sin^2t
\d{t}\right)\\
& = &
\left(\dfrac{1}{2}\right)(2\pi)(2)\left(\dfrac{\pi}{2}\right) \\
& = & \pi^2.
\end{array}$$

\end{answer}
\end{pro}

\begin{pro}[Putnam Exam 1984] Find $$\dint \limits_R x^1y^9z^8(1 -x-y-z)^4\  \d{x}\d{y}\d{z},   $$
where $$R = \{(x,y,z)\in\reals^3: x \geq 0, y \geq 0, z \geq 0, x +
y + z \leq 1\}.
$$

\begin{answer} We make the change of variables $$u = x + y + z \implies \d{u}
= \d{x} + \d{y} + \d{z},
$$
$$uv = y + z \implies u\d{v} + v\d{u} = \d{y} + \d{z},  $$
$$uvw = z \implies uv\d{w} + uw\d{v} + vw\d{u} = \d{z}.  $$This gives
$$x = u(1- v),     $$
$$y = uv(1- w),$$
$$z = uvw,  $$
$$u^2v\ \d{u}\wedge\d{v}\wedge\d{w}
=\d{x}\wedge\d{y}\wedge\d{z}.$$ To find the limits of integration we
observe that the limits of integration using $\d{x}\wedge \d{y}
\wedge \d{z}$ are
$$ 0 \leq z \leq 1, \ 0 \leq y \leq 1 - z, \ 0 \leq x \leq 1 - y - z.   $$
This translates into
$$ 0 \leq uvw \leq 1, \ 0 \leq uv-uvw \leq 1 - uvw, \ 0\leq u-uv \leq 1 - uv+uvw - uvw.   $$
Thus
$$ 0 \leq uvw \leq 1, \ 0 \leq uv \leq 1 , \ 0\leq u\leq 1 ,
$$which finally give
$$ 0 \leq u \leq 1, \ 0 \leq v \leq 1 , \ 0\leq w\leq 1.
$$
The integral sought is then, using the fact that for positive
integers $m, n$ one has $$\int _0 ^1 x^m(1-x)^n\ \d{x} =
\dfrac{m!n!}{(m+n+1)!},   $$ we deduce,
$$\int _0 ^1\int _0 ^1\int _0 ^1
u^{20}v^{18}w^8(1-u)^4(1-v)(1-w)^9 \ \d{u}\d{v}\d{w},
$$which in turn is
$$
\left(\int_0^1 u^{20}(1-u)^4\d{u}\right)\left(\int_0^1
v^{18}(1-v)\d{v}\right)\left(\int_0^1 w^8(1-w)^9\d{w}\right) =
\frac{1}{265650}\cdot\frac{1}{380}\cdot\frac{1}{437580} $$which is
$$ =  \frac{1}{44172388260000}.$$
\end{answer}
\end{pro}

\section{Surface Integrals}
\begin{df}
A  {\em $2$-dimensional  oriented manifold of $\reals^3$} is simply
a smooth surface $D\in \reals^3$, where the $+$ orientation is in
the direction of the outward normal pointing away from the origin
and the $-$ orientation is in the direction of the inward normal
pointing towards the origin. A general oriented $2$-manifold in
$\reals^3$ is a union of surfaces.
\end{df}
\begin{rem}The surface $-\Sigma$ has opposite orientation to $\Sigma$ and
$$ \int _{-\Sigma} \omega = -\int _\Sigma \omega .   $$
\end{rem}

\begin{rem}
In this section, unless otherwise noticed, we will choose the
positive orientation for the regions considered. This corresponds
to using the ordered basis  $$\{\d{y}\wedge \d{z}, \
\d{z}\wedge\d{x}, \ \d{x}\wedge\d{y}\}.$$
\end{rem}

\begin{df}
Let $f:\reals^3\rightarrow \reals$. The integral of $f$ over the
smooth surface $\Sigma$ (oriented in the positive sense) is given by
the expression  $$\dint \limits_\Sigma f \norm{\d{ ^2{\bf
x}}}.$$Here
$$\norm{\d{ ^2{\bf x}}} = \sqrt{(\d{x} \wedge \d{y})^2 + (\d{z} \wedge \d{x})^2 + (\d{y} \wedge \d{z})^2}$$
is the {\em surface area element}.
\end{df}
\begin{exa}
Evaluate $\dint \limits_\Sigma z\norm{\d{ ^2{\bf x}}}$ where
$\Sigma$ is the outer surface of the section of the paraboloid $z =
x^2 + y^2, 0 \leq z \leq 1.$
\end{exa}
\begin{solu} We parametrise the paraboloid as follows. Let $x = u, y = v, z
= u^2 + v^2.$ Observe that the domain $D$ of $\Sigma$ is the unit
disk $u^2 + v^2 \leq 1$. We see that
$$\d{x} \wedge \d{y} =   \d{u}\wedge \d{v},$$
$$\d{y} \wedge \d{z}  = -2u \d{u}\wedge \d{v}, $$
$$\d{z} \wedge \d{x}  = -2v \d{u}\wedge \d{v},
$$and so
$$\norm{\d{ ^2{\bf x}}} = \sqrt{1 + 4u^2 + 4v^2}\d{u} \wedge \d{v} .$$
Now,
$$\dint \limits_\Sigma z \norm{\d{ ^2{\bf x}}}= \dint \limits_D (u^2 + v^2)\sqrt{1 + 4u^2 + 4v^2}\d{u}\d{v}.
$$To evaluate this last integral we use polar coordinates, and
so
$$\begin{array}{lll}\dint \limits_D (u^2 + v^2)\sqrt{1 + 4u^2 + 4v^2}\d{u}
\d{v} & = & \int _0 ^{2\pi} \int _0 ^1 \rho^3 \sqrt{1 +
4\rho^2} \d{\rho} \d{\theta} \\
& = & \dfrac{\pi}{12}(5\sqrt{5} + \dfrac{1}{5}).
\end{array}$$
\end{solu}
\begin{exa} Find the area of that part of the cylinder $x^2 +
y^2 = 2y$ lying inside the sphere $x^2+y^2+z^2=4$. \end{exa}
\begin{solu} We have $$x^2 + y^2 = 2y \iff x^2 + (y - 1)^2 = 1. $$
We parametrise the cylinder by putting $x = \cos u, y - 1 = \sin u$,
and $z = v$. Hence
$$\d{x} = -\sin u\d{u}, \ \d{y} = \cos u\d{u}, \ \d{z} = d{v},    $$
whence
$$\d{x} \wedge \d{y} =  0, \d{y} \wedge \d{z} = \cos u \d{u} \wedge \d{v},
\d{z} \wedge \d{x} = \sin u\d{u} \wedge \d{v},  $$ and so
$$\begin{array}{lll}\norm{\d{ ^2{\bf x}}} & = & \sqrt{(\d{x} \wedge \d{y})^2 + (\d{z} \wedge \d{x})^2 + (\d{y} \wedge \d{z})^2}\\ &  = & \sqrt{\cos^2u + \sin^2u}\ \d{u}\wedge\d{v} \\
& = & \d{u}\wedge\d{v}.
\end{array}$$The cylinder and the sphere intersect when $x^2 + y^2 = 2y$
and $x^2 + y^2 + z^2 = 4$, that is, when $z^2 = 4 - 2y$, i.e. $v^2 =
4 - 2(1 + \sin u) = 2 - 2\sin u$. Also $ 0 \leq u \leq \pi.$ The
integral is thus
$$\begin{array}{lll} \dint \limits_\Sigma \norm{\d{ ^2{\bf x}}} & = & \int _0 ^{\pi}\int _{-\sqrt{2 - 2\sin u}} ^{\sqrt{2 - 2\sin u}} \d{v}\d{u} = \int _0 ^{\pi} 2\sqrt{2 - 2\sin u } \d{u}\\
& = & 2\sqrt{2} \int _0 ^{\pi} \sqrt{1 - \sin u} \ \d{u} \\
& = & 2\sqrt {2} \left( 4\sqrt {2}-4 \right) . \\
\end{array}
$$
\end{solu}
\begin{exa}
Evaluate  $$\dint \limits_\Sigma x\d{y}\d{z} + (z^2 - zx) \d{z}
\d{x} - xy\d{x} \d{y},
$$where $\Sigma$ is the top side of the triangle with vertices at
$(2,0,0)$, $(0,2,0)$, $(0,0,4)$.
\end{exa}
\begin{solu} Observe that the plane passing through the three given points
has equation $2x + 2y + z = 4$. We project this plane onto the
coordinate axes obtaining
$$ \dint \limits_\Sigma x\d{y}\d{z} = \int _0 ^4 \int _0 ^{2 - z/2} (2-y-z/2) \d{y} \d{z} =  \frac{8}{3},  $$
$$ \dint \limits_\Sigma (z^2 - zx)\d{z}\d{x} = \int _0 ^2 \int _0 ^{4-2x} (z^2-zx) \d{z}  \d{x} =  8,  $$
$$ -\dint \limits_\Sigma xy\d{x}\d{y} = -\int _0 ^2 \int _0 ^{2 - y} xy \d{x}  \d{y} =  -\frac{2}{3},  $$
and hence
$$\dint \limits_\Sigma x\d{y}\d{z} + (z^2 - zx)
\d{z} \d{x} - xy\d{x} \d{y} = 10.
$$
\end{solu}
\section*{\psframebox{Homework}}
\begin{pro}
Evaluate $\dint \limits_\Sigma y \norm{\d{ ^2{\bf x}}}$ where
$\Sigma$ is the surface $z = x + y^2, 0 \leq x \leq 1, 0 \leq y \leq
2.$ \begin{answer} We parametrise the surface by letting $x = u, y =
v, z = u + v^2.$ Observe that the domain $D$ of $\Sigma$ is the
square $[0; 1]\times [0; 2]$. Observe that
$$\d{x} \wedge \d{y}
=   \d{u} \wedge \d{v} ,$$
$$\d{y} \wedge \d{z} = -\d{u} \wedge \d{v}, $$
$$\d{z} \wedge \d{x} = -2v\d{u} \wedge \d{v},
$$and so
$$\norm{\d{ ^2{\bf x}}} = \sqrt{2 + 4v^2}\d{u} \wedge \d{v}.$$
The integral becomes
$$\begin{array}{lll}
\dint \limits_\Sigma y \norm{\d{ ^2{\bf x}}} & = & \int_0 ^2\int _0
^1
v\sqrt{2 + 4v^2}\d{u}\d{v} \\
& = & \left(\int_0 ^1 \d{u}\right) \left(\int_0 ^2 y\sqrt{2 +
4v^2}\d{v}\right) \\
& = & \dfrac{13\sqrt{2}}{3}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Consider the cone $z = \sqrt{x^2+y^2}$. Find the surface area of the
part of the cone which lies between the planes $z = 1$ and $z = 2$.
\begin{answer}
Using $x=r\cos \theta$, $y=r\sin \theta$, $1\leq r \leq 2$, $0 \leq
\theta \leq 2\pi$, the surface area is
$$ \sqrt{2}\dint _0  ^{2\pi}\dint _1 ^2 r\d{r}\d{\theta}=3\pi\sqrt{2}.  $$
\end{answer}
\end{pro}

\begin{pro}
Evaluate $\dint \limits_\Sigma x^2 \norm{\d{ ^2{\bf x}}}$ where
$\Sigma$ is the surface of the unit sphere $x^2 + y^2 + z^2 = 1.$
\begin{answer} We use spherical coordinates, $(x, y, z) =
(\cos\theta\sin\phi, \sin\theta\sin\phi, \cos\phi)$. Here $\theta
\in [0; 2\pi]$ is the latitude and $\phi \in [0; \pi]$ is the
longitude. Observe that
$$\d{x}\wedge\d{y}=
\sin\phi\cos\phi \d{\phi}\wedge\d{\theta} ,$$
$$\d{y}\wedge\d{z} = \cos\theta\sin^2\phi \d{\phi}\wedge\d{\theta},
$$
$$\d{z}\wedge\d{x}= -\sin\theta\sin^2\phi \d{\phi}\wedge\d{\theta},
$$and so
$$\norm{\d{ ^2 {\bf x}}} = \sin\phi \d{\phi}\wedge\d{\theta}.$$
The integral becomes
$$\begin{array}{lll}
\dint \limits_\Sigma x^2 \norm{\d{ ^2{\bf x}}} & = & \int _0 ^{2\pi}
\int _{0} ^{\pi} \cos^2\theta\sin^3\phi \d{\phi}  \d{\theta} \\
& = & \dfrac{4\pi}{3}.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Evaluate $\dint _S z\norm{\d{ ^2{\bf x}}}$ over the conical surface
$z=\sqrt{x^2 + y^2}$ between $z=0$ and $z=1$. \begin{answer} Put $x
= u, y = v, z^2 = u^2 + v^2$. Then
$$\d{x} = \d{u}, \ \d{y} = \d{v}, \ z\d{z} = u\d{u} + v\d{v},    $$
whence
$$\d{x} \wedge \d{y} =  \d{u} \wedge \d{v}, \d{y} \wedge \d{z} = -\dfrac{u}{z}  \d{u} \wedge \d{v},
\d{z} \wedge \d{x} = -\dfrac{v}{z}  \d{u} \wedge \d{v},  $$ and so
$$\begin{array}{lll}\norm{\d{ ^2{\bf x}}} & = &  \sqrt{(\d{x} \wedge \d{y})^2 + (\d{z} \wedge \d{x})^2 + (\d{y} \wedge \d{z})^2} \\
& = & \sqrt{1 + \dfrac{u^2 + v^2}{z^2}}\ \d{u}\wedge\d{v} \\ &  = &
\sqrt{2}\ \d{u}\wedge\d{v}.
\end{array}$$ Hence $$\dint \limits_{\Sigma} \ z\norm{\d{ ^2{\bf x}}} =
\dint\limits_{u^2 + v^2 \leq 1} \sqrt{u^2 + v^2}\ \sqrt{2}\
\d{u}\d{v} = \sqrt{2}\int _0 ^{2\pi}\int _0 ^1  \rho^2\
\d{\rho}\d{\theta} = \dfrac{2\pi\sqrt{2}}{3}.
$$
\end{answer}
\end{pro}

\begin{pro}
You put a perfectly spherical egg through an egg slicer, resulting
in $n$ slices of identical height, but you forgot to peel it first!
Shew that the amount of egg shell in any of the slices is the same.
Your argument must use surface integrals.\begin{answer} If the egg
has radius $R$,  each slice will have height $2R/n$. A slice can be
parametrised by $0 \leq \theta \leq 2\pi$, $\phi_1 \leq \phi \leq
\phi_2$, with $$R\cos\phi_1 - R\cos\phi_2 = 2R/n.$$ The area of the
part of the surface of the sphere in slice is $$\int _0
^{2\pi}\int_{\phi_1} ^{\phi_2} R^2\sin\phi \d{\phi}\d{\theta} = 2\pi
R^2(\cos\phi_1 - \cos\phi_2 ) = 4\pi R^2/n.$$ This means that each
of the $n$ slices has identical area $4\pi R^2 /n$.
\end{answer}
\end{pro}

\begin{pro}
Evaluate  $$\dint \limits_\Sigma xy\d{y}\d{z} - x^2\d{z} \d{x} + (x
+ z)\d{x} \d{y},
$$where $\Sigma$ is the top of the triangular region of the plane $2x + 2y + z =
6$ bounded by the first octant. \begin{answer} We project this plane
onto the coordinate axes obtaining
$$ \dint \limits_\Sigma xy\d{y}\d{z} = \int _0 ^6 \int _0 ^{3-z/2} (3-y-z/2)y \d{y}  \d{z} =  \frac{27}{4},  $$
$$ -\dint \limits_\Sigma x^2\d{z}\d{x} = -\int _0 ^3 \int _0 ^{6-2x} x^2 \d{z}  \d{x} =  -\frac{27}{2},  $$
$$ \dint \limits_\Sigma (x + z)\d{x}\d{y} = \int _0 ^3 \int _0 ^{3 - y} (6 - x - 2y) \d{x}  \d{y} =  \frac{27}{2},  $$
and hence
$$\dint \limits_\Sigma xy\d{y}\d{z} -
x^2\d{z} \d{x} + (x + z)\d{x} \d{y} = \frac{27}{4}.
$$
\end{answer}
\end{pro}
\section{Green's, Stokes', and Gauss' Theorems}
We are now in position to state the general Stoke's Theorem.

\begin{thm}[General Stoke's Theorem]
Let $M$ be a smooth oriented manifold, having boundary $\partial
M$. If $\omega$ is a differential form, then
$$\int _{\partial M} \omega = \int _{M} \d{\omega} .$$
\end{thm}
In $\reals^2$, if $\omega$ is a $1$-form, this takes the name of
{\em Green's Theorem.}
\begin{exa}
Evaluate $\oint _C (x - y^3)\d{x}+ x^3\d{y}$ where  $C$ is the
circle $x^2 + y^2 = 1$.
\end{exa}
\begin{solu} We will first use Green's Theorem and then evaluate the
integral directly. We have
$$\begin{array}{lll}\d{\omega} &  = &  {\rm d}(x - y^3) \wedge \d{x}+ {\rm d}(x^3) \wedge \d{y}\\
& = & (\d{x}- 3y^2\d{y})\wedge \d{x}+ (3x^2\d{x})\wedge \d{y} \\
& = & (3y^2 + 3x^2) \d{x}\wedge \d{y}.
\end{array}$$
The region $M$ is the area enclosed by the circle $x^2 + y^2 = 1. $
Thus by Green's Theorem, and using polar coordinates,
$$\begin{array}{lll}\oint _C (x - y^3)\d{x}+ x^3\d{y} & = &
\int _M (3y^2 + 3x^2) \d{x}\d{y} \\
& = & \int _0 ^{2\pi} \int _0 ^1 3\rho^2 \rho \d{\rho} \d{\theta}
\\
& = & \dfrac{3\pi}{2}. \end{array}$$ {\em Aliter:} We can evaluate
this integral directly, again resorting to polar coordinates.
$$\begin{array}{lll}\oint _C (x - y^3)\d{x}+ x^3\d{y} & = &
\int _0 ^{2\pi} (\cos\theta -\sin^3\theta)(-\sin\theta)\d{\theta} + (\cos^3\theta)(\cos\theta)\d{\theta} \\
& = & \int _0 ^{2\pi} (\sin^4\theta + \cos^4\theta -
\sin\theta\cos\theta)\d{\theta}.
\end{array}$$
To evaluate the last integral, observe that $1 = (\sin^2\theta +
\cos^2\theta )^2 = \sin^4\theta + 2\sin^2\theta\cos^2\theta +
\cos^4\theta$, whence the integral equals
$$\begin{array}{lll}
\int _0 ^{2\pi} (\sin^4\theta + \cos^4\theta -
\sin\theta\cos\theta)\d{\theta} & = & \int _0 ^{2\pi} (1 -
2\sin^2\theta\cos^2\theta  - \sin\theta\cos\theta)\d{\theta} \\
& = & \dfrac{3\pi}{2}.
\end{array}$$
\end{solu}


In general, let $$ \omega = f(x,y)\d{x} + g(x,y)\d{y}  $$ be a
$1$-form in $\reals ^2$. Then
 $$\begin{array}{lll} \d{\omega}  & =  & \d{f(x,y)}\wedge\d{x} + \d{g(x,y)}\wedge\d{y} \\
 &=& \left(\dfrac{\partial }{\partial x}f(x,y)\d{x}+ \dfrac{\partial }{\partial y}f(x,y)\d{y}\right)\wedge\d{x}
 +  \left(\dfrac{\partial }{\partial x}g(x,y)\d{x}+ \dfrac{\partial }{\partial
 y}g(x,y)\d{y}\right)\wedge\d{y}\\
 & = &  \left(\dfrac{\partial }{\partial x}g(x,y)- \dfrac{\partial }{\partial y}f(x,y)\right)\d{x}\wedge\d{y}
 \end{array}$$
which gives the classical Green's Theorem
$$  \int \limits _{\partial M}  f(x,y)\d{x} + g(x,y)\d{y} = \int \limits _M   \left(\dfrac{\partial }{\partial x}g(x,y)- \dfrac{\partial }{\partial y}f(x,y)\right)\d{x}\d{y}.$$

In $\reals^3$, if $\omega$ is a 2-form, the above theorem takes the
name of {\em Gau\ss '} or the {\em Divergence Theorem.}

\bigskip

\begin{exa}
 Evaluate $\dint _S (x - y)\d{y}  \d{z} + z\d{z}  \d{x}- y\d{x} \d{y}$ where $S$ is the surface of the sphere $$x^2 + y^2 + z^2 = 9$$
and the positive direction is the outward normal.
\end{exa}
\begin{solu} The region $M$ is the interior of the sphere $x^2 + y^2 + z^2
= 9$. Now,
$$\begin{array}{lll}\d{\omega} &  = & (\d{x}- \d{y}) \wedge\d{y} \wedge \d{z}
+ \d{z}\wedge\d{z} \wedge \d{x}-  \d{y}\wedge\d{x}\wedge \d{y} \\
& = &  \d{x}\wedge \d{y} \wedge \d{z}. \\
\end{array}$$
The integral becomes
$$\begin{array}{lll}\dint \limits_M \d{x} \d{y}  \d{z} & = &  \dfrac{4\pi}{3}(27)\\ &  = & 36\pi. \end{array}$$
{\em Aliter:} We could evaluate this integral directly. We have
$$\dint _\Sigma (x - y)\d{y}  \d{z}  = \dint _\Sigma x\d{y}  \d{z},
$$since $(x, y , z) \mapsto -y$ is an odd function of $y$ and the
domain of integration is symmetric with respect to $y$. Now,
$$\begin{array}{lll}\dint _\Sigma x\d{y}  \d{z} & = &
\int_{-3} ^3 \int _0 ^{2\pi} |\rho|\sqrt{9 - \rho^2}\d{\rho}
\d{\theta}
\\
& = &  36\pi.
\end{array}
$$
Also
$$\dint _\Sigma z\d{z} \d{x}= 0,
$$since $(x, y , z) \mapsto z$ is an odd function of $z$ and the
domain of integration is symmetric with respect to $z$. Similarly
$$\dint _\Sigma -y\d{x} \d{y}   = 0,
$$since $(x, y , z) \mapsto -y$ is an odd function of $y$ and the
domain of integration is symmetric with respect to $y$.
\end{solu}

In general, let $$ \omega = f(x,y,z)\d{y} \wedge \d{z} +
g(x,y,z)\d{z} \wedge \d{x} + h(x,y,z) \d{x}  \wedge \d{y}
$$ be a $2$-form in $\reals ^3$.
Then
 $$\begin{array}{lll} \d{\omega}  & =  & \d{f(x,y,z)}\d{y} \wedge \d{z} + \d{g(x,y,z)}\d{z}
\wedge \d{x} + \d{h(x,y,z)} \d{x}  \wedge \d{y} \\
 &=& \left(\dfrac{\partial }{\partial x}f(x,y,z)\d{x}+ \dfrac{\partial }{\partial y}f(x,y,z)\d{y}+ \dfrac{\partial }{\partial z}f(x,y,z)\d{z}\right)\wedge \d{y}\wedge\d{z}
\\ & & \quad  +  \left(\dfrac{\partial }{\partial x}g(x,y,z)\d{x}+ \dfrac{\partial
}{\partial
 y}g(x,y,z)\d{y}+ \dfrac{\partial
}{\partial
 z}g(x,y,z)\d{z}\right)\wedge \d{z}\wedge\d{x}\\
 & & \quad  +  \left(\dfrac{\partial }{\partial x}h(x,y,z)\d{x}+ \dfrac{\partial
}{\partial
 y}h(x,y,z)\d{y}+ \dfrac{\partial
}{\partial
 z}h(x,y,z)\d{z}\right)\wedge \d{x}\wedge\d{y}\\
 & = &  \left(\dfrac{\partial }{\partial x}f(x,y,z)+ \dfrac{\partial }{\partial
 y}g(x,y,z) +\dfrac{\partial }{\partial
 z}h(x,y,z)  \right)\d{x}\wedge\d{y} \wedge \d{z},
 \end{array}$$
which gives the classical Gauss's Theorem
$$  \int \limits _{\partial M}  f(x,y,z)\d{y}  \d{z} + g(x,y,z)\d{z}
\d{x} + h(x,y,z) \d{x}  \d{y} = \int \limits _M
\left(\dfrac{\partial }{\partial x}f(x,y,z)+\dfrac{\partial
}{\partial y}g(x,y,z)+\dfrac{\partial }{\partial
z}h(x,y,z)\right)\d{x}\d{y}\d{z}.$$ Using classical notation, if
$$\vector{a}=\colvec{f(x,y,z)\\ g(x,y,z)\\ h(x,y,z)}, \d{\vector{S}} = \colvec{\d{y}\d{z}\\ \d{z}\d{x}\\ \d{x}\d{y}}, $$
then
$$\int  \limits _{ M}  (\nabla \bullet \vector{a} )\d{V} = \int \limits _{\partial M} \vector{a} \bullet \d{\vector{S}}.  $$




\bigskip


The classical Stokes' Theorem occurs when $\omega$ is a $1$-form in
$\reals^3$.

\begin{exa}
Evaluate $\oint _C y\d{x}+ (2x - z)\d{y} + (z - x)\d{z} $ where $C$
is the intersection of the sphere $x^2 + y^2 + z^2 = 4$ and the
plane $z = 1$.
\end{exa}
\begin{solu} We have
$$\begin{array}{lll}
\d{\omega}  & = & (\d{y})\wedge \d{x}+ (2\d{x}- \d{z} )\wedge \d{y}
+ (\d{z} - \d{x})\wedge \d{z}
\\
& = & -\d{x}\wedge \d{y} + 2\d{x}\wedge \d{y} + \d{y} \wedge \d{z} + \d{z} \wedge \d{x}\\
& = & \d{x}\wedge \d{y} + \d{y} \wedge \d{z} + \d{z} \wedge \d{x}.\\
\end{array}$$
Since on $C$, $z = 1$, the surface $\Sigma$ on which we are
integrating is the inside of the circle $x^2 + y^2 + 1 = 4,$ i.e.,
$x^2 + y^2 = 3.$ Also, $z = 1 $ implies $\d{z} = 0$ and so
$$\dint \limits_\Sigma \d{\omega} = \dint \limits_\Sigma \d{x} \d{y}.$$Since this is just the area of the circular region $x^2 +
y^2 \leq 3$, the integral evaluates to
$$ \dint \limits_\Sigma \d{x} \d{y} = 3\pi.$$
\end{solu}


In general, let $$ \omega = f(x,y,z)\d{x} + g(x,y,z)\d{y} ++
h(x,y,z)\d{z}  $$ be a $1$-form in $\reals ^3$. Then
 $$\begin{array}{lll} \d{\omega}  & =  & \d{f(x,y,z)}\wedge\d{x} + \d{g(x,y,z)}\wedge\d{y}+ \d{h(x,y,z)}\wedge\d{z} \\
 &=& \left(\dfrac{\partial }{\partial x}f(x,y,z)\d{x}+ \dfrac{\partial }{\partial y}f(x,y,z)\d{y}+ \dfrac{\partial }{\partial
 z}f(x,y,z)\d{z}\right)\wedge\d{x} \\ & &
 +  \left(\dfrac{\partial }{\partial x}g(x,y,z)\d{x}+ \dfrac{\partial }{\partial
 y}g(x,y,z)\d{y} +\dfrac{\partial }{\partial z}g(x,y,z)\d{z}\right)\wedge\d{y}\\
 & & \quad +  \left(\dfrac{\partial }{\partial x}h(x,y,z)\d{x}+ \dfrac{\partial }{\partial
 y}h(x,y,z)\d{y} +\dfrac{\partial }{\partial z}h(x,y,z)\d{z}\right)\wedge\d{z}\\
 & = &
 \left(\dfrac{\partial }{\partial y}h(x,y,z)- \dfrac{\partial }{\partial
 z}g(x,y,z)\right)\d{y}\wedge\d{z} \\
 & & \quad + \left(\dfrac{\partial }{\partial z}f(x,y,z)- \dfrac{\partial }{\partial
 x}h(x,y,z)\right)\d{z}\wedge\d{x}\\
 & & \quad
  \left(\dfrac{\partial }{\partial x}g(x,y,z)- \dfrac{\partial }{\partial y}f(x,y,z)\right)\d{x}\wedge\d{y}
 \end{array}$$
which gives the classical Stokes' Theorem
$$ \begin{array}{lll} \int \limits _{\partial M}  f(x,y,z)\d{x} + g(x,y,z)\d{y}+h(x,y,z)\d{z} \\
 & = & \int \limits _M   \left(\dfrac{\partial }{\partial y}h(x,y,z)- \dfrac{\partial }{\partial
z}g(x,y,z)\right)\d{y}\d{z}\\
& & \quad + \left(\dfrac{\partial }{\partial z}g(x,y,z)-
\dfrac{\partial
}{\partial x}f(x,y,z)\right)\d{x}\d{y} \\
& & \quad + \left(\dfrac{\partial }{\partial x}h(x,y,z)-
\dfrac{\partial }{\partial y}f(x,y,z)\right)\d{x}\d{y}
.\end{array}$$

Using classical notation, if
$$\vector{a}=\colvec{f(x,y,z)\\ g(x,y,z)\\ h(x,y,z)}, \quad \d{\vector{r}}=\colvec{\d{x}\\ \d{y}\\ \d{z}},\quad  \d{\vector{S}} = \colvec{\d{y}\d{z}\\ \d{z}\d{x}\\ \d{x}\d{y}}, $$
then
$$\int  \limits _{ M}  (\nabla \cross \vector{a} )\bullet \d{\vector{S}} = \int \limits _{\partial M} \vector{a} \bullet \d{\vector{r}}.  $$






\section*{\psframebox{Homework}}
\begin{pro}
Evaluate $\oint _C x^3y\d{x}+ xy\d{y}$ where  $C$ is the square with
vertices at $(0, 0)$, $(2, 0)$, $(2, 2)$ and $(0, 2)$.
\begin{answer}Evaluating this directly would result in evaluating four path
integrals, one for each side of the square. We will use Green's
Theorem. We have
$$\begin{array}{lll}\d{\omega} &  = &  {\rm d}(x^3y) \wedge \d{x}+ {\rm d}(xy) \wedge \d{y}\\
& = & (3x^2y\d{x}+ x^3\d{y}) \wedge \d{x}+ (y\d{x}+
x\d{y} ) \wedge \d{y} \\
& = & (y - x^3)\d{x}\wedge \d{y}.
\end{array}$$
The region $M$ is the area enclosed by the square. The integral
equals
$$\begin{array}{lll}
\oint _C x^3y\d{x}+ xy\d{y} & = & \int _0 ^2 \int _0 ^2 (y
- x^3)\d{x} \d{y} \\
& = & -4.
\end{array}$$
\end{answer}
\end{pro}
\begin{pro}
Consider the triangle $\triangle$ with vertices $A:(0,0)$, $B:(1,
1),$ $C:(-2, 2)$.
\begin{dingautolist}{202} \item If $L_{PQ}$ denotes the equation of the
line joining $P$ and $Q$ find $L_{AB}$,  $L_{AC}$, and $L_{BC}$.
 \item Evaluate
$$\oint _\triangle y^2\d{x}+ x\d{y}.$$

 \item  Find $$\dint\limits_{\mathscr  D} (1 - 2y) \d{x}\wedge \d{y}$$where ${\mathscr  D}$ is the interior of $\triangle$.
\end{dingautolist} \begin{answer}We have
\begin{dingautolist}{202} \item $L_{AB}$ is $y = x$;  $L_{AC}$  is
$y = -x$, and  $L_{BC}$ is clearly $y = -\dfrac{1}{3}x +
\dfrac{4}{3}$.
 \item  We have \renewcommand{\arraystretch}{1.5}
$${\everymath{\dis}\begin{array}{lllll}  \int _{AB} y^2\d{x}+ x\d{y}  & = &  \int _0 ^1 (x^2 + x)\d{x}            & = &  \dfrac{5}{6}  \\
\int _{BC} y^2\d{x}+ x\d{y}  & = &  \int _1 ^{-2}
\left(\left(-\dfrac{1}{3}x + \dfrac{4}{3}\right)^2 -\dfrac{1}{3}x \right)\d{x}            & = &  -\dfrac{15}{2}  \\
\int _{CA} y^2\d{x}+ x\d{y}  & = &  \int _{-2} ^0 (x^2 - x)\d{x}            & = &  \dfrac{14}{3}  \\
\end{array} }$$Adding these integrals we find $$ \oint _\triangle y^2\d{x}+ x\d{y} = -2.$$

 \item   We have
$${\everymath{\dis}\begin{array}{lll}\dint\limits_{\mathscr  D} (1 - 2y) \d{x}\wedge\d{y} & = & \int _{-2} ^0 \left(\int _{-x} ^{-x/3 + 4/3} (1 - 2y)
\d{y}\right) \d{x}\\ & &\quad + \int _{0} ^1 \left(\int _{x} ^{-x/3
+ 4/3}
(1 - 2y)\d{y}\right) \d{x} \\
& = & -\dfrac{44}{27} - \dfrac{10}{27} \\
& = & -2.
\end{array}}$$
\end{dingautolist}
\end{answer}
\end{pro}

\begin{pro}
Problems \ref{pro:form-a} through \ref{pro:form-b} refer to the
differential form $$ \omega = x\d{y}\wedge
\d{z}+y\d{z}\wedge\d{x}+2z\d{x}\wedge \d{y}, $$ and the solid $M$
whose boundaries are the paraboloid $z=1-x^2-y^2$, $0 \leq z \leq 1$
and the disc $x^2+y^2\leq 1$, $z=0$. The surface $\partial M$ of the
solid is positively oriented upon considering  outward normals.
\begin{enumerate}
\item \label{pro:form-a}  Prove that $\d{\omega}=4 \d{x}\wedge\d{y}\wedge\d{z}$.
\item Prove that in Cartesian coordinates, $\dint _{\partial M}\omega =\dint _{-1} ^1  \dint _{-\sqrt{1-x^2}}
^{\sqrt{1-x^2}} \dint _{0} ^{1-x^2-y^2} 4\d{z}\d{y}\d{x}$.
\item Prove that in cylindrical coordinates, $\dint _{M}\d{\omega}=\dint _0 ^{2\pi}\dint
_0 ^1 \dint _0 ^{1-r^2} 4r\d{z}\d{r}\d{\theta} $.
\item  \label{pro:form-b} Prove that $ \dint _{\partial M} x\d{y}\d{z}+y\d{z}\d{x}+2z\d{x}\d{y} =2\pi. $
\end{enumerate}
\end{pro}

\begin{pro}
Problems \ref{pro:gauss-a} through \ref{pro:gauss-b} refer to the
box
$$M=\{(x,y,z)\in\reals^3: 0 \leq x \leq 1, \ 0 \leq y \leq 1, \ 0 \leq z \leq 2 \},  $$
the upper face of the box
$$U=\{(x,y,z)\in\reals^3: 0 \leq x \leq 1, \ 0 \leq y \leq 1, \ z=2 \},  $$
the boundary of the box without the upper top $S=\partial M\setminus
U$,
 and the differential form
$$ \omega = (\arctan y-x^2)\d{y}\wedge\d{z} + (\cos x\sin z-y^3)\d{z}\wedge\d{x} + (2zx+6zy^2)\d{x}\wedge\d{y}. $$


\begin{enumerate}
\item  \label{pro:gauss-a} Prove that
$\d{\omega}=3y^2\d{x}\wedge\d{y}\wedge\d{z}$.
\item Prove that $\dint _{\partial M} (\arctan y-x^2)\d{y}\d{z} + (\cos x\sin z-y^3)\d{z}\d{x} + (2zx+6zy^2)\d{x}\d{y}
=\dint _0 ^2 \dint _0 ^1 \dint _0 ^1 3y^2\d{x}\d{y}\d{z}=2$. Here
the boundary of the box is positively oriented considering outward
normals.
\item Prove that the integral on the
upper face of the box is $\dint _{U} (\arctan y-x^2)\d{y}\d{z} +
(\cos x\sin z-y^3)\d{z}\d{x} + (2zx+6zy^2)\d{x}\d{y}=\dint _0 ^1
\dint _0 ^1 4x+12y^2\d{x}\d{y}=6$.
\item  \label{pro:gauss-b} Prove that the integral on the open box is $\dint _{\partial M\setminus U} (\arctan y-x^2)\d{y}\d{z} + (\cos
x\sin z-y^3)\d{z}\d{x} + (2zx+6zy^2)\d{x}\d{y}=-4$.
\end{enumerate}
\end{pro}

\begin{pro}  Problems \ref{pro:triangle-a} through \ref{pro:triangle-b}
refer to a triangular surface  $T$ in $\reals^3$ and a differential
form $\omega$. The vertices of $T$ are at $A(6,0,0)$, $B(0,12,0)$,
and $C(0,0,3)$. The boundary of of the triangle $\partial T$ is
oriented positively by starting at $A$, continuing to $B$, following
to $C$, and ending again at  $A$. The surface $T$ is oriented
positively by considering the top of the triangle, as viewed from a
point far above the triangle. The differential form is
$$\omega = \left(2xz+\arctan e^x\right)\d{x} + \left(xz+(y+1)^y\right)\d{y} + \left(xy+\dfrac{y^2}{2}+\log (1+z^2)\right)\d{z}.   $$

\begin{enumerate}
\item  \label{pro:triangle-a} Prove that the equation of the plane that
 contains the triangle $T$ is $ 2x+y+4z=12 $.
 \item Prove that $\d{\omega}=y\d{y}\wedge\d{z}
+\left(2x-y\right)\d{z}\wedge\d{x}+z\d{x}\wedge\d{y}$.
\item  \label{pro:triangle-b} Prove that $\dint _{\partial T}  \left(2xz+\arctan e^x\right)\d{x} + \left(xz+(y+1)^y\right)\d{y} + \left(xy+\dfrac{y^2}{2}+\log
(1+z^2)\right)\d{z}=\dint _0 ^3 \dint _0 ^{12-4z} y\d{y}\d{z} +\dint
_0 ^6 \dint _0 ^{3-x/2} 2x\d{z}\d{x}$=108.
\end{enumerate}
\end{pro}


\begin{pro}
Use Green's Theorem to prove that
$$\int _\Gamma (x^2 + 2y^3)\d{y} = 16\pi,
$$where $\Gamma$ is the circle $(x - 2)^2 + y^2 = 4$. Also, prove this
directly by using  a path integral. \begin{answer} Observe that
$$ \d{(x^2 + 2y^3)\wedge\d{y}} = 2x\d{x}\wedge\d{y}.$$Hence by the
generalised Stokes' Theorem the integral equals $$\dint
\limits_{\{(x - 2)^2 + y^2 \leq 4\}} 2x\d{x}\wedge\d{y} = \int
_{-\pi/2} ^{\pi/2} \int _0 ^{4\cos\theta} 2\rho^2 \cos\theta\d{\rho}
\wedge\d\theta = 16\pi .
$$
To do it directly, put $x - 2 = 2\cos t, y = 2\sin t, 0 \leq t \leq
2\pi$. Then the integral becomes
$$\begin{array}{lll}\int _0 ^{2\pi} ((2 + 2\cos t)^2 + 16\sin^3t)\d{2\sin t} & = & \int _0 ^{2\pi} (8\cos t + 16\cos^2 t\\ & & \qquad  + 8\cos^3t + 32\cos t\sin^3t) \d{t}\\ & =  & 16\pi.  \end{array}  $$

\end{answer}
\end{pro}

\begin{pro}
Let $\Gamma$ denote the curve of intersection of the plane $x + y =
2$ and the sphere $x^2 -2x + y^2 - 2y + z^2 = 0$, oriented clockwise
when viewed from the origin. Use Stoke's Theorem to prove that
$$\int \limits_\Gamma y \d{x} + z\d{y} + x\d{z} = -2\pi\sqrt{2}.
$$ Prove this directly by parametrising the boundary of the
surface and evaluating the path integral. \begin{answer} At the
intersection path
$$ 0 = x^2 + y^2 + z^2 - 2(x + y) = (2 - y)^2 + y^2 + z^2 - 4 = 2y^2 - 4y + z^2 = 2(y - 1)^2 + z^2 - 2,  $$
which describes an ellipse on the $yz$-plane. Similarly we get $2(x
- 1)^2 + z^2 = 2$ on the $xz$-plane.  We have
$$ \d{\left(y\d{x} + z\d{y} + x\d{z}\right)}  = \d{y}\wedge\d{x} +
\d{z}\wedge\d{y} + \d{x}\wedge\d{z} = -\d{x}\wedge\d{y}
-\d{y}\wedge\d{z} - \d{z}\wedge\d{x}.$$ Since $\d{x}\wedge \d{y} =
0$, by Stokes' Theorem the integral sought is
$$ -\dint \limits_{2(y - 1)^2 + z^2 \leq 2} \d{y}\d{z}  -\dint \limits_{2(x- 1)^2 + z^2 \leq 2} \d{z}\d{x}
= -2\pi (\sqrt{2}). $$ (To evaluate the integrals you may resort to
the fact that  the area of the elliptical region
$\dfrac{(x-x_0)^2}{a^2} + \dfrac{(y-y_0)^2}{b^2} \leq 1$ is $\pi
ab)$.

\bigskip

If we were to evaluate this integral directly, we would set $$  y =
1 + \cos \theta, \ z =  \sqrt{2}\sin \theta , x = 2 - y = 1 -
\cos\theta .
$$The integral becomes
$$ \int _0 ^{2\pi} (1 + \cos \theta)\d{(1 - \cos \theta)} + \sqrt{2}\sin\theta\d{(1 + \cos\theta)} + (1 - \cos\theta)\d{(\sqrt{2}\sin\theta)} $$
which in turn $$ = \int_0 ^{2\pi} \sin\theta + \sin\theta\cos\theta
- \sqrt{2} + \sqrt{2}\cos\theta \d{\theta} = -2\pi\sqrt{2}.$$
\end{answer}
\end{pro}
\begin{pro}
Use Green's Theorem to evaluate
$$\oint _C (x^3-y^3)\d{x} +(x^3+y^3)\d{y},  $$
where $C$ is the  positively oriented boundary of the region between
the circles $x^2 +y^2 = 2$ and $x^2 +y^2 = 4$.
\end{pro}



\Closesolutionfile{multicaca}

\appendix
\renewcommand{\chaptername}{Appendix}
\chapter{Answers and Hints}\addcontentsline{toc}{section}{Answers and Hints}\markright{Answers and Hints}
 {\small \input{multicaca1}}


{\tiny\chapter*{\rlap{GNU Free Documentation License}}
\phantomsection  % so hyperref creates bookmarks
\addcontentsline{toc}{chapter}{GNU Free Documentation License}
%\label{label_fdl}

 \begin{center}

       Version 1.2, November 2002


 Copyright \copyright{} 2000,2001,2002  Free Software Foundation, Inc.

 \bigskip

     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 \bigskip

 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
\end{center}


\begin{center}
{\bf\large Preamble}
\end{center}

The purpose of this License is to make a manual, textbook, or other
functional and useful document ``free'' in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or
noncommercially. Secondarily, this License preserves for the author
and publisher a way to get credit for their work, while not being
considered responsible for modifications made by others.

This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense.  It
complements the GNU General Public License, which is a copyleft
license designed for free software.

We have designed this License in order to use it for manuals for
free software, because free software needs free documentation: a
free program should come with manuals providing the same freedoms
that the software does.  But this License is not limited to software
manuals; it can be used for any textual work, regardless of subject
matter or whether it is published as a printed book.  We recommend
this License principally for works whose purpose is instruction or
reference.


\begin{center}
{\Large\bf 1. APPLICABILITY AND DEFINITIONS\par} \phantomsection
\addcontentsline{toc}{section}{1. APPLICABILITY AND DEFINITIONS}
\end{center}

This License applies to any manual or other work, in any medium,
that contains a notice placed by the copyright holder saying it can
be distributed under the terms of this License.  Such a notice
grants a world-wide, royalty-free license, unlimited in duration, to
use that work under the conditions stated herein.  The
``\textbf{Document}'', below, refers to any such manual or work. Any
member of the public is a licensee, and is addressed as
``\textbf{you}''.  You accept the license if you copy, modify or
distribute the work in a way requiring permission under copyright
law.

A ``\textbf{Modified Version}'' of the Document means any work
containing the Document or a portion of it, either copied verbatim,
or with modifications and/or translated into another language.

A ``\textbf{Secondary Section}'' is a named appendix or a
front-matter section of the Document that deals exclusively with the
relationship of the publishers or authors of the Document to the
Document's overall subject (or to related matters) and contains
nothing that could fall directly within that overall subject. (Thus,
if the Document is in part a textbook of mathematics, a Secondary
Section may not explain any mathematics.)  The relationship could be
a matter of historical connection with the subject or with related
matters, or of legal, commercial, philosophical, ethical or
political position regarding them.

The ``\textbf{Invariant Sections}'' are certain Secondary Sections
whose titles are designated, as being those of Invariant Sections,
in the notice that says that the Document is released under this
License.  If a section does not fit the above definition of
Secondary then it is not allowed to be designated as Invariant.  The
Document may contain zero Invariant Sections.  If the Document does
not identify any Invariant Sections then there are none.

The ``\textbf{Cover Texts}'' are certain short passages of text that
are listed, as Front-Cover Texts or Back-Cover Texts, in the notice
that says that the Document is released under this License.  A
Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.

A ``\textbf{Transparent}'' copy of the Document means a
machine-readable copy, represented in a format whose specification
is available to the general public, that is suitable for revising
the document straightforwardly with generic text editors or (for
images composed of pixels) generic paint programs or (for drawings)
some widely available drawing editor, and that is suitable for input
to text formatters or for automatic translation to a variety of
formats suitable for input to text formatters.  A copy made in an
otherwise Transparent file format whose markup, or absence of
markup, has been arranged to thwart or discourage subsequent
modification by readers is not Transparent. An image format is not
Transparent if used for any substantial amount of text.  A copy that
is not ``Transparent'' is called ``\textbf{Opaque}''.

Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming
simple HTML, PostScript or PDF designed for human modification.
Examples of transparent image formats include PNG, XCF and JPG.
Opaque formats include proprietary formats that can be read and
edited only by proprietary word processors, SGML or XML for which
the DTD and/or processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.

The ``\textbf{Title Page}'' means, for a printed book, the title
page itself, plus such following pages as are needed to hold,
legibly, the material this License requires to appear in the title
page.  For works in formats which do not have any title page as
such, ``Title Page'' means the text near the most prominent
appearance of the work's title, preceding the beginning of the body
of the text.

A section ``\textbf{Entitled XYZ}'' means a named subunit of the
Document whose title either is precisely XYZ or contains XYZ in
parentheses following text that translates XYZ in another language.
(Here XYZ stands for a specific section name mentioned below, such
as ``\textbf{Acknowledgements}'', ``\textbf{Dedications}'',
``\textbf{Endorsements}'', or ``\textbf{History}''.) To
``\textbf{Preserve the Title}'' of such a section when you modify
the Document means that it remains a section ``Entitled XYZ''
according to this definition.

The Document may include Warranty Disclaimers next to the notice
which states that this License applies to the Document.  These
Warranty Disclaimers are considered to be included by reference in
this License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.


\begin{center}
{\Large\bf 2. VERBATIM COPYING\par} \phantomsection
\addcontentsline{toc}{section}{2. VERBATIM COPYING}
\end{center}

You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License
applies to the Document are reproduced in all copies, and that you
add no other conditions whatsoever to those of this License.  You
may not use technical measures to obstruct or control the reading or
further copying of the copies you make or distribute.  However, you
may accept compensation in exchange for copies.  If you distribute a
large enough number of copies you must also follow the conditions in
section~3.

You may also lend copies, under the same conditions stated above,
and you may publicly display copies.


\begin{center}
{\Large\bf 3. COPYING IN QUANTITY\par} \phantomsection
\addcontentsline{toc}{section}{3. COPYING IN QUANTITY}
\end{center}


If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover.  Both covers must also clearly and legibly identify
you as the publisher of these copies.  The front cover must present
the full title with all words of the title equally prominent and
visible.  You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be
treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.

If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable
Transparent copy along with each Opaque copy, or state in or with
each Opaque copy a computer-network location from which the general
network-using public has access to download using public-standard
network protocols a complete Transparent copy of the Document, free
of added material. If you use the latter option, you must take
reasonably prudent steps, when you begin distribution of Opaque
copies in quantity, to ensure that this Transparent copy will remain
thus accessible at the stated location until at least one year after
the last time you distribute an Opaque copy (directly or through
your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of
the Document well before redistributing any large number of copies,
to give them a chance to provide you with an updated version of the
Document.


\begin{center}
{\Large\bf 4. MODIFICATIONS\par} \phantomsection
\addcontentsline{toc}{section}{4. MODIFICATIONS}
\end{center}

You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing
distribution and modification of the Modified Version to whoever
possesses a copy of it.  In addition, you must do these things in
the Modified Version:

\begin{itemize}
\item[A.]
   Use in the Title Page (and on the covers, if any) a title distinct
   from that of the Document, and from those of previous versions
   (which should, if there were any, be listed in the History section
   of the Document).  You may use the same title as a previous version
   if the original publisher of that version gives permission.

\item[B.]
   List on the Title Page, as authors, one or more persons or entities
   responsible for authorship of the modifications in the Modified
   Version, together with at least five of the principal authors of the
   Document (all of its principal authors, if it has fewer than five),
   unless they release you from this requirement.

\item[C.]
   State on the Title page the name of the publisher of the
   Modified Version, as the publisher.

\item[D.]
   Preserve all the copyright notices of the Document.

\item[E.]
   Add an appropriate copyright notice for your modifications
   adjacent to the other copyright notices.

\item[F.]
   Include, immediately after the copyright notices, a license notice
   giving the public permission to use the Modified Version under the
   terms of this License, in the form shown in the Addendum below.

\item[G.]
   Preserve in that license notice the full lists of Invariant Sections
   and required Cover Texts given in the Document's license notice.

\item[H.]
   Include an unaltered copy of this License.

\item[I.]
   Preserve the section Entitled ``History'', Preserve its Title, and add
   to it an item stating at least the title, year, new authors, and
   publisher of the Modified Version as given on the Title Page.  If
   there is no section Entitled ``History'' in the Document, create one
   stating the title, year, authors, and publisher of the Document as
   given on its Title Page, then add an item describing the Modified
   Version as stated in the previous sentence.

\item[J.]
   Preserve the network location, if any, given in the Document for
   public access to a Transparent copy of the Document, and likewise
   the network locations given in the Document for previous versions
   it was based on.  These may be placed in the ``History'' section.
   You may omit a network location for a work that was published at
   least four years before the Document itself, or if the original
   publisher of the version it refers to gives permission.

\item[K.]
   For any section Entitled ``Acknowledgements'' or ``Dedications'',
   Preserve the Title of the section, and preserve in the section all
   the substance and tone of each of the contributor acknowledgements
   and/or dedications given therein.

\item[L.]
   Preserve all the Invariant Sections of the Document,
   unaltered in their text and in their titles.  Section numbers
   or the equivalent are not considered part of the section titles.

\item[M.]
   Delete any section Entitled ``Endorsements''.  Such a section
   may not be included in the Modified Version.

\item[N.]
   Do not retitle any existing section to be Entitled ``Endorsements''
   or to conflict in title with any Invariant Section.

\item[O.]
   Preserve any Warranty Disclaimers.
\end{itemize}

If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no
material copied from the Document, you may at your option designate
some or all of these sections as invariant.  To do this, add their
titles to the list of Invariant Sections in the Modified Version's
license notice. These titles must be distinct from any other section
titles.

You may add a section Entitled ``Endorsements'', provided it
contains nothing but endorsements of your Modified Version by
various parties--for example, statements of peer review or that the
text has been approved by an organization as the authoritative
definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and
a passage of up to 25 words as a Back-Cover Text, to the end of the
list of Cover Texts in the Modified Version.  Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity.  If the Document
already includes a cover text for the same cover, previously added
by you or by arrangement made by the same entity you are acting on
behalf of, you may not add another; but you may replace the old one,
on explicit permission from the previous publisher that added the
old one.

The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
assert or imply endorsement of any Modified Version.


\begin{center}
{\Large\bf 5. COMBINING DOCUMENTS\par} \phantomsection
\addcontentsline{toc}{section}{5. COMBINING DOCUMENTS}
\end{center}


You may combine the Document with other documents released under
this License, under the terms defined in section~4 above for
modified versions, provided that you include in the combination all
of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your combined
work in its license notice, and that you preserve all their Warranty
Disclaimers.

The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy.  If there are multiple Invariant Sections with the same name
but different contents, make the title of each such section unique
by adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique
number. Make the same adjustment to the section titles in the list
of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled
``History'' in the various original documents, forming one section
Entitled ``History''; likewise combine any sections Entitled
``Acknowledgements'', and any sections Entitled ``Dedications''. You
must delete all sections Entitled ``Endorsements''.

\begin{center}
{\Large\bf 6. COLLECTIONS OF DOCUMENTS\par} \phantomsection
\addcontentsline{toc}{section}{6. COLLECTIONS OF DOCUMENTS}
\end{center}

You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the
rules of this License for verbatim copying of each of the documents
in all other respects.

You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert a
copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.


\begin{center}
{\Large\bf 7. AGGREGATION WITH INDEPENDENT WORKS\par}
\phantomsection \addcontentsline{toc}{section}{7. AGGREGATION WITH
INDEPENDENT WORKS}
\end{center}


A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage
or distribution medium, is called an ``aggregate'' if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.

If the Cover Text requirement of section~3 is applicable to these
copies of the Document, then if the Document is less than one half
of the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic
form. Otherwise they must appear on printed covers that bracket the
whole aggregate.


\begin{center}
{\Large\bf 8. TRANSLATION\par} \phantomsection
\addcontentsline{toc}{section}{8. TRANSLATION}
\end{center}


Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of
section~4. Replacing Invariant Sections with translations requires
special permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections.  You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also
include the original English version of this License and the
original versions of those notices and disclaimers.  In case of a
disagreement between the translation and the original version of
this License or a notice or disclaimer, the original version will
prevail.

If a section in the Document is Entitled ``Acknowledgements'',
``Dedications'', or ``History'', the requirement (section~4) to
Preserve its Title (section~1) will typically require changing the
actual title.


\begin{center}
{\Large\bf 9. TERMINATION\par} \phantomsection
\addcontentsline{toc}{section}{9. TERMINATION}
\end{center}


You may not copy, modify, sublicense, or distribute the Document
except as expressly provided for under this License.  Any other
attempt to copy, modify, sublicense or distribute the Document is
void, and will automatically terminate your rights under this
License.  However, parties who have received copies, or rights, from
you under this License will not have their licenses terminated so
long as such parties remain in full compliance.


\begin{center}
{\Large\bf 10. FUTURE REVISIONS OF THIS LICENSE\par} \phantomsection
\addcontentsline{toc}{section}{10. FUTURE REVISIONS OF THIS LICENSE}
\end{center}


The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time.  Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.  See
http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered version
of this License ``or any later version'' applies to it, you have the
option of following the terms and conditions either of that
specified version or of any later version that has been published
(not as a draft) by the Free Software Foundation.  If the Document
does not specify a version number of this License, you may choose
any version ever published (not as a draft) by the Free Software
Foundation. }




 \QUOTEME{Que a quien robe este libro, o lo tome prestado y no lo
devuelva, se le convierta en una serpiente en las manos y lo venza.
Que sea golpeado por la par\'{a}lisis y todos sus miembros
arruinados. Que languidezca de dolor gritando por piedad, y que no
haya coto a su agon\'{\i}a hasta la \'{u}ltima disoluci\'{o}n. Que
las polillas roan sus entra\~{n}as y, cuando llegue al final de su
castigo, que arda en las llamas del Infierno para siempre.}
{Maldici\'{o}n an\'{o}nima contra los ladrones de libros en el
monasterio de San Pedro, Barcelona.}
\begin{thebibliography}{mmm.m}
\bibitem[BlRo]{BlRo} Thomas BLYTH, Edmund ROBERTSON, {\em Basic Linear Algebra}.
\bibitem[Mun]{Mun} James R. MUNKRES, {\em Analysis on
Manifolds}.
\bibitem[Buck]{Buck} R.C. BUCK, {\em Advanced Calculus}.
\bibitem[Din]{Din} Se\'{a}n DINEEN   {\em Multivariate Calculus and Geometry}
\bibitem[MarTro]{MarTro} Jerrold E. MARSDEN and  Anthony TROMBA, {\em Vector Calculus}
\bibitem[HubHub]{HubHub} John H. HUBBARD and Barbara Burke HUBBARD, {\em Vector Calculus, Linear Algebra, and Differential Forms, A Unified
Approach}.
\bibitem[Lan]{Lan} Serge LANG, {\em Introduction to Linear Algebra}.

\bibitem[Spik]{Spik} Michael SPIVAK, {\em
Calculus on Manifolds: A Modern Approach to Classical Theorems of
Advanced Calculus}.
\bibitem[Edw]{Edw} Harold M.
EDWARDS, {\em Advanced Calculus: A Differential Forms Approach}.
\bibitem[Mun]{Mun} James R. MUNKRES, {\em Analysis on
Manifolds}.
\bibitem[Tod]{Tod} Isaac TODHUNTER, {\em Spherical Trigonometry}.
\end{thebibliography}



\renewcommand{\chaptername}{Index}


 \printindex





\end{document}
