\documentclass[10pt]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[scriptsize]{caption}
\usepackage[makeroom]{cancel}
\usepackage{scalerel}
\usepackage{fancyhdr}

\headheight 0in
\topmargin -1cm
\headsep 1cm
\oddsidemargin 0in
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.5in}

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lhead{{\color{Periwinkle} Author Name}}
\rhead{{\color{Periwinkle} Assignment 1}}
\rfoot{\thepage}

\usepackage{letltxmacro}
\makeatletter
\let\oldr@@t\r@@t
\def\r@@t#1#2{
\setbox0=\hbox{$\oldr@@t#1{#2\,}$}\dimen0=\ht0
\advance\dimen0-0.2\ht0
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}
{\box0\lower0.4pt\box2}}
\LetLtxMacro{\oldsqrt}{\sqrt}
\renewcommand*{\sqrt}[2][\ ]{\oldsqrt[#1]{#2} }
\makeatother

\def\Xint#1{\mathchoice
{\XXint\displaystyle\textstyle{#1}}%
{\XXint\textstyle\scriptstyle{#1}}%
{\XXint\scriptstyle\scriptscriptstyle{#1}}%
{\XXint\scriptscriptstyle\scriptscriptstyle{#1}}%
\!\int}
\def\XXint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
\vcenter{\hbox{$#2#3$}}\kern-.5\wd0}}
\def\ddashint{\Xint=}
\def\dashint{\Xint-}

\DeclareMathOperator{\se}{\searrow}

\begin{document}
\newcommand{\p}{\partial}
\newcommand{\B}{\mathbf}
\newcommand{\f}{\frac}
\newcommand{\df}{\dfrac}
\newcommand{\bel}[1]{\begin{equation}\label{#1}}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\bsel}[1]{\begin{subequations}\label{#1}}
\newcommand{\bse}{\begin{subequations}}
\newcommand{\ese}{\end{subequations}}
\newcommand{\beap}{\begin{appeqa}}
\newcommand{\eeap}{\end{appeqa}}
\newcommand{\refapp}[1]{\newcounter{#1}\setcounter{#1}{\value{equation}}}
\newcommand{\ba}{\begin{array}{cccccc}}
\newcommand{\ea}{\end{array}}
\newcommand{\g}{\gamma}
\newcommand{\G}{\Gamma}
\newcommand{\Ups}{\Upsilon}
\newcommand{\dl}{\delta}
\newcommand{\lm}{\lambda}
\newcommand{\vth}{\vartheta}
\newcommand{\vp}{\varphi}
\newcommand{\vpi}{\varpi}
\newcommand{\s}{\sigma}
\newcommand{\eps}{\epsilon}
\newcommand{\veps}{\varepsilon}
\newcommand{\ra}{\longrightarrow}
\newcommand{\Ra}{\Longrightarrow}
\newcommand{\xra}[2]{\xrightarrow[#1]{#2}}
\newcommand{\bin}[2]{\left(\ba #1 \\ #2 \ea\right)}
\newcommand{\ff}{\protect\hspace{-0.01in} f \protect\hspace{-0.035in} f}
\newcommand{\sm}{\scriptstyle}
\newcommand{\bgreek}[1]{\mbox{\boldmath $#1$}}
\newcommand{\pp}{{\prime\hspace*{-0.01in}\prime}}
\newcommand{\tg}{\operatorname{tg}}
\newcommand{\ctg}{\operatorname{ctg}}
\newcommand{\arctg}{\operatorname{arctg}}
\newcommand{\sgn}{\operatorname{sgn}}
\renewcommand{\mapsto}{\longmapsto}

\begin{center} \Large\bf Full title \end{center}
\section{Section title}
The energy functional in general orthogonal curvilinear 
coordinates $(\xi,\eta)$ with respective scale factors $h_\xi$, $h_\eta$ 
and Jacobian $J=h_\xi h_\eta$ is
\bel{Ups} \Ups(u)=\scaleto{\int\limits_\Omega}{40pt}\Bigg(\g||{\bf n}||+
 \df{1}{2}\Delta\rho g u^2+\lm u\Bigg)\mathrm{d}\Omega,\ee
where $u(\xi,\eta)$ is the surface, ${\bf n}$ is the normal to the function
$F=z-u(\xi,\eta)$, the Jacobian $J$ is contained in the differential 
$\mathrm{d}\Omega$, and the rest of the quantities are as in the typical 
surface tension problem. Introduce a variation $u_\veps=u+\veps v$, 
$|\veps|\ll 1$ with $v$ vanishing on $\p\Omega$ with the aim to calculate 
$\df{\mathrm{d}}{\mathrm{d}\veps}\Ups(u_\veps)\Bigg|_{\veps=0}=0.$
Express the normal as ${\bf n}=(-\nabla u\ \ 1)^\text{T}$, where 
$\nabla u=\Big(u_\xi\bigl/h_\xi \ \ u_\eta\bigl/h_\eta \Big)$. Then 
\bse
\be \df{\mathrm{d}||{\bf n}||}{\mathrm{d}\veps}\Bigg|_{\veps=0}=
 \df{\mathrm{d}}{\mathrm{d}\veps}\Big(1+\nabla(u+\veps v)\cdot
 \nabla(u+\veps v)\Big)^{1/2}\Bigg|_{\veps=0}=\df{1}{||{\bf n}||} \Bigg\{
 \df{u_\xi+\veps v_\xi}{h_\xi}\,\df{v_\xi}{h_\xi}+
 \df{u_\eta+\veps v_\eta}{h_\eta}\,\df{v_\eta}{h_\eta}
 \Bigg\}\Bigg|_{\veps=0}= 
 \df{\nabla u \cdot \nabla v }{||{\bf n}||}\, . \ee
Taking ${\bf f}=\nabla u\bigl/||{\bf n}||$ in the following form of the 
divergence theorem for an arbitrary differentiable vector function 
${\bf f}$ and scalar differentiable function $v$ 
\be \int\limits_\Omega {\bf f}\cdot\nabla v\,\mathrm{d}\Omega=
 \oint\limits_{\p\Omega} v\Big({\bf f}\cdot\mathrm{d}{\bf s}\Big)-
 \int\limits_\Omega v\nabla\cdot{\bf f}\,\mathrm{d}\Omega \ee
and bearing in mind that $v\equiv 0$ on $\p\Omega$ results in
\be \scaleto{\int\limits_\Omega}{40pt} 
 \df{\nabla u \cdot \nabla v }{||{\bf n}||}\,\mathrm{d}\Omega=
 -\scaleto{\int\limits_\Omega}{40pt} v\nabla\cdot
 \Bigg(\df{\nabla u}{||{\bf n}||}\Bigg)\mathrm{d}\Omega. \ee
Then
\be \df{\mathrm{d}}{\mathrm{d}\veps}\Ups(u_\veps)\Bigg|_{\veps=0}=
 \scaleto{\int\limits_\Omega}{40pt}v\Bigg\{
 \df{\Delta\rho g u+\lm}{\g}-
 \nabla\cdot \Bigg(\df{\nabla u}{||{\bf n}||}\Bigg)
 \Bigg\}\mathrm{d}\Omega=0, \ee
and the expression within the curly braces is the Euler-Lagrange equation.
\ese

\subsection{Subsection title}
\input{b1fig}
The parabolic coordinates are defined by
\bel{xy_xieta} x=\xi\eta, \quad y=\df{1}{2}\Big(\eta^2-\xi^2\Big). \ee
The constant $\xi$ curves are upward parabolae 
$y=\df{1}{2}\Big(x^2/\xi^2-\xi^2\Big)$ with focus at the origin and 
directrix $y=-\xi^2$. The constant $\eta$ curves are downward parabolae 
$y=\df{1}{2}\Big(\eta^2-x^2/\eta^2\Big)$ with focus at the origin and 
directrix $y=\eta^2$. Figure \ref{b1fig} shows the mesh. The interesting 
feature about this system is that it allows several distinct types of 
domain shape. When the domain is defined by 
$\Big\{(\xi,\eta)\,|\,0\leqslant\xi\leqslant\xi_\text{ex},\
 0\leqslant\eta\leqslant\eta_\text{ex}\Big\}$, it is eye-shaped (strictly 
speaking only the right half, the left is obtained by reflexion or
 $-\xi_\text{ex}\leqslant\xi\leqslant\xi_\text{ex}$),  
asymmetric if $\xi_\text{ex}\neq\eta_\text{ex}$. When
$\Big\{(\xi,\eta)\,|\,0<\xi_\text{in}\leqslant\xi\leqslant\xi_\text{ex},\
 0<\eta_\text{in}\leqslant\eta\leqslant\eta_\text{ex}\Big\}$, the domain 
is of the shape shown by the curved coloured diamond. Of course, its 
boundaries can be extended along any of the parabolae.

\subsubsection{Subsubsection title}
The Octave code to create figure \ref{b1fig} is as follows.
\begin{verbatim}
clear all
figure(1); clf

xi=-2:0.1:2; lxi=length(xi);
eta=(0:0.1:3)'; leta=length(eta);
Xi=repmat(xi,leta,1);
Eta=repmat(eta,1,lxi);

X=Xi.*Eta;
Y=(Eta.^2-Xi.^2)/2;

h=plot(X,Y,X',Y');
set(h,'color',[0 0 0])
hold on

i=17:27;
j=8:18;
x=[X(i,j(1)); X(i(end),j)'; flipud(X(i,j(end))); flipud(X(i(1),j))'];
y=[Y(i,j(1)); Y(i(end),j)'; flipud(Y(i,j(end))); flipud(Y(i(1),j))'];
p1=patch(x,y,'k');
set(p1,'facecolor',[0 0.47 0.44])

axis equal
\end{verbatim}

\end{document}
