31

I am trying to write the Lagrangian and Hamiltonian for the forced Harmonic oscillator before quantizing it to get to the quantum picture. For EOM $$m\ddot{q}+\beta\dot{q}+kq=f(t),$$ I write the Lagrangian $$ L=\frac{1}{2}m\dot{q}^{2}-\frac{1}{2}kq^{2}+f(t)q$$ with Rayleigh dissipation function as $$ D=\frac{1}{2}\beta\dot{q}^{2}$$ to put in Lagrangian EOM $$0 = \frac{\mathrm{d}}{\mathrm{d}t} \left ( \frac {\partial L}{\partial \dot{q}_j} \right ) - \frac {\partial L}{\partial q_j} + \frac {\partial D}{\partial \dot{q}_j}. $$

On Legendre transform of $L$, I get $$H=\frac{1}{2m}{p}^{2}+\frac{1}{2}kq^{2}-f(t)q.$$

How do I include the dissipative term to get the correct EOM from the Hamiltonian's EOM?

Qmechanic
  • 201,751

2 Answers2

40

Problem: Given Newton's second law

$$\begin{align} m\ddot{q}^j~=~&-\beta\dot{q}^j-\frac{\partial V(q,t)}{\partial q^j}, \cr j~\in~&\{1,\ldots, n\}, \end{align}\tag{1} $$

for a non-relativistic point particle in $n$ dimensions, subjected to a friction force, and also subjected to various forces that have a total potential $V(q,t)$, which may depend explicitly on time.

I) Conventional approach: There is a non-variational formulation of Lagrange equations

$$\begin{align} \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}^j}\right)-\frac{\partial L}{\partial q^j}~=~&Q_j, \cr j~\in~&\{1,\ldots, n\},\end{align}\tag{2} $$

where $Q_j$ are the generalized forces that do not have generalized potentials. In our case (1), the Lagrangian in eq. (2) is $L=T-V$, with $T=\frac{1}{2}m\dot{q}^2$; and the force

$$ Q_j~=~-\beta\dot{q}^j\tag{3} $$

is the friction force. It is shown in e.g. this Phys.SE post that the friction force (3) does not have a potential. As OP mentions, one may introduce the Rayleigh dissipative function, but this is not a genuine potential.

Conventionally, we additionally demand that the Lagrangian is of the form $L=T-U$, where $T=\frac{1}{2}m\dot{q}^2$ is related to the LHS of EOMs (1) (i.e. the kinematic side), while the potential $U$ is related to the RHS of EOMs (1) (i.e. the dynamical side).

With these additional requirements, the EOM (1) does not have a variational formulation of Lagrange equations

$$\begin{align} \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}^j}\right)-\frac{\partial L}{\partial q^j}~=~&0,\cr j~\in~&\{1,\ldots, n\},\end{align}\tag{4} $$

i.e. Euler-Lagrange equations. The Legendre transformation to the Hamiltonian formulation is traditionally only defined for a variational formulation (4). So there is no conventional Hamiltonian formulation of the EOM (1).

