We assume that the forces depend on coordinates and velocities both and are such that they can be derived from a generalized potential $$U$$ satisfying

$$\sum_α \vec F_α^{(e)} \frac {\partial \vec r_α} {\partial q_j} = - \frac {\partial U} {\partial q_j} + \frac d {dt} \frac {\partial U} {\partial \dot q_j} \hspace{7em} (33)$$

where $$U$$ is a function of $$q, \dot q, t$$
Then again (29) can be written in the Lagrangian form.

$$L = \frac d {dt} \left( \frac {\partial L} {\partial \dot q_j} \right) - \frac {\partial L} {\partial q_j} = 0 \hspace{7em} (34)$$

where we again have

$$L = T − U \hspace{7em} (35)$$

We leave verification of (34) as a simple exercise for the reader. $$L$$ is called Lagrangian and is a function of generalized coordinates $$q_j$$ , generalized velocities $$\dot q_j$$ and $$t$$

$$L = L (q, \dot q, t) \hspace{7em} (36)$$

We shall see that a description of motion of charges in electric and magnetic field requires use of a velocity dependent generalized potential recall that the magnetic forces are velocity dependent.