# Lagrangian of Non-Relativistic Charged Particle in a Magnetic Field

I'm trying to derive the Lagrangian for a non-relativistic charged particle under the influence of a magnetic potential.

I'm assuming that $F=-\textrm{grad}(V)$ and so by the Lorentz force we have $-\textrm{grad}(V)=q v \times (\textrm{curl}(A))$ and thus I would somehow like to "solve" for $V$ in order to plug it into the Lagrangian $L\equiv T-V$.

However, doing so, I arrive at $-\partial_j V=q\sum_iv_i\left(\partial_j A_i-\partial_i A_j\right)$ and I don't see an obvious way to get from here to $V=-\frac{q}{c}\sum_iA_i v_i$.

Hint to the question (v2): For a velocity-dependent force ${\bf F}$ (such as e.g. the Lorentz force), the relationship between force ${\bf F}$ and potential $U$ is
$${\bf F}~=~\frac{d}{dt} \frac{\partial U}{\partial {\bf v}} - \frac{\partial U}{\partial {\bf r}}.$$