II) Unconventional approaches:

  1. Trick with exponential factor$^1$: Define for later convenience the function $$ e(t)~:=~\exp(\frac{\beta t}{m}). \tag{5}$$ A possible variational formulation (4) of Lagrange equations is then given by the Lagrangian $$\begin{align} L(q,\dot{q},t)~:=~&e(t)L_0(q,\dot{q},t), \cr L_0(q,\dot{q},t)~:=~&\frac{m}{2}\dot{q}^2-V(q,t).\end{align}\tag{6}$$ The corresponding Hamiltonian is $$ H(q,p,t)~:=~\frac{p^2}{2me(t)}+e(t)V(q,t).\tag{7}$$ One caveat is that the Hamiltonian (7) does not represent the traditional notion of total energy. Another caveat is that this unconventional approach cannot be generalized to the case where two coupled sectors of the theory require different factors (5), e.g. where each coordinate $q^j$ has individual friction-over-mass-ratios $\frac{\beta_j}{m_j}$, $j\in\{1, \ldots, n\}$. For this unconventional approach to work, it is crucial that the factor (5) is an overall common multiplicative factor for the Lagrangian (6). This is an unnatural requirement from a physics perspective.

  2. Imposing EOMs via Lagrange multipliers $\lambda^j$: A variational principle for the EOMs (1) is $$\begin{align}L ~=~& m\sum_{j=1}^n\dot{q}^j\dot{\lambda}^j\cr &-\sum_{j=1}^n\left(\beta\dot{q}^j+\frac{\partial V(q,t)}{\partial q^j}\right)\lambda^j.\end{align}\tag{8}$$ (Here we have for convenience "integrated the kinetic term by parts" to avoid higher time derivatives.)

  3. Classical Schwinger/Keldysh "in-in" formalism: The variables are doubled up. See e.g. eq. (20) in C.R. Galley, arXiv:1210.2745. Ignoring boundary terms$^2$ the Lagrangian reads $$\begin{align} \widetilde{L}(q_{\pm},\dot{q}_{\pm},t) ~=~&\left. L(q_1,\dot{q}_1,t)\right|_{q_1=q_+ + q_-/2}\cr ~-~&\left. L(q_2,\dot{q}_2,t)\right|_{q_2=q_+ - q_-/2}\cr ~+~&Q_j(q_+,\dot{q}_+,t)q^j_-\end{align}\tag{9}. $$ The initial conditions $$\left\{\begin{array}{rcl} q^j_+(t_i)&=&q^j_i,\cr\dot{q}^j_+(t_i)&=&\dot{q}^j_i\end{array}\right.\tag{10} $$ implement the system's underlying initial values. The final conditions $$\begin{align}\left\{\begin{array}{rcl} q^j_-(t_f)&=&0\cr \dot{q}^j_-(t_f)&=&0 \end{array}\right. & \cr\cr\qquad\Downarrow&\qquad\cr\cr \left.\frac{\partial \widetilde{L}}{\partial \dot{q}^j_+}\right|_{t=t_f}~=~&0 \end{align}\tag{11} $$ implement the physical limit solution $q_-^j= 0$. The doubling trick (9) is often effectively the same as introducing Lagrange multipliers (8).

  4. Gurtin-Tonti bi-local method: See e.g. this Phys.SE post.

--

$^1$ Hat tip: Valter Moretti.

$^2$ The variational problem (9)+(10)+(11) needs an appropriate initial term, which might not always exist! In particular, since we already imposed $4n$ boundary conditions (10)+(11), it would be too much to also impose the initial condition $$ q^j_-(t_i)~=~0. \qquad (\leftarrow\text{Wrong!})$$ Example: If $L=\frac{1}{2}m\dot{q}^2$, then $\widetilde{L}=m\dot{q}_+\dot{q}_-$, and one should add an initial term $m\dot{q}_+(t_i)q_-(t_i)$ to the action $\widetilde{S}$.

Qmechanic
  • 201,751
  • Notes for later: Minkowski signature $(-,+,\ldots,+)$. Fourier transform: $\quad\widetilde{Q}(k)=\int! d^dx ~e^{-ik\cdot x}Q(x)$; $\quad Q(x)=\int! \frac{d^dk}{(2\pi)^d} e^{+ik\cdot x} \widetilde{Q}(k)$; Greens functions: $\quad -(\Box-m^2)\Delta(x!-!y)=\delta^d(x!-!y)$; $\quad -(\Box-m^2)Q(x)=j(x)$; $\quad Q(x)=\int ! d^y~\Delta(x!-!y)j(y)$; $\quad \widetilde{Q}(k)=\widetilde{\Delta}(k)\widetilde{j}(k)$; Related: https://physics.stackexchange.com/q/742721/2451 – Qmechanic Nov 18 '14 at 12:27
  • Free "in-in" Schwinger-Keldysh action: $\quad S_2- \int! d^dx~{\cal L}2 = -i\epsilon^2 \int! d^dx~d^dy~Q_2(x)\Delta+(x!-!y)Q_1(y)$ $= -i\epsilon^2 \int! d^dx~d^dy~Q_1(x)\Delta_-(x!-!y)Q_2(y)$; $\quad S_2- \int! d^dx~{\cal L}2 = \frac{\epsilon}{\pi}{\rm PV}\int! d^dx~d^dy~Q+(x)\frac{1}{x^0-y^0}Q_-(y)$ $+\frac{i\epsilon^2}{4} \int! d^dx~d^dy~Q_-(x)\Delta_1(x!-!y)Q_-(y)$; Bi-local in spacetime. – Qmechanic May 07 '18 at 14:13
  • Lagrangian density: $\quad{\cal L}2 =-\frac{1}{2}\partial{\mu}Q_1\partial^{\mu}Q_1 -\frac{1}{2}(m^2-i\epsilon)Q_1^2 +\frac{1}{2}\partial_{\mu}Q_2\partial^{\mu}Q_2 +\frac{1}{2}(m^2+i\epsilon)Q_2^2$ $=-\partial_{\mu}Q_+\partial^{\mu}Q_- -m^2Q_+Q_- +i\epsilon(Q_+^2+\frac{1}{4}Q_-^2)$; $\quad{\cal L}2 =-\partial{\mu}Q_+\partial^{\mu}Q_- -m^2Q_+Q_-$; $\quad\widetilde{\cal L}2~\sim~ -\widetilde{Q}+(k)(k^2+m^2+i\epsilon{\rm sgn}(k^0))\widetilde{Q}-(-k)$ $~\sim~-\widetilde{Q}-(k)(k^2+m^2-i\epsilon{\rm sgn}(k^0))\widetilde{Q}_+(-k)$; Almost local/diagonal in momentum space. – Qmechanic Aug 17 '22 at 14:39
  • Keldysh variables: $\quad Q_+=\frac{Q_1+Q_2}{2}$; $\quad Q_-= Q_1-Q_2$; Wick rotation to convergent Euclidean formulation seems obscure. Time-ordered 2-point function according to the Keldysh integration contour: $\quad\langle TQ_1(x)Q_1(y)\rangle^{(0)}{J=0}=\frac{\hbar}{i} \Delta_F(x!-!y)$; $\quad \langle Q_1(x)Q_2(y)\rangle^{(0)}{J=0}=\hbar \Delta_-(x!-!y)$; $\quad \langle Q_2(x)Q_1(y)\rangle^{(0)}{J=0}=\hbar \Delta+(x!-!y)$; $\quad \langle AT~ Q_2(x)Q_2(y)\rangle^{(0)}{J=0}=-\frac{\hbar}{i} \Delta{AF}(x!-!y)$; – Qmechanic Aug 18 '22 at 07:44
  • $\quad\langle Q_+(x)Q_+(y)\rangle^{(0)}{J=0}= \frac{\hbar}{2}\Delta_1(x!-!y)$; $\quad\langle Q+(x)Q_-(y)\rangle^{(0)}{J=0}= \frac{\hbar}{i} \Delta_R(x!-!y)$; $\quad\langle Q-(x)Q_+(y)\rangle^{(0)}{J=0} =\frac{\hbar}{i} \Delta_A(x!-!y)$; $\quad \langle Q-(x)Q_-(y)\rangle^{(0)}{J=0} =0$; Greens functions: $\quad\frac{1}{i}\Delta_F(x!-!y)=\theta(x^0!-!y^0)\Delta+(x!-!y) +\theta(y^0!-!x^0)\Delta_-(x!-!y)$; $\quad-\frac{1}{i} \Delta_{AF}(x!-!y)=\theta(y^0!-!x^0)\Delta_+(x!-!y) +\theta(x^0!-!y^0)\Delta_-(x!-!y)$; – Qmechanic Aug 18 '22 at 08:38
  • Fourier transform: $\quad\widetilde{\Delta}F(k) = \widetilde{\Delta}_E(k^0(\epsilon-i),\vec{k})$ $=\frac{1}{k^2+m^2-i\epsilon}$ $=\frac{1}{2\omega}\left(\frac{1}{k^0+\omega}+\frac{1}{-k^0+\omega}\right)$ HM?? $={\rm PV}\frac{1}{k^2+m^2} +i\pi \delta(k^2+m^2)$ $=\widetilde{\bar{\Delta}}(k)+\frac{i}{2}\widetilde{\Delta}_1(k)$; $\quad -\widetilde{\Delta}{AF}(k)=\frac{-1}{k^2+m^2+i\epsilon}$ $=-{\rm PV}\frac{1}{k^2+m^2} +i\pi \delta(k^2+m^2)$; Wightman functions: $\quad\widetilde{\Delta}+(k) =\theta(k^0)~2\pi \delta(k^2+m^2)$; $\quad\widetilde{\Delta}-(k) =\theta(-k^0)~2\pi \delta(k^2+m^2)$; – Qmechanic Aug 18 '22 at 11:51
  • $\quad\widetilde{\Delta}1(k)=2\pi \delta(k^2+m^2)$; $\quad\widetilde{\Delta}_C(k)={\rm sgn}(k^0)~2\pi \delta(k^2+m^2)$; $\quad\widetilde{\bar{\Delta}}(k)={\rm PV}\frac{1}{k^2+m^2}$; $\quad\Delta_1=\Delta+ +\Delta_- =\frac{1}{i}(\Delta_F-\Delta_{AF})$; $\quad \Delta_C=\Delta_+ -\Delta_- =\frac{1}{i}(\Delta_R-\Delta_A)$ imaginary; $\quad \bar{\Delta}=\frac{\Delta_R+\Delta_A}{2}$; – Qmechanic Aug 18 '22 at 12:50
  • Advanced/retarded Greens function: $\quad\widetilde{\Delta}_{A/R}(k)=\frac{1}{-(k^0\mp i\epsilon)^2+ \vec{k}^2+m^2}$ $=\frac{1}{k^2+m^2\pm i\epsilon{\rm sgn}(k^0)}$$={\rm PV}\frac{1}{k^2+m^2} \mp \frac{i}{2}\widetilde{\Delta}_C(k)$; $\quad\Delta_R(x!-!y) =i\theta(x^0!-!y^0)\Delta_C(x!-!y)$ real; $\quad\Delta_A(x!-!y) =-i\theta(y^0!-!x^0)\Delta_C(x!-!y)$ real; – Qmechanic Aug 18 '22 at 14:00
  • Original double fields: $\quad {\bf \Delta}=\begin{pmatrix} \Delta_F &i\Delta_- \cr i\Delta_+ &-\Delta_{AF} \end{pmatrix}$; $\quad {\bf \Delta}^{-1}=\begin{pmatrix} \Delta_F^{-1} &i\epsilon^2\Delta_- \cr i\epsilon^2\Delta_+ &-\Delta_{AF}^{-1} \end{pmatrix}$; Keldysh variables: $\quad {\bf \Delta}=\begin{pmatrix} \frac{i}{2}\Delta_1 &\Delta_R \cr \Delta_A &0 \end{pmatrix}$; $\quad {\bf \Delta}^{-1}=\begin{pmatrix} 0 &\Delta_A^{-1} \cr \Delta_R^{-1} &-\frac{i\epsilon^2}{2}\Delta_1\end{pmatrix}$; – Qmechanic Aug 21 '22 at 07:58
  • 2D Euclidean massless case: $\quad \Delta_E(r)=-\frac{1}{2\pi}\ln(r)$; 1+1D Minkowskian massless case: $\quad \Delta_F(x,t) =i\Delta_E(x,(i+\epsilon)t)$ $=-\frac{i}{4\pi}{\rm Ln}(x^2!-!t^2+i\epsilon)$ $=-\frac{i}{4\pi}\ln|x^2!-!t^2|+\frac{1}{4}\theta(t^2!-!x^2)$; $\quad \Delta_{\pm}(x,t) =-\frac{1}{4\pi}{\rm Ln}(x^2!-!t^2\pm i\epsilon{\rm sgn}(t))$ $=-\frac{1}{4\pi}\ln|x^2!-!t^2| \mp\frac{i}{4}{\rm sgn}(t)\theta(t^2!-!x^2) =\Delta_{\mp}(-x,-t)$; – Qmechanic Aug 23 '22 at 14:23
  • $\quad \Delta_1(x,t)=-\frac{1}{2\pi}\ln|x^2!-!t^2|$; $\quad \Delta_C(x,t)=-\frac{i}{2}{\rm sgn}(t)\theta(t^2!-!x^2)$; $\quad \Delta_R(x,t)=\frac{1}{2}\theta(t!-!|x|)$; $\quad \Delta_A(x,t)=\frac{1}{2}\theta(-t!-!|x|)$; $\quad \bar{\Delta}(x,t)=\frac{1}{4}\theta(t^2!-!x^2)$; – Qmechanic Aug 23 '22 at 17:44
  • 4D Euclidean massless case: $\quad \Delta_E(r)=\frac{1}{4\pi^2r^2}$; 3+1D Minkowskian massless case: $\quad \Delta_F(r,t) =i\Delta_E(r,(i+\epsilon)t)$ $=\frac{i}{4\pi^2}\frac{1}{r^2-t^2+i\epsilon}$ $=\frac{i}{4\pi^2}\frac{r^2-t^2-i\epsilon}{(r^2-t^2)^2+\epsilon^2}$ $=\frac{i}{4\pi^2}{\rm PV}\frac{1}{r^2-t^2}+\frac{1}{4\pi}\delta(r^2!-!t^2)$; $\quad \Delta_{\pm}(r,t) =\frac{1}{4\pi^2}\frac{1}{r^2-t^2\pm i\epsilon{\rm sgn}(t)}$ $=\frac{1}{4\pi^2}{\rm PV}\frac{1}{r^2-t^2}\mp\frac{i}{4\pi}{\rm sgn}(t)\delta(r^2!-!t^2) =\Delta_{\mp}(r,-t)$; – Qmechanic Aug 25 '22 at 10:22
  • $\quad \Delta_1(r,t)=\frac{1}{2\pi^2}{\rm PV}\frac{1}{r^2-t^2}$; $\quad \Delta_C(r,t) =-\frac{i}{2\pi}{\rm sgn}(t)\delta(r^2!-!t^2)$; $\quad \Delta_R(r,t) =\frac{1}{4\pi r}\delta(r-t)$; $\quad \Delta_A(r,t) =\frac{1}{4\pi r}\delta(r+t)$; $\quad \bar{\Delta}(r,t)=\frac{1}{4\pi}\delta(r^2!-!t^2)$; – Qmechanic Aug 25 '22 at 10:44
4

Problem: solve the EOM

$$\ddot x + \beta \dot x + \omega^2 x = f(t)$$

As an approach we shall use, additionally to $x(t), \dot x(t)$, two new parameters $y(t), \dot y(t)$.

Let us, magically, introduce a Lagrangian for this auxiliary system

$$L(x, y, \dot x, \dot y, t) = \dot x \dot y - \beta \dot x y - \omega^2 x y - (x + y) f(t)$$

The important thing to notice is that the equations of motion for this system are

$$ \frac{d}{dt}\left( \frac{\partial L}{\partial \dot x} \right) - \frac{\partial L}{\partial x} = \ddot y - \beta \dot y + w^2 y - f(t) = 0\\ \frac{d}{dt}\left( \frac{\partial L}{\partial \dot y} \right) - \frac{\partial L}{\partial y} = \ddot x + \beta \dot x + w^2 x - f(t) = 0 $$

As one can see, we recover the equations of motion for our original system along with an auxiliary EOM.

From here on out, everything goes according to theory for Hamiltonian mechanics. We can find the generalized momenta:

$$ p_x = \frac{\partial L}{\partial \dot x} = \dot y - \beta y\\ p_y = \frac{\partial L}{\partial \dot y} = \dot x$$

And rewriting the Langrangian as a Hamiltonian

$$H(x, y, p_x, p_y, t) = p_x p_y + \omega^2 x y + \beta y p_y + (x + y) f(t)$$


The method is a bit more general, see Conservative perturbation theory for nonconservative systems which introduced me to the idea of auxiliary parameters by the example of the Van der Pol oscillator.

As far as I can see, this method should play nicely even when $x \in \mathbb R^n$ in which case you would also choose $y \in \mathbb R^n$.