Currently I am trying to improve my knowledge of thermodynamics and I have stumbled upon the following description of a thermodynamic system in which I don't fully understand the calculation:
A container with an ideal gas is given in which a piston with a certain weight resides and the movement of the piston is frictionless. The container is linked to a work reservoir and is surrounded by a thermostat with diathermic walls so that any influence of heat does not change the temperature. -> the system is isothermic
The first law states: $dU=\delta{Q}+\delta{W}=\delta{Q}-pdV=\left(\frac{\partial{U}}{\partial{T}}\right)dT +\left(\frac{\partial{U}}{\partial{V}}\right)dV$
Because the gas is an ideal gas:
$dU=\delta{Q}+\delta{W}=\delta{Q}-pdV=\left(\frac{\partial{U}}{\partial{T}}\right)dT $
For an isothermic process $dT=0$ and thus: $\delta{Q}=-\delta{W}$
Let the gas in the container have a pressure of $p_{1}$ and the piston exert a pressure of $p_{p}$ where $p_{1}\gg p_{p}$. Here follows my first question: Is it right to say that the system seeks equilibrium and thus the force exerted by the gas will change until it is the same as the force exerted on the piston leading to the same pressure? And how can one explain this behaviour?
The next question I have regards the work done by the system: The textbook from which I have this example states the the work done is given by: $W=\int_{V_1}^{V_2}{p_pdV}= p_p\cdot \left(V_2-V_1\right)$ I can't fully comprehend why the pressure used in this equation is the constant pressure exerted from the piston. Due to $dU=0$ we see that the state equation equals 0 and thus I would say that the way we obtain a change in the system does matter. I am somewhat fixated on the idea that the work done is the scalar product of the force exerted and the path on which the force takes effect. Hence I can't let go of the idea that if we split the container into say 100 parts in the first department there exists a force $F_1$ and thus a pressure $p_1$ which leads to a an energy $j_1$ and in the next department the same holds the truth for $F_2, p_2, j_2$ and as such I would add them. I know that it is wrong but I can't understand the other idea fully either.