Why do gases have higher internal energy than solids and liquids, when at the same pressure? I was given the following question:
Three containers filled with $1 kg$ of each: water, ice, and water vapor at the same temperature $T = 0C$.
Now apparently, the vapour has the highest internal energy, the water has the next highest and the ice has the lowest internal energy.
It seems as though it has something to do with the gas having more degrees of freedom and thus a higher entropy?
I'm confused because when I use the formula $U = \frac{3}{2}nRT$ , they should all have the same $U$. Because they are each $1kg$, the $n$ should be the same. They all have the same $R$ and the same $T$. So how can they even have different internal energies? 
 A: This is not to do with degrees of freedom. In fact solids often have 6 degrees of freedom because interaction with the surrounding atoms means that positional degrees of freedom also have a quadratic energy dependence and so count towards the total degrees of freedom. If, therefore, the equipartition theorem was the only factor then the solid would have more internal energy than the gas. I don't know how well the equipartition theorem works for liquids (my guess is fairly poorly).
The gas has the highest internal energy because in the liquid and solid phases a lot of energy is bound up in the bonds between atom or molecules. This energy provides a negative contribution to the internal energy, so these phases have a lower internal energy. 
This contribution to the internal energy is often ignored when not discussing phase transitions as in this case it is simply a constant offset in the total energy, and so does not impact the physics. When a gas condenses or a liquid freezes, however, the energy released by forming the bonds is released as latent heat. 
A: Gases have high IE because when we add additional energy to system to break the intermolecular force of a system then only it will lead to a phase transmission from solid to gas due to this gases have high IE
A: I figured out the answer to my own question.
Internal energy is higher when there is more degrees of freedom.
The formula U=3/2nRT only works for monotomic substances.
Every time that more degrees of freedom are added, the 3/2 constant increases.
So in fact, the potential energy formula should yield correct results had I been using the right one.
Essentially, my main error was assuming that the given substances had the potential energy formula U = 3/2nRT, when in reality this was not the case.
However, I'm still unsure why the formulas would be different for solids, liquids and gases. 
It would be nice if someone could clear that up.
