I am trying to figure out an expression for the position of a charged particle travelling downwards in the z-direction at some constant velocity through the static magnetic field generated by a bar magnet.
Following this post I have the expression for the magnetic field
$\mathbf{B}=\frac{\mathrm{B_r} V}{4 \pi \sqrt{x^2+y^2+z^2}^5} \left(3zx,3zy,2z^2-x^2-y^2\right)$
Where $B_r$ is the magnetic flux density and $V$ is the volume of the magnet. I then plug this into the relativistic Lorentz force equation $\frac{dp}{dt}$ = $\frac{e}{c}v\times B$, from which I should be able to get a function describing the position of the particle. However I am unsure how. If I take one of the components, e.g. the x component
m$\ddot{x}$ = $\frac{e}{c}$($-v_zB_y$)
and integrate by time twice to get a function of x, then I still have B as part of the function, which is a function of the space coordinates. I would like a function that has t as an argument alone. I assume I am missing something, but I am not sure what. Any help is appreciated.