Let $I$ be a bounded, open interval in $\mathbb{R}$.
The other day I have faced very interesting problem how a shape of a minimal solution of the following Dirichlet type energy has or how behavior a minimal solution has when time goes on:
\begin{eqnarray*}\mathcal{E}(u)= \begin{cases} \int_{I}\frac{a}{2}|u_{x}|^{2}dx+\int_{\mathbb{R}\setminus\overline{I}}\frac{b}{2}|u_{x}|^{2}dx&\quad\text{for $u\in H^{1}(\mathbb{R})$,}\\ +\infty&\quad\text{otherwise,} \end{cases} \end{eqnarray*}
where $a>0$ and $b>0$ are constants such that $a\neq b$. The image of this energy is a heat diffusion phenomena in $\mathbb{R}$ such that heat conductions are different in the interior region $I$ and exterior region $\mathbb{R}\setminus\overline{I}$.
To solve this problem, I have tried to find Euler-Lagrange equation or Gradient flow equation but I didn't understand it well. In particular, I don't find what a boundary? transmission? condition.
My question: How is Euler-Lagrange equation or Gradient flow equation for the above functional?
Thanks in advance.