% 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

\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{arrows}
\usepackage{tikz-3dplot}

\begin{document}
\begin{center}
  {\bf University of Kentucky, Physics 306 \\
    Homework \#1, Rev. C, due Monday, 2022-01-24 }
\end{center}

\vspace{.3 in}

{\bf 1. Euler's formula} $e^{i\phi}=\cos\phi+i\sin\phi$ leads to the beautiful equation $e^{i\pi}+1=0$ involving the three basic operators and five fundamental constants exactly once each.  The purpose of this exercise is to explore implications of this relationship and the role of the exponential in rotation.

{\bf \quad a)}  Use the power series of $e^x$, $\sin\phi$, $\cos\phi$ and the property $i^{2}=-1$ to prove \href{https://en.wikipedia.org/wiki/Euler\%27s_formula}{\it Euler's identity}.

{\bf \quad b)} Show if $z=x+iy$ where $(x,y)$ are the (real, imaginary) Cartesian coordinates of $z$ in the \href{https://en.wikipedia.org/wiki/Complex_plane}{\it complex plane}, then $z=\rho e^{i\phi}$, where $(\rho,\phi)$ are the (radius, azimuth) polar coordinates of $z$.
 
{\bf \quad c)} The \href{https://en.wikipedia.org/wiki/Complex_conjugate}{\it complex conjugate} $z^*$ is formed by replacing $i$ with $-i$ everywhere in $z$.  The \href{https://en.wikipedia.org/wiki/Absolute_value#Complex_numbers}{\it modulus} $|z| \equiv \sqrt{z^*z}$ is the complex analog of absolute value.  Use $z=x+iy=\rho e^{i\phi}$ to show the relations $|z|^{2} = z^*z = zz^* = x^{2}+y^{2} = \rho^{2}$.  Thus $|z|=\rho$ is the distance of $z$ from the origin (radius).

{\bf \quad d)} Expand $z^2$ in terms of $x$,$y$ and also $\rho$,$\phi$ to see why $|z|^2$ is generally more useful than $z^2$.

{\bf \quad e)} Show that the real and imaginary parts of $(x_{1}+iy_{1})^{*}(x_{2}+iy_{2})$ match the dot and cross ($z$-component) products of the vectors $(x_{1},y_{1})^{T}$ and $(x_{2},y_{2})^{T}$.

{\bf \quad f)} Multiply $e^{i\phi}$ by its complex conjugate and expand using Euler's identity to prove the relation $\sin^2\phi + \cos^2\phi = 1$.  This shows that $e^{i\phi}$ traces out the unit circle in the complex plane.

{\bf \quad g)} Use Euler's identity on $e^{\pm i\phi}$ to express $\cos\phi$, $\sin\phi$ and $\tan\phi$ in terms of $e^{i\phi}$ and $e^{-i\phi}$.

{\bf \quad h)} Using the similar definition $\cosh\alpha \equiv \frac12(e^\alpha+e^{-\alpha})$ and
$\sinh\alpha \equiv \frac12(e^\alpha-e^{-\alpha})$, derive the analog of Euler's identity
for the \href{https://en.wikipedia.org/wiki/Hyperbolic_functions}{\it hyperbolic functions}.  {\it Hint: $i$ becomes $\pm$.}

{\bf \quad i)} Multiply and expand $e^\alpha$ and $e^{-\alpha}$ to derive a simular formula as in part (g) for $\cosh\alpha$ and $\sinh\alpha$.  This shows that $(\cosh\alpha,\sinh\alpha)$ traces out a hyperbola in the plane.

{\bf \quad j)} Derive addition formulas for $\cos(\alpha\pm\beta)$ and $\sin(\alpha\pm\beta)$ by multiplying and expanding $e^{i\alpha} \cdot e^{\pm i \beta}$ and then separating the real and imaginary parts.  Do the same for the hyperbolic functions.

{\bf \quad k)} Use $e^{in\phi}$ to obtain \href{https://en.wikipedia.org/wiki/De_Moivre\%27s_formula}{\it de Moivre's formula} for $\cos(n\phi)+i\sin(n\phi)$ and $\cosh(n\alpha)\pm\sinh(n\alpha)$.  Use this formula to calculate $\cos 2\phi$ and $\sin 2\phi$.

{\bf \quad l)} Obtain the derivatives of $\sin \phi$, $\cos \phi$, and $\sinh \alpha$, $\cosh \alpha$ via the derivative of $e^{x}$.

