# Equations of motion

## Purpose

What are the equations of motion that describe a charged particle moving around an oppositely charged pole?

## Electric potential energy

The electric potential energy is:
U = k_e q int_(-a)^a (Q d xi) / (2 a) 1/L_xi
 = (k_e Q q)/(2a) int_(-a)^a (d xi)/sqrt(r^2 + (xi - z)^2
 = (k_e Q q)/(2a) [ ln ( xi - z + sqrt(r^2 + (xi - z)^2) ) ]_(-a)^a
 = (k_e Q q)/(2a) ln((sqrt(r^2 + (z - a)^2) - (z-a)) / (sqrt(r^2 + (z+a)^2)-(z+a)))

To simplify further analysis it is convenient to convert to these prolate spheriodal coordinates (mu,nu,varphi):
x = a sinh mu sin nu cos varphi
y = a sinh mu sin nu sin varphi
z = a cosh mu cos nu
Also note that:
r = a sinh mu sin nu
For simplicity also define k as:
k = (k_e q Q)/(2a)

Substituting these values in gives:
U(mu,nu) = k ln(( a cosh mu - a cos nu - (a cosh mu cos nu-a)) / (a cosh mu + a cos nu - (a cosh mu cos nu+a)))
U(mu) = k ln( cosh mu + 1 ) - k ln( cosh mu - 1 ))

## Velocity term

For the analysis we require a term for kinetic energy, which requires velocity. Let u = sinh mu sin nu. dot x and dot y are:
dot x = -a dot varphi u sin varphi + a dot u cos varphi
dot y = a dot varphi u cos varphi + a dot u sin varphi
From this it can be seen:
dot x^2 + dot y^2 = a^2 dot varphi^2 u^2 + a^2 dot u^2
Now:
dot u = dot nu sinh mu cos nu + dot mu cosh mu sin nu
dot z = -a dot nu cosh mu sin nu + a dot mu sinh mu cos nu
From these we can see:
a^2 dot u^2 + dot z^2 = a^2 (dot mu^2 + dot nu^2) (sinh^2 mu cos^2 nu + cosh^2 mu sin^2 nu)
 = a^2 (dot mu^2 + dot nu^2) (sinh^2 mu + sin^2 nu)
Now we get:
v^2 = dot x^2 + dot y^2 + dot z^2 = a^2 dot varphi^2 sinh^2 mu sin^2 nu + a^2 (dot mu^2 + dot nu^2) (sinh^2 mu + sin^2 nu)

## The Lagrangian

The Lagrangian is:
cc L(mu,dot mu,nu,dot nu,dot varphi) = KE - PE
= 1/2 m v^2 - U(mu)
= 1/2m [ a^2 dot varphi^2 sinh^2 mu sin^2 nu + a^2 (dot mu^2 + dot nu^2) (sinh^2 mu + sin^2 nu) ] - U(mu)

The conjugate momentum to varphi is the constant:
p_varphi = (del cc L)/(del dot varphi) = m a^2 dot varphi sinh^2 mu sin^2 nu
Note that m a^2 dot varphi sinh^2 mu sin^2 nu = m r^2 dot phi which is the angular momentum, so angular momentum in the system is conserved.

## The energy equation

In order to derive the equations of motion it is possible to create a Routhian equation, from this generate Euler-Lagrange equations, and then with some difficulty integrate them. Curiously all this activity leads one around in a circle back to E = KE + PE in a form which we can construct without going to any of this effort.
E = (m a^2)/2 (dot mu^2 + dot nu^2)(sinh^2 mu + sin^2 nu) + p_varphi^2 / (2 m a^2 sinh^2 mu sin^2 nu) - 2k ln[tanh(mu/2)]
In the potential energy portion of the equation ln [tanh(mu/2)] = -1/2 ln((cosh(mu)+1)/(cosh(mu)-1)) which gives the potential energy as calculated above. The kinetic energy portion of the equation has been rearranged to remove dot varphi.

dot mu^2 + dot nu^2 is a interesting part of this equation - it is a major component of the velocity and because the total energy is constant it is dependant on just two of the position coordinates mu and nu. It is a convenient quantity to check in simulations. There is also a shorter form of the energy equation:
E = (m a^2)/2 (dot mu^2 + dot nu^2)(sinh^2 mu + sin^2 nu) + 1/2 p_varphi dot phi - 2k ln[tanh(mu/2)]
The brevity comes at the expense of adding an extra variable.

It's possible/probable that the energy equation in one of the forms shown above together with the conjugate moment equation
 p_varphi = m a^2 dot varphi sinh^2 mu sin^2 nu
form the best description of the equations of motion of the system.

## Further work

Ideally I would have parametric descriptions of the motion, but this may not be achievable.