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?