Skip to main content
deleted 138 characters in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$$$\int f(x)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(x)|n\cdot\nabla u|^{-1}\,ds=\int_S f(x)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+h(u)+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=\int_V\epsilon\biggl(-2\nabla\cdot(f(x)\nabla u)+h'(u)\biggr)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+h(u)+g(x)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$2\nabla\cdot(f(x)\nabla u)=h'(u)\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=h(u)+g(x)\;\;\text{on}\;\;S.$$ I note that this generalization differs from Eq. (2.8) of this source.$$f(x)|\nabla u|^2=h(u=0)+g(x)\;\;\text{on}\;\;S.$$

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+h(u)+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=\int_V\epsilon\biggl(-2\nabla\cdot(f(x)\nabla u)+h'(u)\biggr)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+h(u)+g(x)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$2\nabla\cdot(f(x)\nabla u)=h'(u)\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=h(u)+g(x)\;\;\text{on}\;\;S.$$ I note that this generalization differs from Eq. (2.8) of this source.

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(x)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(x)|n\cdot\nabla u|^{-1}\,ds=\int_S f(x)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+h(u)+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=\int_V\epsilon\biggl(-2\nabla\cdot(f(x)\nabla u)+h'(u)\biggr)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+h(u)+g(x)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$2\nabla\cdot(f(x)\nabla u)=h'(u)\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=h(u=0)+g(x)\;\;\text{on}\;\;S.$$

generalization
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+g(x)\right)\chi_{u>0}\,dx$$$$L[u]=\int_V\left( f(x)|\nabla u|^2+h(u)+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=-2\int_V\epsilon\nabla\cdot(f(x)\nabla u)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+g(u)}{|\nabla u|}\right)\,ds$$$$\delta L[u]=\int_V\epsilon\biggl(-2\nabla\cdot(f(x)\nabla u)+h'(u)\biggr)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+h(u)+g(x)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$\nabla\cdot(f(x)\nabla u)=0\;\;\text{in}\;\;V,$$$$2\nabla\cdot(f(x)\nabla u)=h'(u)\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=g(x)\;\;\text{on}\;\;S.$$$$f(x)|\nabla u|^2=h(u)+g(x)\;\;\text{on}\;\;S.$$ I note that this generalization differs from Eq. (2.8) of this source.

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=-2\int_V\epsilon\nabla\cdot(f(x)\nabla u)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+g(u)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$\nabla\cdot(f(x)\nabla u)=0\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=g(x)\;\;\text{on}\;\;S.$$

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+h(u)+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=\int_V\epsilon\biggl(-2\nabla\cdot(f(x)\nabla u)+h'(u)\biggr)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+h(u)+g(x)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$2\nabla\cdot(f(x)\nabla u)=h'(u)\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=h(u)+g(x)\;\;\text{on}\;\;S.$$ I note that this generalization differs from Eq. (2.8) of this source.

added 18 characters in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int \frac{d}{du}\chi_{u>0}dx=\int_S |n\cdot\nabla u|^{-1}ds=\int_S |\nabla u|^{-1}ds,$$$$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=-2\int_V\epsilon\nabla\cdot(f(x)\nabla u)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+g(u)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$\nabla\cdot(f(x)\nabla u)=0\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=g(x)\;\;\text{on}\;\;S.$$

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int \frac{d}{du}\chi_{u>0}dx=\int_S |n\cdot\nabla u|^{-1}ds=\int_S |\nabla u|^{-1}ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=-2\int_V\epsilon\nabla\cdot(f(x)\nabla u)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+g(u)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$\nabla\cdot(f(x)\nabla u)=0\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=g(x)\;\;\text{on}\;\;S.$$

Edit: An earlier version of this answer missed a factor of two, now corrected, thanks to Daniele Tampieri.

We seek the variation of the functional $$L[u]=\int_\Omega\left(|\nabla u|^2+1\right)\chi_{u>0}\,dx.$$ The indicator function restricts the integration to the volume $V\subset\Omega$ where $u\geq 0$.
It is essential that the indicator multiplies all terms, that was my initial mistake.

Introduce an infinitesimal variation $u(x)\mapsto u(x)+\epsilon(x)$, and compute the variation in $L$ to first order in $\epsilon$. Let $S$ be the surface boundary of $V$ on which $u=0$. The variation is $$L[u+\epsilon]=\int_\Omega\left(|\nabla (u+\epsilon)|^2+1\right)\chi_{u+\epsilon>0}\,dx$$ $$=L[u]+\int_V 2(\nabla u)\cdot(\nabla\epsilon) \,dx + \int_{S} \left(|\nabla u|^2+1\right)\frac{\epsilon}{|\nabla u|}\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(2n\cdot\nabla u+\frac{|\nabla u|^2+1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2)$$ $$=L[u]-2\int_V \epsilon\nabla^2 u \,dx +\int_{S} \epsilon\left(-|\nabla u|+\frac{1}{|\nabla u|}\right)\,ds+{\cal O}(\epsilon^2).$$ On the second line I used the identity $$\int f(u)\frac{d}{du}\chi_{u>0}\,dx=\int_S f(u)|n\cdot\nabla u|^{-1}\,ds=\int_S f(u)|\nabla u|^{-1}\,ds,$$ with $n$ a unit vector normal to the surface $S$ and pointing outward. (Note that $\nabla u$ has only a normal component on $S$.) On the third line I carried out a partial integration of the volume integral, on the fourth line I used that $n\cdot\nabla u=-|\nabla u|$ on $S$.

The variation of $L$ vanishes for arbitrary $\epsilon$ if the integrand of the volume integral $\int_V$ and the integrand of the surface integral $\int_{S}$ each vanish identically, so $$\nabla^2 u=0\;\;\text{in}\;\;V,$$ $$|\nabla u|^2=1\;\;\text{on}\;\;S.$$


More generally, following the same steps to minimize $$L[u]=\int_V\left( f(x)|\nabla u|^2+g(x)\right)\chi_{u>0}\,dx$$ gives the variation $$\delta L[u]=-2\int_V\epsilon\nabla\cdot(f(x)\nabla u)\,dx+\int_S\epsilon\left(2f(x)(n\cdot\nabla u)+\frac{f(x)|\nabla u|^2+g(u)}{|\nabla u|}\right)\,ds$$ hence the Euler-Lagrange equations $$\nabla\cdot(f(x)\nabla u)=0\;\;\text{in}\;\;V,$$ $$f(x)|\nabla u|^2=g(x)\;\;\text{on}\;\;S.$$

corrected factor of due from missing indicator term
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
rewrote the final expression in order to make contact with the other answer
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
more general case.
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
deleted 1 character in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
added 316 characters in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
added 1 character in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
added 1 character in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
added 17 characters in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
added 4 characters in body
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading
Source Link
Carlo Beenakker
  • 188.1k
  • 18
  • 448
  • 651
Loading