YouTube
Simulation [gnuplot]
Modeling
Lorentz force
\begin{equation}
\label{eq:lorentz}
m\boldsymbol{\ddot{x}} = \color{red}{q\boldsymbol{E}} + \color{blue}{q (\boldsymbol{v}\times \boldsymbol{B})}
\end{equation}
Assume $\boldsymbol{E}=\left(-kx, -ky, 2kz\right)\ \left(k\ge 0\right), \boldsymbol{B}=\left(0, 0, B\right), q=-e$.Then from (\ref{eq:lorentz})
\begin{eqnarray}
\ddot{x} &=& \frac{e}{m}\left(kx-\dot{y}B\right) \label{eq:x} \\
\ddot{y} &=& \frac{e}{m}\left(ky+\dot{x}B\right) \label{eq:y} \\
\ddot{z} &=& -\frac{2ek}{m}z \label{eq:z}
\end{eqnarray}
em_motion_gif.plt
em_motion.gif
Extra
Analytical solution
Solving (\ref{eq:z}), we obtein
\begin{equation}
z=C\cos\left(\sqrt{2}\omega_{0}t+\alpha\right),
\end{equation}
where
\[
{\omega_{0}}^2=\frac{ek}{m}.
\]
Rearranging (\ref{eq:x}) and (\ref{eq:y}), we have
\begin{eqnarray}
\left\{ \label{eq:xy}
\begin{array}{l}
\ddot{x}-{\omega_{0}}^2 x+2b\dot y=0\\
\ddot{y}-{\omega_{0}}^2 y+2b\dot x=0,
\end{array}
\right.
\end{eqnarray}
where
\[
b=\frac{eB}{2m}
\]
By putting $x=Ae^{i\omega t}$ and $y=Be^{i\omega t}$, substitution of these in (\ref{eq:xy}) leads to (\ref{eq:xy2}).
\begin{eqnarray}
\left\{ \label{eq:xy2}
\begin{array}{l}
-\left(\omega^2+{\omega_{0}}^{2}\right)A+2ib\omega B = 0 \\
-2ib\omega A-\left(\omega^2+{\omega_{0}}^{2}\right)B = 0.
\end{array}
\right.
\end{eqnarray}
To get the solutions except for $A=B=0$, solve (\ref{eq:det}):
\begin{equation}
\left|
\begin{array}{cc}
-\left(\omega^2+{\omega_{0}}^{2}\right) & 2ib\omega \\
-2ib\omega & -\left(\omega^2+{\omega_{0}}^{2}\right)
\end{array}
\right| = 0 \label{eq:det}
\end{equation}
\[
\therefore\omega^2+{\omega_0}^2 = \pm 2b\omega \label{eq:det2}
\]
When $b$ is greater than $\omega_0$, we obtain
\begin{eqnarray}
\label{eq:omega}
\left\{
\begin{array}{l}
\pm\omega_1 = b+\sqrt{b^2-{\omega_0}^2} \\
\pm\omega_2 = b-\sqrt{b^2-{\omega_0}^2}.
\end{array}
\right.
\end{eqnarray}
Inserting (\ref{eq:omega}) into (\ref{eq:xy2}), we get
\begin{eqnarray}
\frac{B}{A} =
\begin{cases}
-i && (+\omega_1, +\omega_2)\\
i && (-\omega_1, -\omega_2).
\end{cases}
\end{eqnarray}
\begin{eqnarray}
\label{eq:solution}
\therefore\left\{
\begin{array}{l}
x = A_1 e^{i\omega_1 t}+A_2 e^{-i\omega_1 t}+A_3 e^{i\omega_2 t}+A_4 e^{-i\omega_2 t} \\
y = -i A_1 e^{i\omega_1 t}+i A_2 e^{-i\omega_1 t}-i A_3 e^{i\omega_2 t}+i A_4 e^{-i\omega_2 t} \\
\end{array}
\right.
\end{eqnarray}
We put
\begin{eqnarray}
\label{eq:Ralpha}
\begin{cases}
R_1 = 2\sqrt{A_1 A_2} \\
R_2 = 2\sqrt{A_3 A_4} \\
\alpha_1 = \tan^{-1}\left[\frac{i\left(A_1-A_2\right)}{A_1+A_2}\right]\\
\alpha_2 = \tan^{-1}\left[\frac{i\left(A_3-A_4\right)}{A_3+A_4}\right].
\end{cases}
\end{eqnarray}
Combining (\ref{eq:solution}) and (\ref{eq:Ralpha}), we obtain
\begin{eqnarray}
\left\{
\begin{array}{l}
x = R_1 \cos\left(\omega_1 t+\alpha_1\right)+R_2 \cos\left(\omega_2 t+\alpha_2\right) \\
y = R_1 \sin\left(\omega_1 t+\alpha_1\right)+R_2 \sin\left(\omega_2 t+\alpha_2\right).
\end{array}
\right.
\end{eqnarray}
EM_field.plt
E_field.png
B_field.png