I am trying to derive from the Lorentz force equation the time derivative of the total energy. This involves using the equation for the jth electron in an electron beam travelling through an undulator. I have done it in such a way using the work done relation however I have been told that it is possible to derive it directly from the equation itself using: γ-2=1-v2/c2, d/dt(γmov)=-e(E+vxB), and the releation ½d/dt(v2)=v.d/dt(v). The above were given as hints to derive the formula, but as far i can get is dot both sides with v and use the chain rule allowing me to sub in the γ term, but this leaves me with d/dt(ymoc2) - d/dt(y-1moc2) on the left and -2eE.v on the right. Not sure if i'm missing something. Any help would be great.