{\bf \quad m)} Show that $iz$ rotates $z$ by $90^{\circ}$ CCW about the origin.  Use the \href{https://en.wikipedia.org/wiki/Arc_length#Arcs_of_circles}{arc length formula} $ds=\rho d\phi$ to show that the operator $(1+i d\phi)$ multiplied by $z$ rotates it by an angle $d\phi$.  Formally integrate the equation $dz=izd\phi$ to show that the operator $e^{i\phi}$ rotates $z$ by the angle $\phi$.  Use this result to justify the identity {$\displaystyle e^x=\lim_{n\to\infty}\textstyle(1+\frac{x}{n})^n$}.

\newpage

{\bf 2.} In the small-area approximation, the {\bf solid angle} subtended at the point $\vec X=(x,y,0)^{T}R$ by a detector of area $|\vec{A}|$ (with unit normal $\hat{A}$) with spherical coordinates $(R,\Theta,\Phi)$, tilted down by the angle $\Gamma$ (from facing straight at the origin) %(Fig.~\ref{fig:3D_geometry})
is
\[
  \Omega(x,y)=\frac{\vec{A}\cdot\hat D}{D^{2}}= \frac{A}{R^{2}}\frac{\cos\Gamma - \sin(\Theta+\Gamma)(x\cos\Phi+y\sin\Phi)}{(1-2\sin\Theta(x\cos\Phi+y\sin\Phi)+x^{2}+y^{2})^{3/2}}.
\]

{\bf \quad a)} Simplify the expansion by converting $(x,y)$ to polar coordinates $(\rho,\phi)$.

{\bf \quad b)} Expand this expression to 3rd order in $\rho$.

{\bf \quad c)} Show that in the formula for the total solid angle of 4 symmetric detectors at azimuthal angles $\Phi=0,\pi/2,\pi,3\pi/2$, all terms vanish except $\Omega(x,y)=\Omega_{0}+\Omega_{2}\rho^{2}$.

{\bf \quad d)} Calculate the relation between $\Theta$ and $\Gamma$ where $\Omega_{2}=0$, providing more uniform detector acceptance as a function of $(\rho,\phi)$.


\begin{figure}[h]
  \centering
  \tdplotsetmaincoords{70}{110}   % For the 3D plot.
  \begin{tikzpicture}[scale=2,tdplot_main_coords]
    
    \coordinate (O) at (0,0,0);
    % CENTER OF DETECTORS
    \tdplotsetcoord{P}{2}{45}{0}
    \tdplotsetcoord{Q}{2}{45}{90}
    
    % SOURCE POINT
    \tdplotsetcoord{X}{1}{90}{45}   % source is in xy plane
    
    % AXES
    \draw[thick,->] (0,0,0) -- (2.5,0,0) node[anchor=north east]{$x$};
    \draw[thick,->] (0,0,0) -- (0,2.5,0) node[anchor=north west]{$y$};
    \draw[thick,->] (0,0,0) -- (0,0,2.5) node[anchor=south]{$z$};
    
    % \tdplotsetrotatedcoordsorigin{(O)};
    % \tdplotsetrotatedcoords{0}{65}{0};    % set it back to the original
    % r VECTORS
    \draw[->,red] (O) -- (P);       % xz plane
    % \node at (0.71,0,0.71) [anchor=east]{$\vec{r_1}$};
    \draw[dashed,red] (Px) -- (P);  % z axis projection
    \tdplotsetthetaplanecoords{0};   % set Theta axis in xz
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.5}{0}{45}{}{}; % draw in Theta
    \draw[->,red] (O) -- (Q);       % yz plane
    \node at (0,0.71,0.71) [anchor=south]{$\vec{R}$};
    \draw[dashed,red] (Qy) -- (Q);  % z axis projection
    \tdplotsetthetaplanecoords{90}  % set Theta axis in yz
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.5}{0}{45}{anchor=south west}{$\Theta$} % draw in Theta
    
    % SOURCE VECTOR
    \draw[->,blue] (O) -- (X);
    \tdplotsetcoord{x}{0.5}{90}{45};  % so I have somewhere to put the label
    \node at (x) [anchor=north east]{$\vec{X}$};
    \filldraw[color=black,fill=blue] (X) circle (1pt);
    
    % D VECTORS
    % \tdplotsetrotatedcoords{90}{45}{0}; % line up the x-axis with r1 vector
    % \tdplotsetrotatedcoordsorigin{(X)};    % set the source point as an origin
    % \tdplotsetcoord{d1}{1}{53}{13};   % so I have somewhere to put the label
    \tdplotsetcoord{d}{1}{50}{77};
    
    \draw[->,orange] (X) -- (P);
    % \node at (d1) [anchor=north]{$\vec{d_1}$};
    \draw[->,orange] (X) -- (Q);
    \node at (d) [anchor=north]{$\vec{D}$};
    
    % DETECTOR
    \tdplotsetrotatedcoordsorigin{(Q)};     % set the center of the detector as the origin
    \tdplotsetrotatedcoords{90}{25}{-90};     % line up the y-axis with where the detector is (I chose a Gamma of 20 degrees **beta goes on the last rotation**)
    \filldraw[tdplot_rotated_coords,draw=black,fill=black!20] (0.5,0.5,0) -- (0.5,-0.5,0) -- (-0.5,-0.5,0) -- (-0.5,0.5,0) -- cycle;
    \draw[tdplot_rotated_coords,dashed] (0,0.5,0) -- (0,-0.5,0);
    % \draw[tdplot_rotated_coords,dashed] (0,0,0) -- (0.5,0,0);
    \draw[->,dashed,tdplot_rotated_coords] (0,0,0) -- (0,0,0.6) node[anchor=east]{$\hat{A}$};
    
    \tdplotsetrotatedcoords{90}{-45}{-90};     % Rotate it to a Gamma of 0
    \tdplotsetrotatedthetaplanecoords{90};   % makes x'y' coplanar with plane containing Gamma (essentially making the y' axis the z'' axis; makes the z' axis the -x'' axis.. I think)
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.45}{90}{70}{anchor=south west}{$-\Gamma$}; % draw in Gamma
    
    \tdplotsetrotatedcoords{90}{-45}{-90};     % Rotate it to a Gamma and beta of 0 (this command rotates the original coordinate system)
    % \draw[red,dashed,tdplot_rotated_coords] (0,0,0.5) -- (0,0,0);    % r normal surface (Gamma=0)
    \draw[->,red,dashed,tdplot_rotated_coords] (0,0,0) -- (0,0.5,0);
    \tdplotsetcoord{q}{2.5}{45}{90};
    \node at (q) [anchor=north]{$\hat{R}$};   % This coordinate is in the original frame. Not sure about the syntax for specifying this coordinate frame.
    
    \tdplotsetrotatedcoordsorigin{(P)};     % set the center of the detector as the origin
    \tdplotsetrotatedcoords{0}{25}{0};  % drawing in the other for completeness
    \filldraw[tdplot_rotated_coords,draw=black,fill=black!20] (0.5,0.5,0) -- (-0.5,0.5,0) -- (-0.5,-0.5,0) -- (0.5,-0.5,0) -- cycle;
    \draw[tdplot_rotated_coords,dashed] (0.5,0,0) -- (-0.5,0,0);
