9
$\begingroup$

We know that there is a function VariationalMethods`EulerEquations readily handling the Euler-Lagrange equation of the "standard" form

$$ \frac{\partial L}{\partial q} - \frac{\mathrm d}{\mathrm d t}\left(\frac{\partial L}{\partial \dot q}\right) = 0. $$

But today, it suddenly occurs to me that problems [e.g., see Eqs. (5) & (6) in this note] with a damping term are not included, are they?

My question is, is there any hidden magic in VariationalMethods`EulerEquations that makes it still capable of dealing with equations like

$$ \frac{\partial L}{\partial q} - \frac{\mathrm d}{\mathrm d t}\left(\frac{\partial L}{\partial \dot q}\right) - \frac{\partial F}{\partial \dot q} = 0, \qquad F = \frac{b}{2}\dot q^2, $$

or one has to return to manual establishment of equations of motion using functions like D or VariationalMethods`VariationalD?

$\endgroup$
3
  • $\begingroup$ Generalized forces $Q_x$ are not part of Euler-Lagrangian, and have to be added separately, as in $\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}}) - \frac{\partial L}{\partial x} = Q_x$. So one has to know what $Q_x$ in this case is, from the physics of the problem, such as friction, etc... and add these to the RHS of the equations. I have not used this package myself btw. $\endgroup$
    – Nasser
    May 21, 2020 at 10:43
  • $\begingroup$ @Nasser Thx. Do you mean to manually replace the 0 on the RHS with the generalized force? $\endgroup$ May 21, 2020 at 10:46
  • 3
    $\begingroup$ Yes. That is what is done when doing these by hand. First find the Euler-Lagrange equations, then check the physics and see if there are forces not included (these are the so called generalized forces, non-conservative, or whatever you prefer to call them). Such as friction, damping, etc... and make sure to include the ones related to each coordinate in question $x_i$, to the RHS. Now you have the complete equations of motion. I solved many problems like these, but by hand, and did not use this package. These are fun problems to work out. $\endgroup$
    – Nasser
    May 21, 2020 at 10:51

1 Answer 1

7
$\begingroup$

Yes, it is possible. First of all I recommend you to read these two papers:

  1. J. Guerrero, F. F. López-Ruiz, V. Aldaya, and F. Cossio A round trip from Caldirola to Bateman systems, J. Phys.: Conf. Ser. 284, 012062 (2011)
  2. H. Dekker, Classical and quantum mechanics of the damped harmonic oscillator, Phys. Rep. 80, 1-110 (1981)

There are basically two ways to deal with dissipation (damping) in the Lagrangian formalism of classical mechanics:

  1. The Bateman method,
  2. The Caldirola-Kanai method.

They can also be used in order to quantize the classical equations of motion. As an example, consider a harmonic oscillator with frequency $ \Omega $ and damping $ \lambda $, where we set the mass to be equal to 1.

Needs["VariationalMethods`"]

BatemanL = x'[t] y'[t] - Ω^2 x[t] y[t] + λ (x[t] y'[t] - x'[t] y[t]);

EulerEquations[BatemanL, {x[t], y[t]}, t]
(*{-Ω^2 y[t] + 2 λ y′[t] - y′′[t] == 0, -Ω^2 x[t] - 2 λ x′[t] - x′′[t] == 0*)

CaldirolaKanaiL = Exp[λ t] (1/2 x'[t]^2 - 1/2 Ω^2 x[t]^2)

EulerEquations[CaldirolaKanaiL, x[t], t]
(*-E^(t λ) (Ω^2 x[t] + λ x′[t] + x′′[t]) == 0*)

The idea of the Bateman's method is to introduce an auxiliary coupled system $ y(t) $ that evolves in negative time-direction (notice a sign difference in the equation of motion for $ y(t) $ as compared to $ x(t) $), so that in total the energy is conserved.

The idea of Caldirola-Kanai is in introducing the time-dependence into the Lagrangian explicitly. It is worth noting that these two methods can be generalized to more complicated scenarios.

$\endgroup$
1
  • 1
    $\begingroup$ Looks great! Thx a lot for the answer. Let me spend some time digesting. $\endgroup$ May 25, 2020 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.