Euler -Lagrange equation: variational Problem min $K[u]$ for $K[u]=\int_D(|\nabla u|^2+\frac{1}{2}gu^4)dxdy$ Consider the variational Problem min $K[u]$ for $$K[u]=\int_D\left(|\nabla u|^2+\frac{1}{2}gu^4\right)\,{\rm d}x\,{\rm d}y$$ where $D \subset \mathbb{R}^2$ and $g(x,y)$ is a given positive function. Find the Euler-Lagrange equation and the natural boundary conditions for this problem. 
I am really stuck on this problem. I have been looking at an example on pg. 284 here, where they look at $$\int_D |\nabla u|^2\,{\rm d}x\,{\rm d}y$$ but I am stumped as to what the process is and how to apply it to this problem.

The Lagrangian of this system is 
$$
L(u) = |\nabla u|^2 + \frac{1}{2}gu^4 = (\partial_x u)^2 + (\partial_y u)^2  + \frac{1}{2}gu^4
$$
In this case the Eulear-Lagrange equations can be written as 
$$
\sum_a\partial_a \left(\frac{\partial L}{\partial (\partial_a u)} \right) - \frac{\partial L}{\partial u} = 0
$$
So you need to calculate
\begin{eqnarray}
\partial_x \left(\frac{\partial L}{\partial (\partial_x u)} \right) &=& \partial_x \left(2 \partial_x u\right) = 2\partial^2_x u \\
\partial_y \left(\frac{\partial L}{\partial (\partial_y u)} \right) &=& \partial_y \left(2 \partial_y u\right) = 2\partial^2_y u \\
\frac{\partial L}{\partial u}  &=& 2gu^3 \\
\end{eqnarray}
Putting everything together
$$
\nabla^2 u - 2gu^3 = 0
$$
