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


\itm Find the equation for the plane tangent to the graph of $z=2x+1+y$ at $(x,y) = (3,2)$. Express your answer in standard form. 

\sol{Note that the graph of $z=2x+1+y$ is already a plane! So we can just rearrange to get $2x+y-z=-1$. However, let's solve using calculus methods to show how it would work if we hadn't made that observation. 

Let $f(x,y)=2x+1+y$.  The plane tangent to $z=2x+1+y$ at a point $(x_0,y_0,f(\vec{a}))$ (where $\vec{a}=(x_0,y_0)$) is normal to the vector $\left(\pd{f}{x}(\vec{a}),\pd{f}{y}(\vec{a}),-1\right)$. We calculate $\pd{f}{x} = 2$ and $\pd{f}{y} = 1$ to find that $(2,1,-1)$ is a normal vector. Substituting into $\vec{n}\cdot((x,y,z) -P)$ with $P=(3,2,f(3,2))=(3,2,9)$, we find that the tangent plane is $\boxed{2x+y-z=-1}$.  }{\vfill}

\itm Let $f(x) = (x^3 - 8)/(x-2)$ when $x\neq 2$ and let $f(2) = c_1$. Determine the value of the constant $c_1$ for which $f$ is continuous. Do the same for 
\[
g(x,y) = 
\left\{
\begin{array}{cl}
\frac{3|x|^3+3|y|^3-x^{10}\arctan(1+y)}{|x|^3+|y|^3} & \text{ if }(x,y)\neq (0,0) \\
c_2 & \text{ if }(x,y)=(0,0).
\end{array} 
\right.
\]

\sol{$f(x) = x^2+2x+4$ when $x\neq 2$, so the limit as $x\to 2$ of $f(x)$ is $2^2+2(2)+4=12$. Since a function is continuous at 2 if the limit at 2 exists and equals the value of the function $c_1=4$ is the right choice. 

When $(x,y) \neq (0,0)$, $g(x,y)$ equals
$3-\frac{x^{10}}{|x|^3+|y|^3}\arctan(1+y)$. As $(x,y)\to (0,0)$, the second
term goes to 0. One way to see this is to use the boundedness of arctan and
switch the rest of the expression to polar coordinates. So the limit of
$g(x,y)$ as $(x,y)\to (0,0)$ is $\boxed{3}$. }{\vfill}

\iftoggle{solutions}{}{\newpage}


\itm Consider an arbitrary function $f:\R^2 \to \R$. (a) Does the value of $f(0,0)$ affect the limit at $(0,0)$? In other words, can we change the existence or value of $\lim_{(x,y) \to (0,0)}f(x,y)$ by changing the value of $f(0,0)$? (b) Consider some point $(x_0,y_0)\neq (0,0)$ which is near $(0,0)$. Does the value of $f(x_0,y_0)$ affect the limit at $(0,0)$? 

\sol{The value at $(0,0)$ does not matter, by the definition of a limit. The value at $(x_0,y_0)$ also does not affect the limit, because the existence and value of the limit can determined by considering the values of $f(x,y)$ for $(x,y)$ in (for example) the ball of radius $\frac{1}{2}\sqrt{x_0^2+y_0^2}$ centered at $(0,0)$. This ball does not include the point $(x_0,y_0)$.}{\vfill}

\itm (a) What are the level curves of the function $f(x,y) = x^2 + y^2$? (b) List one vector which is tangent to the level curve through $(3,4)$. (c) Find the gradient of $f$ at $(3,4)$, and verify that the gradient is perpendicular to the tangent line from part (b). (d) Try to state a generalization of this fact to level surfaces of arbitrary functions $f:\R^n \to \R$. (e) Use part (d) to provide a different way of finding the formula for the equation of a plane tangent to the graph of $z=f(x,y)$ at a given point $P$. 

\sol{The level curves are circles centered at the origin, and the tangent to the level curve through $(3,4)$ is $(-4,3)$. The gradient of $f$ is $(2x,2y)$, which at $(3,4)$ equals $(6,8)$. Dotting $(-4,3)$ and $(6,8)$, we see that they are indeed perpendicular. The generalization of this statement is that the gradient of $f$ at a point $P$ is perpendicular to the tangent to the level surface of $f$ at $P$.}{\vfill}



\end{document}