%cbc    \tdplotsetcoord{a}{2.2213}{38.929}{0};
%cbc    \node at (a) [anchor=south west]{$a$};
%cbc    \tdplotsetcoord{b}{2.2213}{45}{-6.071};
%cbc    \node at (b) [anchor=east]{$b$};
    % \draw[tdplot_rotated_coords,dashed] (0,0,0) -- (0,0.5,0);
    
    % \tdplotsetrotatedcoords{0}{-65}{0};     % Rotate it to a beta of 0
    % \tdplotsetrotatedthetaplanecoords{-90}; % makes x'y' coplanar with plane containing Gamma (essentially making the y' axis the z'' axis; makes the z' axis the -x'' axis..  I think)
    % \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.35}{-90}{-110}{anchor=north}{$\beta$}; % draw in beta

    % \tdplotsetrotatedcoords{0}{-45}{90};     % Rotate it to a beta of 0  (same as Gamma=0)
    % \draw[->,cyan,dashed,tdplot_rotated_coords] (0,0,0) -- (0.5,0,0);   % phi hat (beta=0)
    % \tdplotsetcoord{phi}{2}{45}{90-70.53};
    % \node at (phi) [anchor=west]{$\hat{\phi}$};
    
    \tdplotsetrotatedcoordsorigin{(P)};
    \tdplotsetrotatedcoords{0}{45}{45};  % Rotate to align with d
    \draw[tdplot_rotated_coords,dashed,orange,->] (0,0,0) -- (-0.42,0,0.47);
    \tdplotsetcoord{dhat}{2.7}{43}{0};
    \node at (dhat) [anchor=south]{$\hat{D}$};
    
    % This is here to test rotated axes.
    % \draw[tdplot_rotated_coords,color=blue,thick,->] (0,0,0) -- (0.5,0,0) node[anchor=east]{$x’$};
    % \draw[tdplot_rotated_coords,color=blue,thick,->] (0,0,0) -- (0,0.5,0) node[anchor=north]{$y’$};
    % \draw[tdplot_rotated_coords,color=blue,thick,->] (0,0,0) -- (0,0,0.5) node[anchor=west]{$z’$};
    
  \end{tikzpicture}
  %\caption
  {\\A view of two detectors centered at $(R,\Theta,0)$ and $(R,\Theta,\pi/2)$ in spherical coordinates.}
  \label{fig:3D_geometry}
\end{figure}
    
\end{document}

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