A charged particle in electric and magnetic fields

When a charged particle moves in a electric field $\vec{E}$ and a magnetic field $\vec{B}$, the force on the particle is,

$ \vec{F} = q(\vec{E} + \vec{v}\times \vec{B}),$

where $q$ is the charge of the particle and $m$ is the mass. Written out in terms of its three components, the Lorentz force is,

$F_x = q(E_x+v_yB_z-v_zB_y)$,
$F_y = q(E_y+v_zB_x-v_xB_z)$,
$F_z = q(E_z+v_xB_y-v_yB_x).$

In general, the three components of the electric and magnetic fields can be functions of space and time.

  $m=$  kg $q=$  C
  $E_x=$  V/m $E_y=$  V/m $E_z=$  V/m
  $B_x=$  T $B_y=$  T $B_z=$  T

The intitial conditions at $t=0$ are:
$x=$  m  $y=$  m  $z=$  m  $v_x=$  m/s  $v_y=$  m/s  $v_z=$  m/s

When a constant uniform electric field is perpendicular to a constant uniform magnetic field, the average velocity of the charged particle will be in the direction perpendicular to both the electric field and the magnetic field. Note that electrons move very fast so a short time step $\Delta t$ must be selected.

 3-D motion differential equation solver 

$ F_x=$


$ F_y=$


$ F_z=$


$ m=$

Initial conditions:



$\Delta t=$


















3-D plot: 

 $t$ [s] $x$ [m] $y$ [m] $z$ [m] $v_x$ [m/s] $v_y$ [m/s] $v_z$ [m/s] $F_x$ [N] $F_y$ [N] $F_z$ [N] $P$ [W] $E_{\text{kin}}$ [J] $W$ [J]