# Work done by gas expanding into a cylinder+piston system

LCSphysicist
Homework Statement:
A thin-walled metal container of volume V contains a gas at high pressure.
Connected to the container is a capillary tube and stopcock. When the stopcock is
opened slightly, the gas leaks slowly into a cylinder equipped with a nonleaking,
frictionless piston, where the pressure remains constant at the atmospheric value $P_0$.
(a) Show that, after as much gas as possible has leaked out, an amount of work $P_0(V_0-V)$
has been done, where $V_0$ is the volume of the gas at atmospheric pressure and
temperature.
(b) How much work would be done if the gas leaked directly into the atmosphere?
Relevant Equations:
.
I will summarize briefly my reasoning for both letters, since the answer is immediately after that:

A) The work is quasi-static, and the pressure is approximatelly constant and equal to the atmospheric pressure, so the works is $$W = -p\int dV = -p_{0} (V_{0}-V)$$
B) The work is fast, fast enough that no heat flows thought the gas, so that the work is $$W = -\int p dV = -\int_{V_i}^{V_f} p_i (V_i)^{\gamma} dV /V^{\gamma}$$ $$P_i V_i^{\gamma} / P_o = V_f ^{\gamma}$$

What do you think? I am almost sure it is wrong, so i am posting here to get any help on letter b

Mentor
If your system is the gas, why do you feel that the answer to B is different from A?

LCSphysicist
If your system is the gas, why do you feel that the answer to B is different from A?
As i said, because the first one "leaks slowly", and nothing has been said about the second one, so i suppose it is more "explosive".

I have questioned myself also if the work is the same, but i was not able to argue why it should be. Even so the final points on (PV space) is the same, the path could be different, resulting in different work.

Mentor
The question implies that the gas is still leaking slowly in case B, but into the atmosphere instead of into a cylinder and piston.