# Calculus of Variations & Lagrange Multiplier in n-dimensions

1. Mar 29, 2015

### MisterX

extremize
$$S = \int \mathcal{L}(\mathbf{y}, \mathbf{y}', t) dt$$
subject to constraint
$$g(\mathbf{y}, t) = 0$$
We move away from the solution by
$$y_i(t) = y_{i,0}(t) + \alpha n_i(t)$$
$$\delta S = \int \sum_i \left(\frac{\partial\mathcal{L} }{\partial y_i} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_i'} \right)n_i(t) dt$$

In two dimensions we then have $$\left(\frac{\partial\mathcal{L} }{\partial y_1} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_1'} \right)n_1(t) = \left(\frac{\partial\mathcal{L} }{\partial y_2} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_2'} \right)n_2(t)$$

and since $$\delta g = 0 \Rightarrow \sum \frac{\partial g}{\partial y_i} n_i = 0$$
we have in the 2D case $$n_2 = \left(\frac{\partial g}{\partial y_2}\right)^{-1}\left(\frac{\partial g}{\partial y_1}\right)n_1$$
and from this we obtain
$$\left(\frac{\partial g}{\partial y_1}\right)^{-1} \left(\frac{\partial\mathcal{L} }{\partial y_1} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_1'} \right) = \left(\frac{\partial g}{\partial y_2}\right)^{-1} \left(\frac{\partial\mathcal{L} }{\partial y_2} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_2'} \right) =-\lambda(t)$$
which leads us to the equations $$\frac{\partial\mathcal{L} }{\partial y_i} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_i'} + \left(\frac{\partial g}{\partial y_i}\right) \lambda(t) = 0$$

However I am not sure how to do the case for more than 2 dimensions. It seems we have
$$n_j = \left(\frac{\partial g}{\partial y_j}\right)^{-1} \sum_{i\neq j}\frac{\partial g}{\partial y_i}n_i$$

So it seems maybe we can't do the same manipulations as for the 2D case.

2. Mar 30, 2015

### MisterX

Some corrections (I think)
$$\left(\frac{\partial\mathcal{L} }{\partial y_1} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_1'} \right)n_1(t) = -\left(\frac{\partial\mathcal{L} }{\partial y_2} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial y_2'} \right)n_2(t)$$

$$n_j = - \left(\frac{\partial g}{\partial y_j}\right)^{-1} \sum_{i\neq j}\frac{\partial g}{\partial y_i}n_i$$