Consider the following problem found in this webpage.
Consider a spherical bubble of radius $R$, of a certain fluid of density $\rho$, trapped inside of some other fluid. The bubble is stabilized by the presence of surface tension. Namely, suppose that the bubble has a nearly, but not perfectly, spherical surface, which we describe by a function $\zeta (\theta, \phi)$, denoting the difference $\zeta = r - R$ between the actual radius $r$ and the original radius $R$. One can then write the energy cost of this deformation as:
$$ E = \alpha \int d\theta d \phi \sin\theta(R+\zeta)^2\sqrt{1+ \left( \frac{1}{R+\zeta} \frac{\partial \zeta}{\partial \theta} \right)^2 + \left( \frac{1}{(R+\zeta)\sin \theta} \frac{\partial \zeta}{\partial \phi}\right)^2} .$$
The problem is then to argue that the pressure (difference from equilibrium pressure) at the surface of the bubble is:
$$ P = \frac{2 \alpha \zeta}{R^2} + \frac{\alpha}{R^2} \nabla^2 \zeta $$
where $\nabla^2$ is spherical Laplacian.
I am not sure even in general case if one is given energy cost $E$ then how one would obtain pressure $P$. Is there a general definition or procedure that one would do?