I ask for advice, cause I'm a little confused.
We have such a Lagrangian:
$L=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)-\lambda(x+xy+y-1)$
Here $\lambda(x+xy+y-1)$ is the constraint on the phase variables.
I need to derive the equation of motion given the constraints and solve them numerically with the help of NDSolve.
We do this in accordance with the classic formula:
$\frac{d}{dt}(\frac{dL}{d\dot{q}})-\frac{dL}{dq}=0$
Where $q=[x,y]$ are generalized coordinates. I'm not sure about the Lagrange multiplier as a generalized coordinate.
Clear["Derivative"]
ClearAll["Global`*"]
T = 1/2 m (x'[t]^2 + y'[t]^2);(Kinetic Energy)
f = [Lambda] (x[t] + x[t] y[t] +y[t] - 1);(Constraint)
L = T - f;(Lagrangian)
D[D[L, x'[t]], t] - D[L, x[t]];
D[D[L, y'[t]], t] - D[L, y[t]];
D[D[L, [Lambda]'[t]], t] - D[L, [Lambda][t]];
Question: how are the Lagrange multipliers included in this system when compiling the ODE system and numerically solving it?
Maybe this help?
https://farside.ph.utexas.edu/teaching/336k/lectures/node90.html
https://www.sciencedirect.com/science/article/abs/pii/0045782588900850