% 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 \#1, Rev. A, due Monday, 2023-01-23 }
\end{center}

\vspace{.3 in}

{\bf 1.} Perform six of the following excercises in Mathematica. \verb|Typewriter| font \mbox{indicates command names.}

{\bf \quad a)} \verb|Plot Exp[-1/x]| and its \verb|D|\,erivatives---it transitions very smoothly to 0 for all $x<0$.

{\bf \quad b)} Find the \verb|Series| of $(1+x)^a$ about  $x=0$ to deduce the binomal expansion.

{\bf \quad c)} Build a \verb|Plot| of $x/(a^2-x^2)$ piece by piece, starting from $x^{2}$, then $a^{2}-x^{2}$, etc.

{\bf \quad d)} \verb|Plot| the functions \verb|Sin[x]|, \verb|Sin[x-a]|, \verb|Sin [x/b]|, \verb|Sin[(x-a)/b]|, \verb|Sin[x]^2|, \verb|ArcSin[x]| using numbers for constants $a$ and $b$.  Show graphically that $\cos^{2}(x), \sin^{2}(x) = (1\pm\cos(2x))/2$, $2\cos(x)\sin(x)=\sin(2x)$, $\cos^{2}(x)+\sin^{2}(x)=1$, and $(\cos(x)-\sin(x))(\cos(x)+\sin(x))=\cos(2x)$.

{\bf \quad e)} \verb|Manipulate| a \verb|Plot| of f(t)= \verb|x0 Exp[-alpha t] Sin[w t]| with sliders for the parameters $x_{0}$, $\alpha$, $\omega$ to investigate their effect on damped oscillatory motion, and also f(x,t)= \verb|Cos[x - 2 Pi t]| versus $x$ with sliding parameter $t$ to see the wave travel.

{\bf \quad f)} \verb|Solve| \verb|x^2+1==0| for $x$ and substitute \verb|x->I| into the LHS $x^2+1$ using the \verb|/.| operator.

{\bf \quad g)} Show Euler's theorem: \verb|Exp[I x]==Cos[x] + I Sin[x]| by \verb|Series| expansion of both sides.  \verb|Solve| for $\cos(x)$ and $\sin(x)$ in terms of $e^{ix}$ and $e^{-ix}$.

{\bf \quad h)} \verb|Plot| the functions \verb|Exp[x]/2, -Exp[x]/2, Exp[-x]/2, -Exp[-x]/2| along with the hyperbolic functions \verb|Sinh[x], Cosh[x], -Sinh[x], -Cosh[x]| and compare with g).

{\bf \quad i)} Show that \verb|Cosh[x]^2-Sinh[x]^2| $=1$ and compare your results with d).  Parametrically plot (x,y)=\verb|{Cos[t],Sin[t]}| and compare with \verb|{Cosh[t],Sinh[t]}|.  What is the relation to the above identities?  That is why they are called circular (elliptical) and hyperbolic functions.

{\bf \quad j)} Explore plots of the matrix equation \verb|{x,y}.{{a,b},{b,c}}.{x,y}==0| for different values of parameters $(a,b,c)$ to discover conic sections.  Calculate \verb|Det[{{a,b},{b,c}}]| for each.

{\bf \quad k)} Show graphically that \verb|ArcSinh[y]| = \verb|Log[y+Sqrt[y^2+1]]|.  What is \verb|Tanh| in terms of \verb|Exp|?
Compare the {\it sigmoid} functions \verb|Tanh[x]| and \verb|Pi/2 ArcTan[Pi/2 x]|?

{\bf \quad k)} Normalize the normal distributrion $p(x)=$ \verb|Exp[-((x-mu)/sig)^2]| so that it \verb|Integrate|s to 1 over the real line $-\infty<x<\infty$.  Plot the normal distribution and the cumulative distribution $P(x)=\int_{-\infty}^{x}p(x)$ for $\mu=2$ and $\sigma=3$.

{\bf \quad l)} Show that the three functions $f(x,y)=$ \verb|Cos[x]{Exp[-y],Sinh[y],Cosh[y]}| are all solutions of $\nabla^{2} f=0$.  \verb|ContourPlot| the functions.

{\bf \quad m)} \verb|ContourPlot| the \verb|Re| and \verb|Im| parts of $f(z)= z^2=$\verb|(x + I y)^2|, \verb|Cos[z]|, \verb|Sin[z]|, \verb|Exp[z]|.


\newpage

{\bf 2. Euler's formula} $e^{i\phi}=\cos\phi+i\sin\phi$ leads to the beautiful identity $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 between exponential and trigonometric functions and it's role in rotations.

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

{\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 formula 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 formula 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 formula 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^{i m\phi}$ to obtain \href{https://en.wikipedia.org/wiki/De_Moivre\%27s_formula}{\it de Moivre's formula} for $\cos(m\phi)+i\sin(m\phi)$ and $\cosh(m\alpha)\pm\sinh(m\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}{\it 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$}.


\end{document}

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