Lagrangian for a charged particle in a magnetic field

Hey I have a question that was almost completely answered in this thread:

Specifically someone interpreted his question to be how exactly do you get that
the term in the Lagrangian corresponding to the magnetic potential is

$$-q\vec{v}\cdot\vec{A}$$

 Quote by da_willem The only proofs I have seen rely on the Lagrangian principle. E.g. The Lagrangian $$L=T-V=\frac{1}{2}mu^2 + q\vec{u} \cdot \vec{A}$$ Subsituted in the Euler Lagrange equations $$\frac{d}{dt}\frac{\partial L}{\partial \dot{x}}=\frac{\partial L}{\partial x}$$ Using generalised coordinates x, y, z with generalized velocities $$\dot{x}, \dot{y}, \dot{z}$$ and $$u^2=\dot{x}^2+\dot{y}^2+\dot{z}^2$$ yields $$\frac{d}{dt}(m\dot{x}+qA_x)=q\frac{\partial}{\partial x}(\dot{x}A_x+\dot{y}A_y+\dot{z}A_z)$$ $$m \ddot{x}+q \frac{\partial A_x}{\partial t} =q(\dot{x}\frac{\partial A_x}{\partial x}+\dot{y}\frac{\partial A_y}{\partial x}+\dot{z}\frac{\partial A_z}{\partial x})$$ or after rearranging $$m \ddot{x}=-q(\frac{\partial \phi}{\partial x}+\frac{\partial A_x}{\partial t})+q[\dot{y}(\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y})+\dot{z}(\frac{\partial A_z}{\partial x}-\frac{\partial A_x}{\partial z})]=qE_x+q(\dot{y}B_z-\dot{z}B_y)$$ Which is exactly the x-component of the usual Lorentz force. So the potential term $$V=-q\vec{u} \cdot \vec{A}$$ can be motivated by the fact that it yields the right equation of motion.
Sadly, I had already worked up to the second to last line prior to his post, and I'm not clear
on what happened at that point. I would assume he added in $$\partial \phi/\partial x$$ because the electric potential is zero and that expression will look more like the typical $$E_x$$ that you see. The part that loses me though is how did he turn the term

$$\dot{x}\frac{\partial A_x}{\partial x}+\dot{y}\frac{\partial A_y}{\partial x}+\dot{z}\frac{\partial A_z}{\partial x}$$ into $$\dot{y}(\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y})+\dot{z}(\frac{\partial A_z}{\partial x}-\frac{\partial A_x}{\partial z})$$

Just from the looks of things it might be that:
$$\dot{x}\frac{\partial A_x}{\partial x} + \dot{y}\frac{\partial A_x}{\partial y} + \dot{z}\frac{\partial A_x}{\partial z} = 0$$

I don't really see why that should be true, so is there another way he could have done that, or what is the reasoning behind that equation? Also, sorry in advance. I did take a look at Jackson but he jumps into some relativistic stuff that I'm not ready for right now and we don't have a copy of Franklin in our library.
 It's explained in the book: "The Classical Theory of Fields" by Landau and Lifschitz.
 Recognitions: Science Advisor $$m\frac{d{\vec v}}{dt}= q[-\nabla\phi-\partial_t{\vec A}+{\vec v}\times(\nabla\times{\vec A})] = q[-\nabla\phi-\partial_t{\vec A}-({\vec v}\dot\nabla){\vec A} +\nabla({\vec v}\cdot{\vec A})] =\nabla[-q\phi+q{\vec v}\cdot{\vec A}]-q\frac{d{\vec A}}{dt}.$$

Lagrangian for a charged particle in a magnetic field

 Quote by Count Iblis It's explained in the book: "The Classical Theory of Fields" by Landau and Lifschitz.
Alright thanks. It looks like my problem happened here:

$$\frac{d}{dt}(m\dot{x}+qA_x)=q\frac{\partial}{\partial x}(\dot{x}A_x+\dot{y}A_y+\dot{z}A_z)$$

when I assumed that you could take that derivative of $$A_x$$ with respect to time partially. If I had taken a total derivative I'd have seen instead:

$$m\ddot{x}+q\frac{\partial A_x}{\partial t} + q(\dot{x}\partial_x A_x + \dot{y}\partial_y A_x + \dot{z} \partial_z A_x) =q(\dot{x}\partial_x A_x +\dot{y}\partial_x A_y+\dot{z}\partial_z A_z)$$

and that gives me what I was hoping for:

$$m \ddot{x}=-q\frac{\partial A_x}{\partial t}+q[\dot{y}(\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y})+\dot{z}(\frac{\partial A_z}{\partial x}-\frac{\partial A_x}{\partial z})]=qE_x+q(\dot{y}B_z-\dot{z}B_y)$$