\section{Introduction}
\label{sec:introduction}
In the g-2 experiment we measure the time dependence of the projection of the muon spin along its direction of motion, $\bmbetahat\cdot \bf s$.
The muon velocity ($\bm\beta$) is determined by the Lorentz force law, and the evolution of the spin ($\bfs$) by the Thomas-BMT equation.
In the Thomas-BMT equation the interaction of the magnetic moment of the muon with the electric and magnetic fields in the muon storage ring,
appears as a torque  ${\bm\mu}_{eff}\times {\cal \bfB}_{eff}$, where ${\bm\mu}_{eff}$ is proportional to the magnetic moment and ${\cal\bfB}_{eff}$ depends on the fields and the velocity. 
Alternatively, and equivalently, the interaction can be described 
by a hamiltonian ${\cal H} = -{\bm\mu}_{eff}\cdot   {\cal \bfB}_{eff}$.
Then the Schrodinger equation determines the evolution of the spin.
The solution to the Schrodinger equation with Hamiltonian ${\cal H}$ is thus equivalent to the solution of the Thomas equation.
The advantage of the Hamiltonian formulation is that a) in the case of uniform electric and magnetic fields, exact solutions exist and share a common structure,
and b) in the event of time dependent fields for which there is no exact solution, there is a well established procedure for finding approximate solutions, using
time dependent perturbation theory.

In section \ref{sec:NMR} we review the quantum mechanics of a muon at rest in a time dependent magnetic field.
Section~\ref{sec:rotatingframe} describes the transformation to a rotating frame.
The Hamiltonian corresponding to the dynamics of the Thomas-BMT equation is derived in ~\ref{sec:bmt}. Section~\ref{sec:pitchanalysis} is devoted to analysis of the effect
of vertical motion on the precession frequency, beginning with the exact solution for fixed pitch (fixed vertical angle) and proceeding to a perturbative evaluation
for the muon oscillating in a vertically focusing electrostatic field with arbitrary frequency.
%We find the equations of motion to second order in the pitch angle for a muon oscillating in a vertically focusing electric field in
%section~\ref{sec:lorentzforce}. Given the solution of the equations of motion we  write the effective Hamiltonian for the pitching muon. The
%Schrodinger equation for the pitching Hamiltonian is solved perturbatively to second order in the pitching angle in Section ~\ref{tdpt}.
The effect of a longitudinal magnetic field on the evolution of the spin is explored in Section~\ref{sec:longitudinalfield}, with an 
exact solution in the case of a uniform field and
perturbatively in the case that the longitudinal field depends on azimuth. The solution for a uniform
radial field is given in Section~\ref{sec:radial}, and for an off momentum muon on its closed orbit (electric field correction) in Section~\ref{sec:efield}.
And just for fun we consider the evolution of the spin of a muon experiencing electrostatic vertical focusing in the absence of
a magnetic field and explore its momentum dependence in Section~\ref{sec:straight}. Section~\ref{sec:summary} summarizes effects due to pitch, radial and longitudinal fields,
and electric field.

