# Thermodynamics First Law: Where is my reasoning wrong?

We take your example where the gas inside is at a pressure of $2P_0$ and the surroundings are at $P_0$. As I stated in my comment, the piston must be massive in order for this scenario to make sense!

The unbalanced force on the piston causes it to accelerate; if the piston moves an incremental distance $\delta x$, then the work done on the piston is

$W = 2P_0 \delta x - P_0 \delta x = P_0 \delta x = \Delta T_{piston}$

This is the kinetic energy gained by the piston! From Newton's third law, you can also see that the work done on the internal gas by the piston is $-2P_0 \delta x$ and that done on the surroundings by the piston is $P_0 \delta x$. Since we're ignoring transfers of heat, these works are the changes in internal energy of the system and surroundings respectively. Accordingly, the total change in energy of the universe is $P_0 \delta x - 2P_0 \delta x + P_0 \delta x = 0$. Energy is conserved!

However, that's not to say that the equation you state isn't valid for a massive piston under certain circumstances. Consider letting the piston go and waiting until it comes to rest again. Let's say the work done by the internal gas on the piston is $W_1$ and the work done by the external gas on the piston is $W_2$. We then have, using the work energy theorem,

$W_1 + W_2 = 0 \implies W_1 = -W_2$

Now, again through the use of Newton's third law, the work done by the piston on the internal gas is $-W_1$, and the work done by the piston on the surroundings is $-W_2$, which is also equal to $W_1$.

We see that the relation $W_{sys} = -W_{surr}$ is recovered! The key is to apply it between equilibrium states of the piston, if the piston is massive.