# Euler-Lagrange equation with Lagrange multipliers

I want to set up the Euler-Lagrange-equations for the hanging rope-problem by using the Lagrange-formalism and Lagrange multipliers.

The rope is of length $$l^*$$ and is attached to the points $$(-l,h),(l,h)$$ with $$2l and $$0.

The Potential energy is given by $$U[y] = \rho g \int_{-l}^l y(x) \sqrt{1 + y'(x)^2} dx = \int_{-l}^l y(x) \sqrt{1 + y'(x)^2} dx$$ with $$\rho g =1$$. For the kinetic energy it holds that $$T = 0$$, yielding that the Lagrangian is simply $$L_0=T-U=-U$$.

So we want to find a smooth function that minimizes the functional $$U$$ under the constraint, that the graph of the function has length $$l^*$$. We can express this with

$$l^* = \int_{-l}^l \sqrt{1 + y'(x)^2} dx =:g[y]$$

as the length of the curve $$y$$ between $$-l,l$$. With this condition we will alter the objective-functional into $$U[y] - \lambda g[y] = \int_{-l}^l (y(x)-\lambda)\sqrt{1+y'(x)^2}dx$$ Where we see the term in the integral as the constrained Lagrangian $$L$$, which we can plug into the Euler Lagrange-equation. But with the next step I don't know what I should do and why. I am also unsure, if it matters, if I encode the information about the length in the constraint, such as $$g_l := g[y] - l^* = 0$$.

Thanks!