I need to minimize following energy involving power functional,
$F=\left(\int f(u,\nabla u)d\Omega\right)^2+\int g(u,\nabla u)d\Omega$.
My question is that can the form of Gradient and Hessian be calculated automatically by taking the Gateaux derivative through the function derivative ?