\documentclass[10pt]{article}
\usepackage{graphicx, multicol,wrapfig,exscale,epsfig,fancybox,fullpage}
\pagestyle{empty}

\parindent=0pt
\parskip=.1in

\newcommand\hs{\hspace{6pt}}
\begin{document}

\let\DS=\displaystyle

\newcommand{\bmit}[1]{\mathchoice
        {\mbox{\boldmath$\displaystyle#1$}}
        {\mbox{\boldmath$\textstyle#1$}}
        {\mbox{\boldmath$\scriptstyle#1$}}
        {\mbox{\boldmath$\scriptscriptstyle#1$}}
        }
\newcommand{\vf}[1]{\vec{\bmit#1}}
\newcommand{\VF}[1]{\kern-0.5pt\vec{\kern0.5pt\bmit#1}}
\newcommand{\Hat}[1]{\kern1pt\hat{\kern-1pt\bmit#1}}
\newcommand{\HAT}[1]{\kern-0.25pt\hat{\kern0.25pt\bmit#1}}
\newcommand{\Prime}{{}\kern0.5pt'}

\renewcommand{\AA}{\vf A}
\newcommand{\BB}{\vf B}
\newcommand{\EE}{\vf E}
\newcommand{\FF}{\vf F}
\newcommand{\GG}{\vf G}
\newcommand{\HH}{\vf H}
\newcommand{\II}{\vf I}
\newcommand{\JJ}{\kern1pt\vec{\kern-1pt\bmit J}}
\newcommand{\KK}{\vf K}
\newcommand{\gv}{\VF g}
\newcommand{\rr}{\VF r}
\newcommand{\rrp}{\rr\Prime}
\newcommand{\vv}{\VF v}
\newcommand{\grad}{\vec\nabla}
\newcommand{\zero}{\kern-1pt\vec{\kern1pt\bf 0}}

\newcommand{\ii}{\Hat\imath}
\newcommand{\jj}{\Hat\jmath}
\newcommand{\kk}{\Hat k}
\newcommand{\nn}{\Hat n}
\newcommand{\rhat}{\HAT r}
\newcommand{\xhat}{\Hat x}
\newcommand{\yhat}{\Hat y}
\newcommand{\zhat}{\Hat z}
\newcommand{\that}{\Hat\theta}
\newcommand{\phat}{\Hat\phi}

\newcommand{\LargeMath}[1]{\hbox{\large$#1$}}
\newcommand{\INT}{\LargeMath{\int}}
\newcommand{\OINT}{\LargeMath{\oint}}
\newcommand{\LINT}{\mathop{\INT}\limits_C}

\newcommand{\Int}{\int\limits}
\newcommand{\dint}{\mathchoice{\int\!\!\!\int}{\int\!\!\int}{}{}}
\newcommand{\tint}{\int\!\!\!\int\!\!\!\int}
\newcommand{\DInt}[1]{\int\!\!\!\!\int\limits_{#1~~}}
\newcommand{\TInt}[1]{\int\!\!\!\int\limits_{#1}\!\!\!\int}

\newcommand{\Bint}{\TInt{B}}
\newcommand{\Dint}{\DInt{D}}
\newcommand{\Eint}{\TInt{E}}
\newcommand{\Lint}{\int\limits_C}
\newcommand{\Oint}{\oint\limits_C}
\newcommand{\Rint}{\DInt{R}}
\newcommand{\Sint}{\DInt{S}}

\newcommand{\Partial}[2]{{\partial#1\over\partial#2}}

\newcommand{\Item}{\smallskip\item{$\bullet$}}

\renewcommand{\thesubsection}{\arabic{subsection}}


\section*{Activity 5: Solution for magnetic field}
\subsection*{Find the magnetic field in all space due to a ring with total charge $Q$ and
radius $R$ rotating with a period $T$}
\begin{eqnarray}
\vf B(\rr) = {\mu_0\over 4\pi} \int\limits_{\hbox{ring}}
       {\vf I(\rrp) \times (\rr - \rrp) \,dl' \over|\rr-\rrp|^3}
\end{eqnarray}
where $\rr$ denotes the position in space at which the magnetic
field is measured and $\rrp$ denotes the position of the current
segment. As described in previous solutions,
\begin{eqnarray}
dl' &=& R\,d\phi'\\\noalign{\medskip}
\vf I(\rrp)&=& {Q\over T}
{(-\sin\phi'{\bf \hat i} + \cos\phi'{\bf \hat
j})}\\\noalign{\medskip} \rr-\rrp &=& (r\cos\phi -
R\cos\phi\Prime)\ii + (r\sin\phi - R\sin\phi\Prime)\jj + (z -
z\Prime)\kk\\\noalign{\bigskip} |\rr-\rrp| &=& \sqrt{r^2 -
2rR\cos(\phi - \phi') + R^2 + z^2}
\end{eqnarray}

Thus $\vf B(\rr) =$
\begin{eqnarray}
{\mu_0\over 4\pi}{QR\over T}
\int\limits_0^{2\pi}{{{(-\sin\phi'{\bf \hat i} + \cos\phi'{\bf \hat
       j})}\times{[(r\cos\phi -
R\cos\phi\Prime)\ii + (r\sin\phi - R\sin\phi\Prime)\jj + z\kk]}{
d\phi'}}\over{({r^2 - 2rR\cos(\phi - \phi') + R^2 + z^2})^{3/2}}}
\end{eqnarray}
\begin{eqnarray}
\vf B(\rr) = {\mu_0\over 4\pi}\,{QR\over T}  \int\limits_0^{2\pi}
       {{({z\cos\phi'{\bf \ii} + z\sin\phi'{\bf \jj} + {[R - r\cos(\phi - \phi')]}{\bf \hat
       k}}){d\phi'}}\over{({r^2 - 2rR\cos(\phi - \phi') + R^2 +
       z^2})^{3/2}}}
\end{eqnarray}

\subsection{The $z$ axis}
For points on the $z$ axis, $r = 0$ and $\phi$ can be arbitrarily
taken as zero. Thus, the integral simplifies to
\begin{eqnarray}
\vf B(\rr) = {\mu_0\over 4\pi}\,{QR\over T}  \int\limits_0^{2\pi}
       {{[{z\cos\phi'{\bf \ii} + z\sin\phi'{\bf \jj} + {R}{\bf \hat
       k}}]{d\phi'}}\over{({R^2 + z^2})^{3/2}}}
\end{eqnarray}

Doing the integral results in
\begin{eqnarray}
\vf B(\rr) = {\mu_0\over 4\pi}\,{QR\over T}  {{2\pi R\,{\bf \hat
       k}}
       \over{({R^2 + z^2})^{3/2}}}
\end{eqnarray}

\subsection{The $x$ axis}
For points on the $x$ axis, $z = 0$ and $\phi = 0$. Because $z = 0$
the $\ii$ and $\jj$ components disappear and the integral simplifies
to
\begin{eqnarray}
\vf B(\rr) = {\mu_0\over 4\pi}\,{QR\over T}  \int\limits_0^{2\pi}
       {{{(R - r\cos\phi')}{\bf \hat
       k}{d\phi'}}\over{({r^2 - 2rR\cos\phi' + R^2})^{3/2}}}
\end{eqnarray}

 \vfill\eject
\end{document}
