Suppose I wish to find the Euler-Lagrange equation for an integral $\int_V f(u,\mathop{\mathrm{grad}} u)\,dV$ where $V$ is a volume given by some equation, for example say $x^2+y^2+z^2\le 1$, and $u=u(x,y,z)$. How might I do that? What I particularly don't understand is do I need to substitute $z$ by some function of $x,y$ to impose the volume condition? Otherwise how does one incorporate that information?
Thanks.