Charge, velocity-dependent potentials and Lagrangian Given an electric charge $q$ of mass $m$ moving at a velocity ${\bf v}$ in a region containing both electric field ${\bf E}(t,x,y,z)$ and magnetic field ${\bf B}(t,x,y,z)$ (${\bf B}$ and ${\bf E}$ are derivable from a scalar potential $\phi(t, x, y, z) $and a vector potential  ${\bf A}(t,x,y,z)$), 
knowing that 


*

*${\bf E}=- \nabla \phi - \frac{\partial {\bf A}} {\partial t}$

*${\bf B}= \nabla \times {\bf A} $

*$U=q \phi - q {\bf A} \cdot{\bf v}$ ($U$ is the velocity-dependent potential)


the Lagrangian is $$L=(1/2) m v^2-U=(1/2) m v^2- q\phi + q{\bf A} \cdot{\bf v}.$$
Considering just the $x$-component of Lagrange's equation, how can I obtain 
$$m \ddot{x}=q\left (v_x \frac{\partial A_x}{\partial x} + v_y \frac {\partial A_y}{ \partial x} + v_z \frac{\partial A_z} {\partial x}\right )-q\left (\frac{\partial \phi }{\partial x} + \frac{d A_x}{dt}\right) ~?$$
 A: Use the Euler-Lagrange equations (motivated in a previous post of mine). These are
$$ \partial_x L - \frac{\mathrm{d}}{\mathrm{d}t} \left( \partial_{v_x} L \right) = 0 $$
We therefore need
$$ \partial_x L = -q \partial_x \Phi + q \left( \partial_x A_x v_x + \partial_x A_y v_y + \partial_x A_z v_z \right) $$
$$ \partial_{v_x} L = m v_x + q A_x $$
$$ \frac{\mathrm{d}}{\mathrm{d}t} \left( \partial_{v_x} L \right) = m \dot v_x + q \dot A_x $$
Putting this all together into the first equation and adding $\dot v_x m$ gives the equation for which you are looking.
Note especially that each component of $A$ is a function of all three coordinates: $A_i = A_i(x,y,z)$; the same goes for $\Phi = \Phi(x,y,z)$ (where usually $A_0$ is identified with $\Phi$ in relativistic electrodynamics).
A: Use the Euler-Lagrange equation:
$$\frac{\partial L}{\partial x} = \frac{d}{dt}\frac{\partial L}{\partial v_x}$$
$$-q \frac{\partial \phi}{\partial x} + q\frac{\partial}{\partial x}\left(\mathbf{A} \cdot \mathbf{v}\right) = m \dot{v_x} + q \frac{dA_x}{dt}$$
