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

\newcommand\itm{\theprob.  \stepcounter{prob}}

\iftoggle{solutions}{
\newcommand\sol[2]{\textit{Solution}. #1}
}
{
\newcommand\sol[2]{#2}
}

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

\begin{document}
\thispagestyle{empty}

\begin{center}
  18.022 Recitation Quiz \iftoggle{solutions}{(with solutions)}{} \\
  17 September 2014 \\
\end{center}

\itm Describe the upper half of the unit sphere centered at the origin
using cylindrical coordinates. 

\sol{We begin with the coordinate $r$, which describes the distance from
  the $z$-axis. The smallest and largest such distances for points on the
  unit sphere are 0 and 1, so we have $0\leq r \leq 1$. For each value of
  $r$, the sphere intersects the cylinder of radius $r$, so $\theta$ ranges
  from $0$ to $2\pi$. For fixed $r$ and $\theta$, the vertical line passing
  through $(r,\theta,0)$ intersects the half-sphere in the interval
  $\left[0,\sqrt{1-r^2}\right]$, by the Pythagorean theorem. Therefore, the
  region is described by
  \begin{align*}
    0 &\leq r \leq 1 \\
    0 &\leq \theta \leq 2\pi \\
    0 &\leq z \leq \sqrt{1-r^2}. 
  \end{align*}
}{}

\end{document}
