= Solution
Let $q(t)=\boldsymbol r(t)\cdot\boldsymbol B$. Since the field is constant, dotting the equation of motion with $\boldsymbol B$ eliminates the magnetic term:
$$
m\ddot q=-kq-e(\dot{\boldsymbol r}\times\boldsymbol B)\cdot\boldsymbol B=-kq.
$$
This is a <harmonic oscillator> with frequency $\omega=\sqrt{k/m}$. Initially $q(0)=\boldsymbol r_0\cdot\boldsymbol B$ and $\dot q(0)=0$, because the particle starts at rest. Therefore
$$
\boxed{\boldsymbol r(t)\cdot\boldsymbol B
=(\boldsymbol r_0\cdot\boldsymbol B)\cos\left(\sqrt{k/m}\,t\right).}
$$
The magnetic <force> modifies the transverse motion but not this projection. The formula also holds trivially when $\boldsymbol B=0$.
Back to article page