# How can dissipative/friction terms be incorporated into a Lagrangian?

I'm trying to find a suitable Lagrangian for a damped harmonic oscillator, a system that satisfies the following equation of motion:

$$m \ddot{x} + \gamma \dot{x} + \frac{d\phi}{dx} = 0.$$

What I find in most texts is that the Lagrangian is defined as

$$L = T - V$$

and the dissipation terms are obtained from a separate dissipation function

$$\mathscr{F} = \frac{1}{2}\gamma\dot{x}^2$$

which gives the Lagrange equation

$$\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{x}}\right) - \frac{\partial L}{\partial x} = -\frac{\partial \mathscr{F}}{\partial \dot{x}}.$$

However, I'm trying to derive the EOM from basic variational principles, by setting $$\delta S = 0$$, where $$S$$ is the action.

Is there any way to incorporate the dissipation term in the Lagrangian so that this would be possible? If not, why can it not be incorporated?

I am unable to find the reasoning behind this on the texts I've referred to so far (Goldstein as well as Landau-Lishitz), and it would be helpful if someone could direct me towards a resource where I can find something on this.

## 1 Answer

The variational principle produces the equation of motion you wrote from the Lagrangian written below: $$L(t,x, \dot{x}) = e^{\gamma t/m} \left(\frac{1}{2}m \dot{x}^2 -\phi(x)\right)\:.$$ (See also Lagrangians not of the form $T-U$.)