As extension of this question, I was wondering what would be the Euler-Lagrange equations associated with the functional
$$ E(u) = \frac{1}{2}\int_{\gamma} \lVert \nabla u \rVert^2 ds $$
The difference is that the integral is not defined in a region but on a curve, and the gradient $\nabla u$ in this case is defined by
$$ \nabla u = \begin{pmatrix} u_x(x,y) \\ u_y(x,y) \end{pmatrix} = \begin{pmatrix} u_x(x(t),y(t)) \\ u_y(x(t),y(t)) \end{pmatrix} $$
However the curve $\gamma$ is fixed, it's not the unknown, what I want to find is a function $u$ (or pixel values) defined on that curve.
So the argument of the integral is not $\mathcal{L}(x,y,u,u_x,u_y)$ but $\mathcal{L}(t,x,y,u,u_x,u_y)$ where $t$ is a the curve parameter and $x = x(t),y = y(t)$ are known functions of $u$, but I'm totally confused how to derive the EL equations in this case.
The clue I had was to substitute the gradient with the directional derivative, but I want to consider the whole region sorrounding the curve $\gamma$ which I would be missing.
Here $ds = \sqrt{x'^2 + y'^2} dt$.
Can anyone help me out working out the math?
Just an observation, it might be possible that maybe what I want is actually minimizing the functional
$$ E(u) = \frac{1}{2} \int_{\gamma} | \left\langle \nabla u, d \gamma \right\rangle | $$
Because my functional depends on the gradient defined on the curve, so I guess directional derivative is more natural.
Thank you
Maybe I have made a small progress, first of all I observe that if $\gamma = \gamma(t), t \in [a,b]$ I have
$$ E(u) = \frac{1}{2} \int_a^b | \left\langle \nabla u, d\gamma \right\rangle | = \frac{1}{2} \int_a^b | du | = \frac{1}{2} \int_{a}^{b} | u' | dt = \int_{a}^b \mathcal{L}(u') dt $$
Now I can apply the EL equations for single variable, single function
$$ \frac{d \mathcal{L}}{du} - \frac{d}{dt} \frac{d \mathcal{L}}{du'} = 0 $$
Using distributional derivatives and the fact that $\mathcal{L} = \mathcal{L}(u')$ I get
$$ 0 = \frac{d \mathcal{L}}{du} - \frac{d}{dt} \frac{d \mathcal{L}}{du'} = - \frac{d}{dt} \frac{d \mathcal{L}}{du'} = -\frac{1}{2}\frac{d}{dt} sgn(u') = - \delta(u') u'' \Rightarrow \delta(u') u'' = 0 $$
Therefore with appropriate boundary conditions I need to solve
$$ \delta(u') u'' = 0 $$
However now since I have the dirac delta in the equation I'm not sure how I can get rid of it.