Given the $p$-Laplace equation, with $p>2$, which writes
\begin{align} -\text{div}(|\nabla{u}|^{p-2}\nabla u) = f \end{align}
I want to associate the functional $J(u)$ to be minimized in order to solve it.
On the notes I've written that the natural functional to associate is the $p$-Dirichlet energy which is:
\begin{align} J(u) = \int_{\Omega} \left( \frac{|\nabla u|^p}{p} - fu \right) dx \end{align}
The problem is that I can't see how such a functional is related with the equation. I've seen that
$$\nabla \left( \frac{|\nabla u|^p}{p} \right) = |\nabla{u}|^{p-2}\nabla u$$
but I don't understand how to pass from the equation to the functional. I intuitively understand that we want that solving $\nabla J(u) = 0$ is like solving the equation, but I cant' work out the steps to prove this relation. Maybe I should use Green's Formula or other vector identities, but how?