So this has been bothering me for a while. I know that for a free expansion of a gas, work done by it is zero. However, I have a doubt regarding the kinetic energy gained by a piston during this free expansion of a gas.
So, let there be a cylindrical container of infinite length.
In the above picture, we can see that there is a fixed piston and a gas with pressure 'P', volume 'V' and temperature 'T'. The remaining volume of the cylinder is vacuum.
Now, the piston is released. As a result, free expansion of gas occurs and the piston moves towards the right.
Now, if the piston is massless, I can understand that no work is done by the gas as the kinetic energy of the piston is zero, due to mass being zero.
However, if the piston has a mass 'M', it will have a kinetic energy. However, if we again assume that work done by the gas is again zero, then where is the piston's kinetic energy coming from?
Also, in both cases, we are assuming that there is no gravity and that the movement of the piston in the cylinder is frictionless.