Surface tension gases. The pressure inside an ideal (one surface) soap bubble can be derived from thermodynamic free energy considerations. At constant temperature and particle number, , the differential Helmholtz energy is given by where is the difference in pressure inside and outside of the bubble, and is the surface tension. In equilibrium, , and so, For a spherical bubble, the volume and surface area are given simply by and Substituting these relations into the previous expression, we find which is equivalent to the Young–Laplace equation when . For real soap bubbles, the pressure is doubled due to the presence of two
Capillary surface and other energy potentials absent, the energy of the system is where the subscripts formula_40, formula_41, and formula_42 respectively indicate the liquid–gas, solid–gas, and solid–liquid interfaces. Note that inclusion of gravity would require consideration of the volume enclosed by the capillary surface and the solid walls. Typically the surface tension values between the solid–gas and solid–liquid interfaces are not known. This does not pose a problem; since only changes in energy are of primary interest. If the net solid area formula_43 is a constant, and the contact angle is known, it may be shown that (again, for two different fluids