I'm trying to learn Lagrangian mechanics and have been reading a lot of articles on it. But many of the articles write the equations in different ways, probably for different purposes.
The Euler-Lagrange equation is:
$$\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial{L}}{\partial{\dot{q_i}}}\right)-\frac{\partial{L}}{\partial{q_i}}=0$$
But then I've also seen a lot of other versions.
$$\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial{T}}{\partial{\dot{x}}}\right)-\frac{\partial{T}}{\partial{x}}=Q$$
$$\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial{L}}{\partial{\dot{q_i}}}\right)-\frac{\partial{L}}{\partial{q_i}}=Q_i$$
$$\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial{L}}{\partial{\dot{q_i}}}\right)-\frac{\partial{L}}{\partial{q_i}}+\frac{\partial{P}}{\partial{\dot{q_i}}}=Q_i$$
My questions are as follows:
- In which cases do you only need to consider the kinetic energy as in the second equation?
- To include non-conservative forces as friction, do you just add the force as a generalized force in equation 3 or do you have to add a Rayleigh dissipation function as in equation 4?