We have a cylindrical vessel, with a movable piston with a gas on its left side and vacuum on the right side. The gas is at pressure $P$ and volume $V$. We need the work done by the gas on the piston, if the volume of the gas when moving the piston will double, and its pressure will be: a)remain constant b)increase with increasing volume linearly yo a pressure of $2P$ Assuming that we're working with ideal gases, and gas pushes the piston with a constant force, the work will be: Let's go with a) $W=\vec{F}\bullet\Delta l\vect{l}$ $W=F*Delta l*cos(0)$ And the cosine of 0 is 1 $W=F*Delta l$ and $F=P*S$ $W=P*S*Delta l$ The initial volume of the gas is: $V=S*l$ And the final volume: $2V=S*l'$ $2V-V=S*(l'-l)$ Then $V=S*Delta l$ Substituting this in the work we'll have: $W=P*V$ For b) We know that for a linear function $m=\frac{y_2 -y_1}{x_2 -x_1} In our case, we have a$P=f(V)$function, the final pressure is$2P$and the final volume$2V$, so$m=\frac{2P-P}{2V-V}$$m=\frac{P}{V}$And substituting this in$P=m*V + n$, we get$P=P+n$, no$n=0$If we graph this function, the work will be the area of the trapezoid under this two points, wich is (bass minor + base major) times height over 2$W=\frac{(2P+P)*(2V-V)}{2}$So$W=\frac{3PV}{2}$\