% 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 306 \\
    Homework \#7, Rev. A, due Monday, 2023-03-20 }
\end{center}

\vspace{.3 in}

{\bf 1.} Vectors in {\bf curvilinear coordinates} $(q^1,q^2,q^3)$ have a natural {\it coordinate basis} $\bv b_i \equiv \partial \bv r/\partial q^i$ and {\it reciprocal basis} $\bv b{}^i \equiv \bs\nabla q^i=\partial q^i/\partial \bv r$.  Note that each basis vector is actually a {\it vector field} (a function of position).  The most common coordinate systems are Cartesian $q^{i}=(x,y,z)$, cylindrical $q^{i}=(\rho,\phi,z)$, and spherical $q^{i}=(r,\theta,\phi)$, defined by the transformations $x+iy=\rho e^{i\phi}$ and $z+i\rho=r e^{i\theta}$, respectively.  These are all orthogonal, right-handed systems, for which both bases are aligned with the {\it orthonormal basis} $\bh e_i = \bv b_i / h_i = \bv b{}^i h_i$, where $\bv b_{i}=\partial\bv r/\partial q^{i}$ is the unnormalized {\it coordinate basis} and $h_i=|\bv b_i| = 1/|\bv b{}^i|$ is called the {\it scale factor}.

{\bf \quad a)} Determine the coordinate transformation $q^{i}(q^{i'})$ from each coordinate system to each of the others.  {\it Hint: invert and combine the two transformations above.}

{\bf \quad b)} For each coordinate system, illustrate the three coordinate isosurfaces $q^{i}(\bv r)=q^{i}_{0}$ (constant) passing through an abritrary point $\bv r_{0}$, labeling lengths and angles in your diagram.   For each coordinate $q^{i}$, identify the curve $\bv s(q^{i}; q^{j}_{0},q^{k}_{0})$ at the intersection of two surfaces of constant $q^{j}=q^{j}_{0}$ and $q^{k}=q^{k}_{0}$.

{\bf \quad c)} For cylindrical and spherical coordinates, calculate $\bv b_{i}=\partial\bv r/\partial q^{i}$ using $\bv{dr}=\bh x dx + \bh y dy + \bh z dz$.  Normalize $\bv b_{i}=\bh e_{i}h_{i}$ to find the {\it unit vectors}.  The scale factors $h_{\theta}$ and $h_{\phi}$ for angular coordinates are just the radii of curvature, according to the arc length formulae $ds_{\theta} = r d\theta$ and $ds_{\phi} = \rho d\phi$.

{\bf \quad d)} Construct the transformation matrices between unit bases, by considering rotations $R_z(\phi)$ (rotation by an angle $\phi$ about the $z$-axis) and $R_\phi(\theta)$ (about the $y$-axis).  Compare with part c).

{\bf \quad e)} For each coordinate system, calculate the {\it line element} $\bv{dl}=\bh e_{i}h_{i}dq^{i}$, the {\it area element} $\bv{da} = \frac12 \bv{dl} \times \bv{dl} = \bh e_{k}\,h_{i}h_{j}\,dq^{i}dq^{j}$, and the {\it volume element} $d\tau = \frac13\bv{dl}\cdot\bv{da} = h_{1}h_{2}h_{3}\, dq^{1}dq^{2}dq^{3}$.

{\bf \quad f)} For each coordinate system, calculate the {\it metric} $g_{ij}=\bs b_{i}\cdot \bs b_{j}={\rm diag}(h_{1}^{2}, h_{2}^{2}, h_{3}^{2})$.

{\bf \quad g)} Invert the cylindrical coordinate functions to obtain $(\rho,\phi,z)=f^{-1}(x,y,z)$.  Calculate the covariant basis $\bs b^{i}=\nabla q^{i} = \bh e_{i}/h_{i}$ and verify that $\bs b_{i}\cdot \bs b^{j}=\delta_{i}^{j}$.  Calculate $g^{ij}=\bs b^{i}\cdot \bs b^{j}={\rm diag}(h_{1}^{2}, h_{2}^{2}, h_{3}^{2})$.  [bonus: Do the same for spherical coordinates.]

{\bf 2.} The magnetic analog of {\it Coulomb's law} (with a scalar charge element $dq=\lambda dl=\sigma da = \rho d\tau$) is the {\bf Biot-Savart law} (with a vector current element $\bs{v}dq=I\bv{dl}=\bv{K}da=\bv{J}d\tau$):
\begin{eqnarray}
  \label{eq:biot}
  {\bs B} &=& \frac{\mu_0}{4\pi} \oint' \frac{\bs{v}dq' \times \brcurs}{\rcurs^3}
  ~\approx~ \sum_i \left( \Delta\bs B = \frac{\mu_0}{4\pi} \frac{I \Delta \bs \ell \times \brcurs_0}{\rcurs_0^3}\right )_i,
\end{eqnarray}

