Here is the whole problem:

Calculus of Variations Rund Trautman Electromagnetism Problem
A,V,x and x dot are all functions of time.

I think I need to show that a function F exists such that

$\displaystyle \dot F(t)= ( q \frac{\partial A_j}{\partial x_i}\dot x_j-q \frac{\partial V}{\partial x_i} )x_i + q A_i \dot x_i +2tq(\dot x_i \frac{\partial A_i}{\partial t}-\frac{\partial V}{\partial t})-2qV$

Now terms 2 and 4 are clearly only functions of t.

I can manipulate term 3 to get:

$\displaystyle - \underline E \cdot \underline {\dot x} - \frac{dV}{dt}$

Now term 1 is my problem

$\displaystyle \dot F_1(t)= ( q \frac{\partial A_j}{\partial x_i}\dot x_j-q \frac{\partial V}{\partial x_i} )x_i$

And if I'm not mistaken I do that by getting rid of the partial derivaties?

Using the equation for E I get:

$\displaystyle ( q \frac{\partial A_j}{\partial x_i}\dot x_j-q \frac{\partial V}{\partial x_i} )x_i=q( \frac{\partial A_j}{\partial x_i}\dot x_j + \underline E + \frac{\partial A_i}{\partial t} )x_i$

Now the RHS of this looks remarkibly (but not quite) like the total derivative of A. The next equation is not correct (I don't think) but it is the sort of thing I need to get to?

$\displaystyle q \frac{d \underline A}{dt} \cdot \underline r + q \underline E \cdot \underline r$