# Lagrange multipliers for multiple constraints of multiple coordinates

1. Sep 23, 2014

### eko_n2

1. The problem statement, all variables and given/known data

Sorry for the long derivation below. I want to check if what I derived is correct, I can't find it anywhere else, feel free to skip to the end. Thanks!

I am confused by how to write the EL equations if I have multiple constraints of multiple coordinates. For example, let's say I have a Lagrangian
$$L(x,\dot{x},y,\dot{y})$$
and two constraints
$$f(x,\dot{x},y,\dot{y}) = const.$$
$$g(x,\dot{x},y,\dot{y}) = const.$$

Now how do I write the EL equations?

2. Relevant equations

See above.

3. The attempt at a solution

My approach is to follow the same procedure as for deriving the EL eqns for a simpler constraint.

Consider a single constraint of multiple coordinates $f(x,\dot{x},y,\dot{y}) = const$
Therefore:
$$\delta f = \frac{\partial f}{\partial x} \delta x + \frac{\partial f}{\partial \dot{x}} \delta \dot{x} + \frac{\partial f}{\partial y} \delta y + \frac{\partial f}{\partial \dot{y}} \delta \dot{y} = 0$$

Since this is zero, can add it to the variation in the action with an arbitrary constant $\lambda (t)$:
$$\delta S = \int \left ( \frac{\partial L}{\partial x} \delta x + \frac{\partial L }{\partial \dot{x}}\delta \dot{x} + \lambda (t) \left ( \frac{\partial f}{\partial x}\delta x + \frac{\partial f}{\partial \dot{x}} \delta \dot{x} \right ) \right ) dt + (\text{same integral in y}) = 0$$

I integrate by parts for both x-dot terms (just as usual for the Lagrangian term) to get:
$$\delta S = \int \left ( \frac{\partial L}{\partial x} - \frac{d}{dt} \frac{\partial L }{\partial \dot{x}} + \lambda (t) \left ( \frac{\partial f}{\partial x} - \frac{d}{dt} \frac{\partial f}{\partial \dot{x}} \right ) \right ) \delta x dt =0$$
(and again the same term for y)

This would lead me to conclude that I could write for a single constraint:

$$\frac{\partial L}{\partial x} - \frac{d}{dt} \frac{\partial L }{\partial \dot{x}} + \lambda (t) \left ( \frac{\partial f}{\partial x} - \frac{d}{dt} \frac{\partial f}{\partial \dot{x}} \right ) = 0$$
(and similar for y, also with $\lambda$)

Or, more generally, for two multivariate constraints $f(x,\dot{x},y,\dot{y}) = const$ and $g(x,\dot{x},y,\dot{y}) = const$:

$$\frac{\partial L}{\partial x} - \frac{d}{dt} \frac{\partial L }{\partial \dot{x}} + \lambda (t) \left ( \frac{\partial f}{\partial x} - \frac{d}{dt} \frac{\partial f}{\partial \dot{x}} \right ) + \mu (t) \left ( \frac{\partial g}{\partial x} - \frac{d}{dt} \frac{\partial g}{\partial \dot{x}} \right ) = 0$$
(and similar for y, also with $\lambda, \mu$)

Is that correct?