Q:

Internal Energy questions

The first law of thermodynamics states that $\Delta U=q+w$ where $ΔU$ is the increase in internal energy of the system, $q$ is the thermal energy supplied to the system and $w$ is the work done on the system.
I have a few questions regarding this law due to my elementary understanding of internal energy.

If an ideal gas is being compressed without supplying heat, $q=0$ and $w$ is positive. Now $ΔU$ must also be positive. This means that the microscopic kinetic energy of the  particles $K_{E}$ is increased and hence temperature increases. But since the gas is being compressed i.e. the intermolecular distance is being decreased, does this play a role in  decreasing $ΔU$? 
If the gas above were being compressed at constant temperature then $q$ would have been negative so as to maintain a constant temperature. In this case does not the decreasing of intermolecular distances make $ΔU$ negative since $K_{E}$ remains constant this time?
Consider ice being melt into water at a constant temperature of 273K. Now the intermolecular distance of the molecules is being decreased here since water is denser than ice. So why isn't $ΔU$ negative here? How exactly do the microscopic potential energies of the water molecule come into play here?

A:

For an ideal gas, we neglect all intermolecular interactions (except for the trivial case of elastic collisions). $\Delta U$ therefore depends purely on the kinetic energies of the particles. The 'decreasing of intermolecular distances' has no role to play here. However, these things are taken care of to some extent by the van der Waals equation
Melting is a slightly different thing - intermolecular forces play a big role here. In a very non-detailed treatment, we say that melting requires the 'latent heat of melting'. This is in fact a form of internal energy that, to use the example of melting of ice to water, represents the stronger bonding effects (less energy) in ice as opposed to water. It is not so much about the particle density as about the intermolecular interactions themselves. In this case, $\Delta U$ would be positive as the latent heat is supplied to the ice (and this is why we need to heat ice to get water, as opposed to the other way around, as your suggestion implies).

