I wonder what is the alternative to Euler-Lagrange equations when we have non-differentiability issues. I'll give an example:
Dido's problem can be stated as:
Find the figure bounded by a line which has the maximum area for a given perimeter.
The solution I've seen goes as follows.
Let's consider the $X$ axis to be the line and $y(x)$ the curve that encloses the figure. We want to optimize the area:
$$\int y(x) dx$$ A possible solution would be to apply Lagrange multipliers, where the constraint is:
$$\mathrm{perimeter}=\int\sqrt{1+y'^2(x)}dx $$
So the Lagrangian is:
$$L(y,y')=y+\lambda\sqrt{1+y'^2}$$
And we just have to apply Euler-Lagrange equations.
I have some doubts on the type of curves we are considering. For example, if the fuction takes negative values, the area would be:
$$\int|y(x)|dx$$
Which in general, will give rise to a non differentiable Lagrangian.
So it seems we are discarding non-differentiable curves and those with negative values. Is there any way to show this type of curves won't give rise to maximum area? I guess that if the function is at least piecewise differentiable, we could divide the intregral into several intervals. I'm fine if the proof is a bit handy wavy.