jag said:
@TSny Thank you for the answer. It is clear to me why the spatial derivatives doesn't act on ##\dot x##. One question, for the term (v⋅∇)⋅A, does the spatial derivative also doesn't act on ##A##?
I think you are a victim of the confusion with the partial derivatives wrt. to ##q## and ##\dot{q}## in the Lagrange formalism, which is partially due to the physicists' sloppy notation, which however is very convenient when you've gotten used to it.
The Lagrangian is a function of the generalized coordinates ##q=(q_1,\ldots,q_f)## and velocities ##\dot{q}=(\dot{q}_1,\ldots,\dot{q}_f)## (where ##f## is the number of degrees of freedoms), i.e., ##L=L(q,\dot{q})##. Now when taking partial derivatives ##\partial/\partial q_j## and ##\partial/\partial \dot{q}_j## you have to consider the ##q## and ##\dot{q}## simply as independent variables (by definition of the physicists' sloppy notation).
On the other hand ##q(t)## are trajectories parametrized with time as the parameter, and then ##\dot{q}(t)=\mathrm{d} q(t)/\mathrm{d} t## are time derivatives of these trajectories. This time derivative is written as a total derivative, and then you get an expression like the Euler-Lagrange equations
$$\frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial L}{\partial \dot{q}_j}=\frac{\partial L}{\partial q_j}.$$
On the left-hand side you first have to interpret the ##\dot{q}_j## as the one independent variable of the Lagrangian wrt. which you have to differentiate the Lagrangian, which gives again a function of the ##q## and ##\dot{q}## of course. Then the total time derivative tells you to now plug in the trajectory ##q(t)## for the ##q## and the time-drivatives ##\mathrm{d} q(t)/\mathrm{d} t## for the ##\dot{q}## and differentiate this expression with respect to ##t##.
Now in your example you have the piece
$$L_{\text{mag}}=q \dot{\vec{x}} \cdot \vec{A}(\vec{x},t),$$
where now we use the cartesian coordinates ##\vec{x}## for the ##q##'s, and we write ##\vec{\nabla}=\partial/\partial \vec{x}## for the partial derivatives with respect to these ##q##'s. The ##\dot{\vec{x}}## have to be considered as indepenent variables when such partial derivatives are to be calculated. In this case it gets more clear in the Ricci notation, i.e., you write (with Einstein summation convention applied)
$$L_{\text{mag}}=q \dot{x}_j A_j (\vec{x},t)$$
Then
$$\frac{\partial L_{\text{mag}}}{\partial x_k}=q \dot{x}_j \frac{\partial}{\partial x_k} A(\vec{x},t).$$
Also the contribution of this term to the left-hand side of the Euler-Lagrange equations. You first need
$$\frac{\partial L_{\text{mag}}}{\partial \dot{x}_k} = q A_k(\vec{x},t).$$
Then you have to take the total time derivative, now putting ##\vec{x}(t)## into ##A_k## and use the chain rule,
$$\frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial L_{\text{mag}}}{\partial \dot{x}_k}=q \frac{\mathrm{d}}{\mathrm{d} t} A_k [\vec{x}(t),t] = q \dot{x}_l \frac{\partial}{\partial x_l} A_k[\vec{x}(t),t] + q \frac{\partial}{\partial t} A_k[\vec{x}(t),t].$$
In the final expression the partial time derivative only refers to the explicit time dependence of ##A_k##!