Why is the integral of $\|\nabla f\|^2$ called the energy of $f$? Let $\Omega$ be a region in $\mathbb{R}^2$ with $f:\Omega \to \mathbb{R}$ a smooth function. Why is the quantity, 
$$ \tfrac{1}{2} \iint_{\Omega} \|\nabla f\|^2 $$
Called the "energy" of $f$? I am sure it comes from physics but I do not know why. 
 A: The term energy comes from electrostatics. The energy density of  electric field $\mathbf E$ is $\frac12 \varepsilon_0\mathbf  E^2$; to get the total energy of the field we integrate that. 
The derivation of $\frac12 \varepsilon_0\mathbf  E^2$ is given in the Wikipedia article Electric potential energy.  But I'll outline the steps here: the potential energy of a charge in an electric field (normalized to be zero at infinity) is proportional to the product of charge amount and the potential $\Phi$. For distributed charges, the charge density is the divergence of $\mathbf E$.  So the potential energy is 
$$\frac12 \varepsilon_0 \int \Phi \nabla \mathbf E$$
which after integration by parts (using $\nabla \Phi = -\mathbf E$) becomes 
$$\frac12 \varepsilon_0 \int  \mathbf E\cdot \mathbf E = \frac12 \varepsilon_0 \int |\nabla \Phi|^2 $$
A: Let us imagine that the graph of $f$ in $\mathbb{R}^3$ represents some sheet of uniform elastic rubber. If we study the idealized case, we find that the force in the horizontal direction is $\Delta f$. (This is reasonable, as when we study Laplace's equation we find that harmonic functions, those which satisfy $\Delta f =0$ satisfy a property where $f(x)$ is equal to the average of value of $f$ on any circle about $f(x)$, so the rubber will be at an equilibrium). Thus the integral given captures the potential energy in the rubber pulling on itself (you get a factor it squared so that kinetic and potential energy interact correctly).
