\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{\proj}{proj}
\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)}{} \\
  10 December 2014 \\
\end{center}

\sol{\textit{For solutions, see page 486 of \href{https://math.berkeley.edu/~strain/170.S13/cov.pdf}{https://math.berkeley.edu/$\sim$strain/170.S13/cov.pdf}}}{}

\itm Consider a rotating cylindrical container of radius $R$ with a
vertical axis, filled with liquid mercury up to height $h$. In this
problem, we'll use calculus of variations to find the shape of the surface
of the liquid.

\subitm Assume that the surface of the liquid is described by the equation
$z = f(r)$ in cylindrical coordinates, where $f$ is some function. Sketch a
graph of $f$ based on physical intuition. Indicate the locations of $R$ and
$h$ on your axes. 

\vfill

\subitm Calculate the potential energy $V$ of the liquid, assuming the
density of the liquid is $\sigma$ and using $g$ to denote the gravitational
constant. Express your answer as an integral in involving $f$.

\vfill

\subitm Calculate the kinetic energy $T$ of the liquid, assuming the angular
velocity of the cylinder is $\omega$. Express your answer as an integral in
involving $f$.

\vfill

\newpage 

\subitm Calculate the volume of the liquid, as an integral in involving
$f$.

\vfill 

\subitm Hamilton's principle says that the shape $f$ will minimize
$T-V$. Also, a generalization of Lagrange multipliers along with the
Euler-Lagrange equations implies the following. The extrema $f(r)$ of
$\int_{r_1}^{r_2}G(r,f,f')\,dr$ subject to the constraint
$\int_{r_1}^{r_2}H(r,f,f')\,dr=C$ for some constant $C$ are solutions of
the system 
\begin{align*}
  \frac{d}{dr}\left(\frac{\partial (G - \lambda H)}{\partial f'}\right)
  &= \frac{\partial(G - \lambda H)}{\partial f} \\
  \int_{r_1}^{r_2}H(r,f,f')\,dr &= C. 
\end{align*}
Note that $f'$ is regarded as an independent variable. Put together the
answers from the previous three parts to find $f$. 


\vfill

\vfill

\vfill

\subitm Explain why your answer shows that the shape of the surface is
independent of the density of the liquid.

\vfill

\end{document}

