\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}}

\begin{document}
\thispagestyle{empty}

\begin{center}
  18.022 Recitation Quiz \iftoggle{solutions}{(with solutions)}{} \\
  27 October 2014 
\end{center}

\itm (a) What theorem ensures that the function $f(x,y) = 3x + y$, defined on the unit circle centered at the origin, has an absolute maximum? Verify the hypotheses of the theorem. 

\iftoggle{solutions}{}{\vspace{3cm} }

(b) Use the method of Lagrange multipliers to find the maximum value of $f$. 

\sol{(a) We use the extreme value theorem, which says that a continuous
  function defined on a closed and bounded set in $\R^n$ achieves a global
  minimum and a global maximum. The function $f$ is the restriction of a
  linear (and therefore continuous) function defined on $\R^2$, so the
  function is continuous. The set on which is $f$ is defined, the unit
  circle, is closed and bounded. The circle is closed because its
  complement is open, and it is bounded because the distance from the
  origin to a point in the set is bounded above by a constant (the upper
  bound 1 would do). Therefore, the extreme value theorem applies and
  ensures that $f$ achieves a global maximum and a global minimum.

  (b) We are maximizing $f$ subject to the constraint $g(x,y) \colonequals
  x^2 + y^2=1$. The method of Lagrange multipliers tells us that extrema
  occur at solutions to the system $\nabla f = \lambda \nabla g$, where
  $g(x,y) = x^2 + y^2$. Differentiating, we get
\[
\left\{
\begin{array}{r@{\:}c@{\:}l}
 1 &=& x^2 + y^2 \\
 3 &=& 2\lambda x \\
 1 &=& 2\lambda y
\end{array} 
\right.
\]
The second and third equations ensure that $\lambda,$ $x$, and $y$ are all nonzero. Therefore, we may divide the second equation by the third to find that $x = 3y$. Substituting into the first equation gives $y=\pm \frac{1}{\sqrt{10}}$. So the critical points are $\left(\frac{3}{\sqrt{10}},\frac{1}{\sqrt{10}}\right)$ and $\left(\frac{-3}{\sqrt{10}},\frac{-1}{\sqrt{10}}\right)$. Evaluating $f$ at these points, we see that the maximum of $\left(3\cdot 3 + 1\right)/\sqrt{10}=\boxed{\sqrt{10}}$ is at $\left(\frac{3}{\sqrt{10}},\frac{1}{\sqrt{10}}\right)$. 
}{\vfill}

\end{document}
