Consider one mole of a perfect gas in a cylinder of the unit cross-section with
a piston attached (figure). A spring (spring constant k) is attached (unstretched length L) to the piston and to the bottom of the cylinder. Initially, the spring is unstretched and the gas is in equilibrium. A certain amount of heat Q is supplied to the gas causing an increase of value from VoVo to V1V1.
(a) What is the initial pressure of the system?
(b) What is the final pressure of the system?
(c) Using the first law of thermodynamics, write down the relation between Q, PaPa, V1V1, VoVo and k.

Hint: The work is done by the gas against the atmospheric pressure and the spring force.
a) Step 1: Find the initial pressure.
 Initially, the piston is in equilibrium hence, Pi=PaPi=Pa 
                                            
(b) Step 2: Find the final pressure.
On supplying heat, the gas expands from V0 to V1V0 to V1.
 Increase in volume of the gas =V1-V0=V1V0
As the piston has the unit cross-sectional area, hence, the extension in the spring:
x=V1-V0Area=V1-V0x=V1V0Area=V1V0
 Force exerted by the spring on the piston=F=kx=k(V1-V0)=F=kx=k(V1V0)
Hence, the final pressure,
Pf =Pa+kxPf =Pa+kx
    =Pa+k×(V1-V0)    =Pa+k×(V1V0)
(c) Step 3: Find the heat supplied to the gas.
From first law of thermodynamics, dQ= dU+ dW
If T is the final temperature of the gas, then the increase in internal energy,
dU=CV(T-T0)=CV(T-T0)dU=CV(TT0)=CV(TT0)
We can write, T=PfV1R=[Pa+k(V1-V0)R]V1RT=PfV1R=[Pa+k(V1V0)R]V1R
Work done by the gas = PaPaΔV + increase in PE of the spring
                                =Pa(V1-V0)+12kx2=Pa(V1V0)+12kx2
Now, we can write, dQ = dU+dW
                              =CV(T-T0)+Pa(V1-V0)+12kx2
=CV(T-T0)+Pa(V1-V0)+12k(V1-V0)21-V0)2
This is the required relation.