% https://farside.ph.utexas.edu/teaching/qm/Quantum/node35.html
%  f for gauge, phi->phi+df/dt, A->a-del f
%  pi for mechanical, p for cannonical momentum
% begin preamble
\documentclass[11pt,titlepage]{article}
\usepackage[margin=1in,noheadfoot]{geometry}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage[colorlinks,urlcolor=blue]{hyperref}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{wrapfig}

\newcommand{\e}[1]{\times 10^{#1}}
\newcommand{\q}{\mathrm}
\newcommand{\where}[1][where]{\qquad\mbox{#1}\qquad}
\newcommand{\bs}[1]{\boldsymbol{#1}}
\newcommand{\bh}[1]{\hat{\boldsymbol{#1}}}
\newcommand{\bv}[1]{\vec{\boldsymbol{#1}}}
\newcommand{\bt}[1]{\tilde{\boldsymbol{#1}}}
\newcommand{\ad}{^{\dagger}}
\newcommand{\flow}[1]{\mathcal{E}_{#1}}
\newcommand{\flux}[1]{\Phi_{#1}}
\newcommand{\dslash}{d \hspace{-0.5ex}\rule[1.2ex]{0.6ex}{.1ex}}
\newcommand{\ts}{\textsuperscript}
\def\rcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{ScriptR}}$}\!\!}}
\def\brcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{BoldR}}$}\!\!}}
\def\hrcurs{{\mbox{$\hat \brcurs$}\!}}
%end preamble

\begin{document}
\begin{center}
  {\bf University of Kentucky, Physics 404G \\
    Homework \#4, Rev. B, due Thursday, 2021-09-23 }
\end{center}

\vspace{.3 in}

{\bf 1. Calculus of variations} was foreseen by Pierre de Fermat, who realized that {\it Snell's law} could be viewed as a {\it principle of least time} (or {\it optical path length}) for a ray of light to travel between two points.  He essentially invented {\it calculus} to solve this and other types of minimization problems, although he mislabeled the use of his infinitesimal $\epsilon$ as {\it adequality} instead of more correctly as $\displaystyle\lim_{\epsilon\to 0}$.  The term ``adequality'' for ``approximate equality'' was borrowed from Diophantus, in whose book he penciled {\it Fermat's last theorem} in the margin without proof.

Maupertuis, who felt that ``Nature is thrifty in all of its actions,'' was bothered that time and distance were not treated on an equal footing. He developed the principle of {\bf least action}, minimizing instead the integral $\int v ds = \int 2T/m\,dt$, one of the first appearances of {\it vis viva}. This was further expanded from optics to mechanics by Euler as the {\it abbreviated action} $S_{0}=\int p\,dq$.  The modern action $S=\int\mathcal{L}dt$ and associated equations of stationary action $(\frac{d}{dt}\frac{\partial}{\partial \dot q}- \frac{\partial}{\partial  q})\mathcal{L}=0$ were developed by Lagrange and Hamilton.  This same principle extends to quantum field theory and {\it Feynman path integrals}.  We have already seen that these equations are just Newton's law written in covariant components.  This problem explores the interpretation of the expression in parenthesis as a variational derivative $\frac{\delta}{\delta q}$ for all path variations $\delta q$.

{\bf \quad a)} Minimize the time taken for a ray of light to travel from $P_{1}=(x_{1},y_{1})$ to $P_{2}=(x_{2},y_{2})$ through an interface at $y=0$ between two materials of {\it index of refraction} $n_{1}$ and $n_{2}$.  Assume for now that the shortest path between two points is a straight line, so that the only variable is $x$, where the ray crosses the interface at $y=0$.  Derive Snell's law from your answer.  [bonus: extend your solution to the case of a ray crossing multiple parallel interfaces, and show it is equivalent to $\nabla f(x_{1},x_{2},\ldots)=0$ for crossing points $x_{i}$.]

{\bf \quad b)} Use Fermat's {\it principle of stationary optical path length} to calculate the image of a mirage by minimizing the functional $I[x(y)]=\int n ds=\int n(y)\sqrt{1+x'(y)^{2}}dy$, or setting its {\it functional derivative} $\frac{\delta I}{\delta x} \equiv (-\frac{d}{dy}\frac{\partial}{\partial x'}+\frac{\partial}{\partial x}) n(y)\sqrt{1+x'(y)^{2}}$ to zero for the path $y(x)$.  [\href{http://www.physics.miami.edu/~nearing/mathmethods/mathematical_methods-one.pdf}{Nearing, p. 520}]  Show the differential form of Snell's law, that $n(y)\frac{x'(y)}{\sqrt{1+x'(y)^{2}}} = n \frac{dx}{ds} = n\sin(\theta) = C$ is constant along the path or, rearranging, that $x'(y)=C/\sqrt{n(y)^{2}-C^{2}}$.  To solve this we need to know the index of refraction $n(y)$.  Let us assume it is linear with height, $n(y)=n_{0}+\alpha y$.  Use the substitution $n(y)=C\cosh(\theta)$ to integrate $x'(y)$.  Invert the solution of $x(y)$ to obtain $y=\frac{1}{\alpha}(-n_{0}+C\cosh(\frac{\alpha}{C}(x-x_{0})))$, where $C=n_{0}+\alpha y_{0}=n(y_{0})$ and $x(y_{0})=x_{0}$.  Note that a chain fixed at both ends has the same shape for a similar reason: it also hangs under a linear potential, $V(y)=V_{0}+mgy$, of gravity in this case.

{\bf 2. Phase space of a Harmonic Oscillator}---All of our computer simulations have converted second order ODEs involving $\ddot x$ into first order equations in $u=(x,v)$.  This is formalized in a more symmetric way by Hamilton's equations of the canonical conjugate variables $\bs a=(x,p)$, as discussed in class.

{\bf \quad a)} The Lagrangian for the harmonic oscillator is $\mathcal L=T-V=\frac12 mv^{2}-\frac12 kx^{2}$, where $v=\dot x$.  Calculate the canonical momentum $p=\partial\mathcal{L}/\partial v$, and solve Lagrange's equation of motion~on~$x$.

{\bf \quad b)} Calculate $\mathcal H(p,q) = p\dot q-\mathcal L(\dot q,q)$, obtain Hamilton's equations for this Hamiltonian.  Solve them by treating $(x,p)$ as a complex number $a=\frac{1}{\sqrt{2}}(x\sqrt{k}+ip/\sqrt{m})$ and matching its time derivative with Hamilton's equations.

{\bf \quad c)} Plot the trajectory $a$ in the complex plane.  Show that $\mathcal H=a^{*}a$.  Note that the polar representation $|a|e^{i\phi}$ is called {\it action-angle} coordinates, an alternative to $(x,p)$ with trivial equations of motion.  In quantum mechanics, $\hat{\mathcal H}=\hbar\omega(\hat  a\ad \hat a+\frac12)$, with dimensionless $\hat a=a/\sqrt{\hbar\omega}$.

{\bf \quad d)} Integrate the abbreviated action $S_{0}=\int p\,dx$ around one cycle.  %Note that a circle is the geometric shape with the maximum area, as demanded by Hamilton's {\it principle of stationary action}.

{\bf \quad e)} [bonus: Modify the \href{http://www.pa.uky.edu/~crawford/phy404_fa19/pendulum.m}{code} from H03 to plot the phase space of a simple pendulum, including trajectories fast enough to make complete rotations.  Show how the trajectory changes when critical (also over- and under-) damping is added.]

% {\bf 2. Chaotic Damped Driven Pendulum}

% {\bf \quad a)} Calculate the Lagrangian $\mathcal{L}$, canonical momentum $p_{\theta}$, and Hamiltonian $\mathcal{H}$ to obtain Hamilton's equations for an undamped, undriven pendulum of mass $m=1~\q{kg}$ and length $\ell=1~\q{m}$.  Calculate the maximum velocity $v_{1}$ of the pendulum, starting from rest at the top.  Plot the trajectories $[p_{\theta},\theta](t)$ in phase space starting from equilibrium $\theta_{0}=0$ with initial velocities $v_{k}=k v_{1}$ for $k=0, \pm\frac15, \pm\frac25,\frac 35, \ldots 2$.  Obtain a complete flow in space by starting from many equilibrium points: $\theta_{0}=0,\pm 2\pi, \pm 4\pi$.  [bonus: Calculate the exact trajectory, starting from rest at angle $\theta_{0}$, in terms of the Jacobi elliptic function $sn(u;m)$ and determine the frequency $\omega(\theta_{0})$.]

% {\bf \quad b)} Determine the critical damping coefficient $b_{c}$ of an additional frictional force $F=-bv$, and compare the trajectories in phase space for $b=b_{c}/2, b_{c}$, and $2b_{c}$.

% {\bf \quad c)} Repeat the damped trajectories in phase space, adding a resonant force $F=\gamma mg\cos(\omega_{0} t)$, driven at $\gamma=1$.  [bonus: Determine the minimum value of $\gamma$ where the motion becomes chaotic.]

% [bonus] {\bf \quad e)} Symplectic integrator: conserve the Hamiltonian, which in this case has the interpretation of total energy of the system.


{\bf 3.} [bonus] Physical interpretation of the {\bf vector potential} $\bs A$.  The quantity $q\bs{A}$ has physical significance as potential momentum, just as $qV$ is potential energy.  The purpose of this problem is to explore the implications of this connection.  For more background information see \href{http://www.pa.uky.edu/~crawford/phy417_sp11/priv/semon_taylor_ajp_64_1361_1996.pdf} {Am. J.  Phys. {\bf 64}, 1368 (1996)}.

{\bf \quad a)} Show that $\partial \rho/\partial t + \nabla\cdot\bs{J}=0$ (conservation of charge).  In 4-vector notation, this is written $\partial_\mu J^\mu = 0$, where $\partial = (\partial_t, \nabla)$, and $J=(\rho,\bs{J})$.

{\bf \quad b)}  For a continuous distribution $\rho(\bs r,t)$ of charges in a velocity field $\bs v(\bs r,t)$ so that $\bs J = \rho \bs v$, show that the {\it convective derivative} of $\rho$ (the time derivative of $\rho(\bs{r}(t),t)$ along the path $\bs{r}(t)$ with velocity $\bs{v}=d\bs{r}/dt$) is $d\rho/dt = \partial\rho/\partial t + \bs{v}\cdot\nabla\rho$, where $\partial\rho/\partial t$ is the time derivative of $\rho$ at a fixed position $\bs{r}$ and $\nabla\rho$ is the gradient of $\rho$ at a fixed time.  Use part a) to show that $d\rho/dt + \rho \nabla\cdot\bs{v}=0$.  What is the physical interpretation of $\nabla\cdot\bs{v}$ for a velocity field?

{\bf \quad c)}  Show that using the velocity-dependent potential $U=q(V-\bs{v}\cdot\bs{A})$ in Lagrange's equation produces the Lorentz force:
\begin{equation}
  \label{eq:vpot}
  \bs{F} \equiv \frac{d}{dt}\frac{\partial U}{\partial\bs{v}}
  - \frac{\partial U}{\partial\bs{r}}
  = q(\bs{E}+\bs{v}\times\bs{B}),
\end{equation}
where $\partial/\partial\bs{r} = \nabla = \bh x \partial_x + \bh y \partial_y + \bh z \partial_z$ and $\partial/\partial\bs{v} = \nabla_{\bs{v}} = \bh x \partial_{v_x} + \bh y \partial_{v_y} + \bh z \partial_{v_z}$ are gradients with respect to the independent variables $\bs{r}$ and $\bs{v}$, respectively.  Use $\bs E \equiv -\nabla V - \partial \bs A / \partial t$, which includes time dependence.  This generalizes the standard formula $\bs{F}=-\partial U / \partial {\bs r} = -\nabla U$.  Thus the electromagnetic Lagrangian is $L=T-U=\frac12 mv^2 - q(V-\bs{v}\cdot\bs{A})$.

{\bf \quad d)} Calculate the {\it canonical momentum} $\bs\pi \equiv \frac{\partial L}{\partial \bs v}$.  This generalized momentum includes contributions from both the particle and the magnetic field.

{\bf \quad e)} Calculate the {\it Hamiltonian} $H \equiv \bs\pi \cdot \bs v - L$.  Express $H$ in terms of $\bs\pi$ and $\bs r$, not $\bs{v}$.  This is the total energy in the system.  Thus the Hamiltonian and canonical momentum $(H,\bs \pi)$ are the generalized energy and momentum of a system.  Each includes a kinetic and
potential term.

{\bf \quad f)} Show that $\frac{dH}{dt} = \frac{d}{dt}(T+qV) = \frac{\partial}{\partial t}q(V - \bs v \cdot \bs A) = \frac{\partial U}{\partial t}$, where $\frac{\partial}{\partial t}$ acts on the potentials, but not $\bs r$ or $\bs v$.  Thus the total energy $H$ is conserved if the generalized potential is time-independent.
              
{\bf \quad g)} Show that $\frac{d\bs\pi}{dt} = \frac{d}{dt}(\bs p+q \bs A) = - \frac{\partial}{\partial \bs r} q(V - \bs v \cdot \bs A) = -\frac{\partial U}{\partial \bs r}$, where again $\frac{\partial}{\partial \bs r}$ acts on the potentials, but not $\bs v$.  Thus $\bs\pi$ is conserved if the generalized potential is position-independent.

{\bf \quad h)} Show that the electromagnetic fields do not change if $V\to V+\partial\chi/\partial t$ and $\bs{A}\to\bs{A}-\bs\nabla\chi$. Calculate the Noether current associated with this {\it gauge symmetry}.

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