where $\Delta\bs \ell$ is the displacement vector from the beginning to the end of each current segment, and $\brcurs_0$ is the displacement vector from the middle of each current segment $\bs r'_0$ to the field point $\bs r$.  The approximation is that all of the current is concentrated at $\bs r'_0$ instead of spread out along the length of the segment from $\bs r'_0-\Delta \bs \ell/2$ to $\bs r'_0+\Delta \bs \ell/2$.  In this problem we first calculate a correction term to account for this difference, and then calculate the exact B-field due to each straight segment.
%
\includegraphics[width=\textwidth]{H07_fig1}
%

\quad a) To analytically integrate the Biot-Savart law along a single straight
segment of the path, parametrize the segment $\bs r'(s)$ with the parameter
$s$, ranging from $s=-\frac12$ at the beginning to $s=+\frac12$ at the end of
the segment.  The parametrization involves the constant vectors $\bs r'_0$
(the center of the segment) and $\Delta \bs \ell$ (displacement along the
segment).  Calculate the line element $\bs{dl}= \frac{d\bs r'}{ds} ds$.
Calculate $\brcurs$ as a function of $\brcurs_0$, $\Delta \bs \ell$, and $s$.
Substitute these into the Biot-Savart formula and factor out the constant approximation of Eq.~\ref{eq:biot}] to obtain
\begin{equation}
  \Delta\bs B(\bs r) = \frac{\mu0}{4\pi}
  \frac{I\Delta \bs \ell {\times} \brcurs_0}{\rcurs_0^3} T(\alpha,\beta),
\end{equation}
where the integral $T(\alpha,\beta)$ along $s$ depends on $\alpha = {\brcurs_0\cdot\Delta \bs \ell}/{\rcurs_0^2}$ and $\beta = {\Delta \ell^2}/{\rcurs_0^2}$.

\quad b) [bonus: Approximate the integrand of $T(\alpha,\beta)$ to order $s^2$ and integrate to obtain the correction term $T(\alpha,\beta) \approx 1 + \frac18(5 \alpha^2 - \beta)$ for the case where all the current is at the center of the segment.]

\quad c) [bonus: Calculate the exact integral $T(\alpha,\beta)$ and show that
%\begin{equation}
$ {\Delta \bs B} = \frac{\mu_0I}{4\pi} \frac{{\Delta \bs \ell}\times \brcurs_0} {\left({\Delta \bs \ell}\times \brcurs_0\right)^2}\;\Delta\bs \ell \cdot\left(\hrcurs_--\hrcurs_+\right), $
%\end{equation}
where $\brcurs_\pm = \bs r - \bs r'(\pm \frac12)$ is the displacement vector from each end of the segment to the field point and $\hrcurs_\pm=\brcurs_\pm/\rcurs_\pm$. ]

\quad d) [bonus: show that this is equivalent to
%\begin{equation}
$ {\Delta \bs B} = \frac{\mu_0I}{4\pi}\frac{(\brcurs_-{\times}\brcurs_+) (\rcurs_-{+}\rcurs_+)} {\rcurs_-\rcurs_+\;(\rcurs_-\rcurs_+{+}\brcurs_-\cdot\brcurs_+)}$. ]
%\end{equation}

%[See \href{http://web.ornl.gov/sci/fed/Theory/publication/pub2002/Biot-Savart_BC_reprint.pdf?origin=publication_detail}{``Compact expressions for the Biot-Savart fields of a filamentary segment''}, Eq.~(9).]

{\bf 3. Current sheet}---surface currents can be approximated numerically by a tiling of quadrilaterals like the one shown below, with current $I$ flowing parallel to the top and bottom edges, from left to right.  Let the vector $\bs \ell = \bs \ell_+ = \bs \ell_-$ run along either the top or bottom edge, parallel to the current; $\bs w = \bs w_- = \bs w_+$ from bottom to top along the left or right edge; and $\bs r_0$ be the point at the center of the parallelogram as shown in the diagram.
\begin{center}
  \includegraphics[width=.6\textwidth]{H07_fig2}
\end{center}

{\bf \quad a)} Parametrize the surface of the parallelogram as $\bs r'(s,t)$, with the top and bottom edges are at $t=+\frac12$ and $-\frac12$, and the left and right edges are at $s=+\frac12$ and $-\frac12$ respectively.

{\bf \quad b)} Write down the Biot-Savart integral for the magnetic field in terms of integration parameters $s,t$ and constants $\brcurs_0 \equiv \bs r - \bs r'_0$, $\bs \ell$, and $\bs w$.

{\bf \quad c)} [bonus: Expand in powers of $s$ and $t$, to calculate the integral up to second order.]

{\bf \quad d)} [bonus: It is not possible to tile arbitrary surfaces with parallelograms---we need all four points on the quadrilateral to be arbitrary.  To generalize this solution, let $\bs \ell_0$, $\bs w_0$ be the corresponding vectors through the center of the quadrilateral.  We need one more vector $\bs u_0=\bs\ell_+-\bs\ell_-=\bs w_+-\bs w_-$, where $\bs\ell_\pm$ run across the top and bottom, and $\bs w_\pm$ run along the right and left sides of the diagram.  Generalize steps (a)-(c) to calculate $\bs B(\bs r)$.]

\end{document}

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