M11 said:
which agent will reduce the temperature in the first case, and why it is not present in the second case ??
First case:
Due to the pressure, the gas exerts a force on the walls of the box. If the volume is increased slowly then the gas performs work of an amount equal to the pressure times the volume increase. This is energy lost to the gas. You can convince yourself in different intuitive ways that this is really the case. E.g. you can consider the gas pressure being used to lift a weight. The gas can push a piston which pushes a weight upward. The increase in potential energy of the weight is then recisely the pressure times the volume increase of the gas.
Then, to the gas it doesn't matter what happens to the performed work (it doesn't know if weight is lifted using it or that it is dissipated outside the box).
Now, suppose that the gas pushes a piston which moves frictionlessly in the horizontal direction. Then you would expect that the piston will accelerate the piston. So, the gas performs work which goes into the kinetic energy of the piston.
If we instead move the piston very fast to a new position but we don't fix it to the new position, then we create a vacuum between the gas and the piston. The gas then expands very fast to fill the vacuum. It then bumps into the piston, accelerating it. In this case, you still have a similar outcome as in the first case.
But now suppose that we first move the piston very fast to the new position and then fix it there. Then, when the gas arrives at the new position of the piston, it bumpes into it but it cannot transfer any energy to it as it is fixed. So, the kinetic energy of the gas stays in the gas where it will be dissipated. The gas doesn't perform any work.
Because no energy is lost, the temperature stays (approximately) the same.