\documentclass[11pt]{article}

\usepackage[utf8x]{inputenc}
\usepackage[L7x]{fontenc}  
\usepackage[pdftex]{graphicx}
\usepackage{fourier}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{wrapfig}
\usepackage{sectsty}
\usepackage{asymptote}
\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}

\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}{\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)}{} \\
  6 October 2014 
\end{center}

\itm Let $f(x,y)=e^{3x+y}$, and suppose that $x=s^2+t^2$ and $y=2+t$. Find $\partial f/\partial s$ and $\partial f/\partial t$ by substitution and by means of the chain rule. Verify that the results are the same for the two methods. 

\sol{The chain rule gives 
\[
\pd{f}{s} = \pd{f}{x}\pd{x}{s}+\pd{f}{x}\pd{x}{s} = 3e^{x+y} (2s) + e^{3x+y}\cdot 0 = 6s e^{3x+y} = 6se^{3s^2+3t^2+2+t}. 
\]
Substitution gives $\pd{}{s}(e^{3s^2+3t^2+2+t})=6se^{3s^2+3t^2+2+t}$. The calculations for $\pd{f}{t}$ are similar. }{\vfill}


\itm A conical ice sculpture melts in such a way that its height decreases at a rate of 0.001 meters per second and its radius decreases at a rate of 0.002 meters per second. At what rate is the volume of the sculpture decreasing when its height reaches 3 meters, assuming that its radius is 2 meters at that time? Express your answer in terms of $\pi$ and  in units of cubic meters per second. 

\sol{Since the volume $V$ of a cone can be expressed in terms of its radius and height as $V = \frac13 \pi r^2 h$, the chain rule implies 
\[
\pd{V}{t} = \pd{V}{r} \pd{r}{t} +  \pd{V}{h} \pd{h}{t} = \frac{1}{3}\pi\left( 2rh \pd{r}{t} + r^2 \pd{h}{t} \right). 
\]
Substituting the given derivatives values, we get $(\pi/3)(2\cdot 3\cdot 2 \cdot 0.002 + 4\cdot 0.001) = 28\pi/3000=\boxed{7\pi/750}$. 
}{\vfill}

\itm Given a nonzero vector $\vec{a}\in \R^n$, what unit vector $\vec{u}\in \R^n$ maximizes the dot product $\vec{a}\cdot\vec{u}$? What unit vector \textit{minimizes} the dot product? Prove that these really are the maximum and minimum, and comment on how this observation relates to the gradient $\nabla f$ of a function $f:\R^n \to \R$. 

\sol{Choosing $\vec{u}= \vec{a}/\|\vec{a}\|$ maximizes the dot product, and
  choosing $\vec{u}= -\vec{a}/\|\vec{a}\|$ minimizes the dot product. The
  Cauchy-Schwarz inequality ensures that these values are extremal. By the
  chain rule, the gradient $\nabla f$ has the property that the
  infinitesimal rate of increase of $f$ in the direction $\vec{u}$ is given
  by $\nabla f\cdot \vec{u}.$ Therefore, the direction of the gradient is
  also the direction of direction of $f$'s greatest increase. Similarly,
  the direction of $-\nabla f$ is the direction of $f$'s greatest
  decrease. }{\vfill}

\iftoggle{solutions}{}{\newpage}

\itm Consider the sphere $S$ passing through the point $P=(1,2,3)$ and centered at the origin. Find the equation of the plane tangent to $S$ at $P$. 

\sol{The sphere $S$ is the set of points for which $x^2+y^2+z^2=14$. If we
  define $f(x,y,z)=x^2+y^2+z^2$, then $S$ is a level surface of $f$. The
  normal to the tangent plane of $S$ at $(x_0,y_0,z_0)$ is given by
  $\left.(\partial f/\partial x,\partial f/\partial y,\partial f/\partial
    z)\right|_{(x_0,y_0,z_0)}$. Differentiating and substituting gives
  $(2,4,6)$ for the normal vector. Substituting into the equation
  $\vec{n}\cdot ((x,y,z)-P)=0$ for the plane with normal $\vec{n}$ at the
  point $P$. In standard form, we get $\boxed{2x+4y+6z=14}$.}{\vfill}

\itm Suppose $f:\R^2 \to \R$. Is it possible for $\pd{f}{x}$ and
$\pd{f}{y}$ to exist at $(0,0)$ while $f$ is not differentiable at $(0,0)$?
Prove that it isn't possible, or provide an example to show that it is
possible.  

\sol{$f(x,y)=xy/(x^2+y^2)$ with $f(0,0)=0$ is not continuous (and hence not
differentiable) at $(0,0)$. However, $f=0$ on the union of the coordinate
axes, so its partial derivatives are both defined and equal to 0. }{\vfill}



\end{document}

