Originally Posted by

**Twig** Hi

I have a problem that I dont really understand.

An electron with mass m and charge Q moves in an electric and magnetic forcefield with strengths E(x,y,z) and B(x,y,z). If the electrons position is described in cartesian coordinates r(t)=(x(t),y(t),z(t)) and velocity vector

dr/dt = v(t)=(u(t),v(t),w(t)) then:

$\displaystyle m\frac{d\vec{v}}{dt}=Q(E(r)-B(r) \, \times \, v) $

The X is the cross product. I am supposed to write these equations as a first order system, that is, write out the equations for all the six components x,y,z,u,v,w.

I dont get what I am supposed to do.

I do realize to be able to use MATLAB to solve differential equations of second order, I need to re-write to first order, but this I have done for very simple diff. equations.

Thanks!

PS: If anyone has a good link or something about using ODE45, feel free to post it.