\documentclass[11pt]{article}

\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}  
\usepackage[pdftex]{graphicx}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wrapfig}
\usepackage{sectsty}
\usepackage{colonequals}
\usepackage{color}
\usepackage{calc}
\usepackage{etoolbox}

% COMMENT OUT THE SECOND LINE TO MAKE A HANDOUT WITHOUT SOLUTIONS
\newtoggle{solutions}
\toggletrue{solutions}

\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\newtheorem{exercise}{Exercise}

\usepackage{palatino} 
\usepackage{pxfonts} 

\sectionfont{\large}
\sectionfont{\normalsize}

\def\Arg{\mathop{\rm Arg}\nolimits}
\def\Res{\mathop{\rm Res}}
\renewcommand\Im{\mathop{\rm Im}\nolimits}
\renewcommand\Re{\mathop{\rm Re}\nolimits}
\newcommand\Arctan{\mathop{\rm Arctan}\nolimits}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\renewcommand{\P}{\mathbb{P}}
\newcommand{\Chat}{\hat{\mathbb{C}}}
\newcommand{\UHP}{\mathbb{H}}
\DeclareMathOperator{\area}{area}
\DeclareMathOperator{\dist}{dist}
\DeclareMathOperator{\interior}{int}
\DeclareMathOperator{\id}{id}

\pagestyle{empty}

\textwidth = 6.5 in
\textheight = 9 in
\oddsidemargin = -0.125 in
\evensidemargin = 0.0 in
\topmargin = -0.2 in
\headheight = 0.0 in
\headsep = 0.2 in
\parskip = 0.2 in
\parindent = 0.0 in

\def\inv{^{-1}}

\newcounter{prob}
	\setcounter{prob}{1}

\newcounter{subprob}
	\setcounter{subprob}{1}

\newcommand\itm{\theprob.  \stepcounter{prob}\setcounter{subprob}{1}}
\newcommand\subitm{(\alph{subprob}) \refstepcounter{subprob}}

\newcommand\sol[2]{\iftoggle{solutions}{\begin{proof}[Solution] #1\end{proof}}{#2}}
%\newcommand\sol[2]{\iftoggle{solutions}{\textit{Solution}. #1}{#2}}
%\newcommand\sol[2]{#2}


\newcommand{\problem}[1]{
\makebox[0.2cm]{\textbf{\itm}}  \begin{minipage}[t]{\linewidth-0.75cm}
#1
\end{minipage}
}

\newcommand\twomatrix[4]{
\left(
\begin{array}{cc}
#1 & #2 \\
#3 & #4
\end{array}
\right)
}

\renewcommand\vec[1]{\mathbf{#1}}
\newcommand\pd[2]{\frac{\partial #1}{\partial #2}}

\begin{document}
\thispagestyle{empty}

\begin{center}
  18.022 Recitation Handout \iftoggle{solutions}{(with solutions)}{} \\
  19 November 2014 \\
\end{center}
\itm (Open Courseware, 18.022 Fall 2010, Homework \#12) Let $\vec{F}:\R^3 \to \R^3$ be the vector field given by $\vec{F}(x,y,z)=ay^2\vec{i}+2y(x+z)\vec{j}+(by^2 +z^2)\vec{k}$.

(a) For which values of $a$ and $b$ is the vector field $\vec{F}$ conservative?

\iftoggle{solutions}{}{\vfill}

(b) Find a function $f:\R^3 \to \R$ such that $\vec{F} = \nabla f$ for these values. 

\iftoggle{solutions}{}{\vfill}

(c) Find an equation describing a surface $S$ with the property that for every smooth oriented curve $C$ lying on $S$, 
\[
\int_C \vec{F}\cdot d\vec{s} = 0,
\]
for these values.

\iftoggle{solutions}{}{\vfill}

\sol{(a) We calculate the curl of $\vec{F}$ to determine which values of $a$ and $b$ make $\vec{F}$ curl-free. The curl is $\nabla \times \vec{F} =(2by−2y)\vec{i}+(2y−2ay)\vec{k}$, which vanishes for all $y$ when $\boxed{a=1 \text{ and }b=1}.$

  (b) Since $f_x(x,y,z) = y^2$, we have $f(x,y,z) = xy^2 +g(y,z)$ for some function $g$. Differentiating with respect to $y$, we find that $f_y(x,y,z) = 2xy+g_y = 2xy+2yz$, so $g(y,z) = y^2z+h(z)$ for some function $h$. Differentiating with respect to $z$, we find that $f_z(x,y,z) = y^2 + h'(z) = y^2 + z^2$, which implies $h(z) = z^3/3$ . Therefore $f(x,y,z) = xy^2 + y^2z + z^3/3+(\text{constant})$.

(c) Since $F$ is conservative, $\int_C \vec{F}\cdot d\vec{s} = f(b) - f(a)$. If this expression vanishes for all paths lying in $S$, then $S$ is a level surface for $f$. Thus all such surfaces $S$ may be found by choosing a possible value $c$ of $f$ and setting 
\[
S = \left\{(x,y,z)\in \R^3 \,:f(x,y,z) = c\right\}.  \qedhere
\]
}{}

\itm Find the area of the rectangle $D=[0,a]\times[0,b]$ using Green's theorem. 

\sol{We calculate 
\begin{align*}
2 \mathop{\rm area}(D) &=\oint_{\partial D} -y\,dx + x \,dy \\
&= \int_0^a -0\,dx + \int_a^0 -b\,dx + \int_0^b a\,dy + \int_b^0 0\,dy \\
&= 2ab,
\end{align*}
so $\text{area}(D)=\boxed{ab}$. 
}{\vfill}

\iftoggle{solutions}{}{\newpage}

\itm (6.3.19 in \textit{Colley}) Show that the line integral 
\[
\int_C \frac{x\,dx+y\,dy}{\sqrt{x^2+y^2}}
\]
is path-independent, and evaluate it along the semicircular arc from $(2,0)$ to $(-2,0)$. 

\sol{The integral is path independent because the vector field 
\[
\left(\frac{x}{\sqrt{x^2+y^2}},\frac{y}{\sqrt{x^2+y^2}}\right)
\]
is the gradient of $\sqrt{x^2+y^2}$ and is therefore conservative. To evaluate the integral along any path from $(2,0)$ to $(-2,0)$, we just evaluate $\sqrt{x^2+y^2}$ at $(2,0)$ and $(-2,0)$ and subtract:
\[
\sqrt{(-2)^2+0^2} - \sqrt{\rule{0pt}{8pt}2^2+0^2} = \boxed{0}. \qedhere
\] }{\vfill}

\end{document}

