Proof of the conservation of the energy functional for the Gross-Pitaevskii equation? From the Gross-Pitaevskii equation
\begin{equation}i\hbar\frac{\partial\psi}{\partial t}=\left(-\frac{\hbar^2}{2m}\nabla^2+V+g|\psi|^2\right)\psi\end{equation}
using the variational relation
\begin{equation}i\hbar\frac{\partial\psi}{\partial t}=\frac{\partial\varepsilon}{\partial \psi^*}\end{equation}
we find the energy density
\begin{equation}\varepsilon=\frac{\hbar^2}{2m}|\nabla\psi|^2+V|\psi|^2+\frac{g}{2}|\psi|^4\end{equation}
The energy would be $E=\int d^3r \varepsilon$
and this is a prime integral of the motion, meaning it is a conserved quantity.
My questions are:
1) How do we get the variational relation?
2)How can we prove that $E$ is a conserved quantity?
 A: The answer to the second question is actually quite straightforward: 
by computing $\partial_t E$ and using what given in the Gross-Pitaevskii for $\dot{\psi}$ and $\dot{\psi^*}$ one can check that all the terms cancel out so that $\partial_tE=0$.
To derive the expression for the energy one could also start considering a lagrangian giving the Gross-Pitaevskii when thrown inside the Euler-Lagrange machinery and derive the Hamiltonian in the usual way, so that one can go around the variational relation.
However it would be still interesting to know where that variational relation is coming from.
Does anyone have an idea? Also I am sure there must be a more elegant way to show that the energy is conserved, something less dumb than forced term by term computation.
A: here is a way to generally prove the energy functional is a conserved quantity for a dynamical system.
To make the notation more comfortable, I would like to use discrete modes to illustrate.
Suppose we have a system whose state is characterized by a set of complex numbers c1,c2,...
, its dynamics governed by
$i\partial_t c_i=h_i(c_1,c_1^*,...)$, i=1,2,3... 
If we can find a function $E(c_1,c_1^*,...)$ satisfying 
$\frac{\partial E}{\partial c_i^*}=h_i(c_1,c_1^*,...)=i\partial_t c_i$ for all i, and E being real 
Then clearly E is a conserved quantity through evolution of the system, because 
$\frac{\partial E}{\partial t}=\sum_i \frac{\partial E}{\partial c_i^*}\frac{\partial c_i^*}{\partial t}+\frac{\partial E}{\partial c_i}\frac{\partial c_i}{\partial t}$ 
$=\sum_i i\frac{\partial c_i}{\partial t} \frac{\partial c_i^*}{\partial t}-i\frac{\partial c_i^*}{\partial t}\frac{\partial c_i}{\partial t}=0$ 
In terms of GPE, coefficient of discrete modes $c_i(t)$ becomes wave function at a spatial point $\psi(\vec{r},t)$.
