LoopInt said:
Since (m+M) d^2 x/dt^2 = (m+M)g−PA we need to multiply that by dx to get the work
\delta W = (m+M)g dx−PAdx
but we need to integrate over time so dividing by dt and multiplying by dt (chain rule)
\delta W = \int ((m+M)g dx/dt−PAdx/dt) dt
This is strange... I don't know how to proceed the integration
However, since dE=\delta W-\delta Q
for the case of the mass dropping fast, the system don't have time to exchange heat with the surroundings, so \delta Q = 0
dE=\delta W implies that dE=dW, thus an exact differential. Is that correct?
Good try, but no. What you are calling ΔW is really the change in kinetic energy of the masses. We want to determine the work done by the gas on the bottom face of the piston. This is the work W done by the "system" on the "surroundings" (since we regard the gas as the system, and everything else as the surroundings). That work W is given by:
W=\int{PdV}=-\int{PAdx}=-\int_{t=0}^{t=∞}{PA\left(\frac{dx}{dt}\right)dt}
We can find this work by first multiplying the force balance by dx/dt to obtain:
(m+M)\frac{d^2x}{dt^2}\left(\frac{dx}{dt}\right)=(m+M)g\left(\frac{dx}{dt}\right)-PA\left(\frac{dx}{dt}\right)=-\frac{(m+M)g}{A}\left(\frac{dV}{dt}\right)+P\left(\frac{dV}{dt}\right)
The left hand side of this equation is an exact differential, so we can rewrite the previous equation as:
\frac{d}{dt}\left(\frac{(m+M)}{2}\left(\frac{dx}{dt}\right)^2\right)=-\frac{(m+M)g}{A}\left(\frac{dV}{dt}\right)+P\left(\frac{dV}{dt}\right)
Rearranging this equation gives:
P\left(\frac{dV}{dt}\right)=\frac{d}{dt}\left(\frac{(m+M)}{2}v^2\right)+\frac{(m+M)g}{A}\left(\frac{dV}{dt}\right)
where v is the velocity of the combined masses dx/dt. The left hand side is rate at which the gas is doing work on the two masses, the first term on the right hand side is the rate of change of kinetic energy of the two masses, and the second term on the right hand side is the rate of change of potential energy of the two masses. If we integrate this equation from time t = 0 to arbitrary time t, we obtain:
\int_{V_1}^{V(t)}{PdV}=\left(\frac{(m+M)}{2}v^2\right)+\frac{(m+M)g}{A}(V(t)-V_1)
where we have made use of the initial conditions that v = 0 and V = V
1 at t = 0.
Let's discuss what's happening here. After we release the masses, they will speed up, reach a maximum downward velocity and then slow down until they reach a maximum downward displacement where they come to a stop. But when they get to this bottom location, there is now a net upward force on them, so they start moving back upward again. They speed up, reach a maximum upward velocity, and then slow down until they reach a maximum upward displacement. But, when they get to the upper location, there is now a net downward force on them, so they start moving down again. The net result of all this is that the masses will oscillate up and down, very much as if they were in simple harmonic motion.
However, even with the piston being frictionless, the amplitude of the oscillation will decrease over time as a result of viscous dissipation within the gas. The details of how this happens is unimportant for our purposes, except that, as time progresses, the velocity of the masses will progressively decrease, and at very long times, it will become equal to zero. Therefore, at final steady state of the system, we will have:
W=\int_{V_1}^{V_2}{PdV}=\frac{(m+M)g}{A}(V_2-V_1)
Amazingly, the work from the initial to the final equilibrium state reduces to this very simple equation.
I'm going to stop here an let you digest what I've presented, as well as let you ask any question you might have. When you're ready, we can continue. We will be looking at both adiabatic and isothermal compression resulting from releasing the mass M.