a. The pressure of the gas inside the cylinder is a result of the atmospheric pressure (1 bar), the force exerted on the gas as a result of the weight of the piston and the force of the spring.
The contribution from the piston is
\begin{aligned}P_{\text {Piston }} &=\frac{F}{A}=\frac{M kg \times 9.807 \frac{ m }{ s ^{2}} \times \frac{1 Pa }{ kg /\left( m s ^{2}\right)} \times \frac{1 bar }{10^{5} Pa }}{\pi\left(d^{2} / 4\right) m ^{2}} \\&=\frac{M}{d^{2}} \times 1.2487 \times 10^{-4} bar =\frac{500}{(0.3)^{2}} \times 1.2487 \times 10^{-4} bar =0.6937 bar\end{aligned}
The contribution due to the spring is
\begin{aligned}P_{\text {Spring }}=\frac{F}{A} &=\frac{-k\left(x-x_{0}\right)}{\pi\left(d^{2} / 4\right)}=-40000 \frac{ N }{ m } \times(55-50) \times 10^{-2} m \\&=\frac{-40000 \frac{ N }{ m } \times(55-50) \times 10^{-2} m }{\pi\left[(0.3)^{2} / 4\right] m ^{2}} \times 1 \frac{ m kg }{ s ^{2} N } \times 1 \frac{ Pa }{ kg /\left( m s ^{2}\right)} \times \frac{1 bar }{10^{5} Pa } \\&=-0.2829 bar\end{aligned}
Therefore, the pressure of the air in the cylinder is
\begin{aligned}P &=P_{\text {Atmosphere }}+P_{\text {Piston }}+P_{\text {Spring }} \\&=1+0.6937-0.2829 \text { bar }=1.4108 bar\end{aligned}
For later reference we note that the number of moles of gas in the cylinder is, from the ideal gas law,
N=\frac{P V}{R T}=\frac{1.4108 bar \times \frac{\pi}{4}(0.3)^{2}(0.15) m ^{3}}{298.15 K \times 8.314 \times 10^{-5} \frac{ bar m ^{3}}{ mol K }}
= 0.6035 mol which is equal to 17.5 g = 0.0175 kg
b. The contribution to the total pressure due to the spring after heating is computed as above, except that now the spring extension is 53 cm (55 cm – 2 cm). Thus
P_{\text {Spring }}=\frac{-40000 \frac{ N }{ m } \times(53-50) \times 10^{-2} m }{\pi \frac{(0.3)^{2} m ^{2}}{4}}=-0.1697 bar
So the final pressure of the air in the cylinder is
P = 1 + 0.6937 – 0.1697 bar = 1.524 bar
[Note that the pressure at any extension of the spring, x, is
P = 1.6937 – 5.658(x – 0.50) bar where x is the extension of spring (m)]
The volume change on expansion of the gas (to raise the piston by 2 cm) is
\Delta V=\frac{\pi}{4}(0.3)^{2} m ^{2} \times 0.02 m =1.414 \times 10^{-3} m ^{3}
Also, the final temperature of the gas, again from the ideal gas law, is
T=\frac{P V}{N R}=\frac{1.524 bar \times \frac{\pi}{4} 0.3^{2} m ^{2} \times 0.17 m }{0.6035 mol \times 8.314 \times 10^{-5} \frac{ bar m ^{3}}{ mol K }}=365.0 K
The work done can be computed in two ways, as shown below. For simplicity, we first compute the individual contributions, and then see how these terms are combined. Work done by the gas against the atmosphere is
W_{\text {Atmosphere }}=-P_{\text {Atmosphere }} \times \Delta V=-1 \text { bar } \times 1.414 \times 10^{-3} m ^{3} \times 10^{5} \frac{ J }{\text { bar } m ^{3}}=-141.4 J
(The minus sign indicates that the gas did work on the surrounding atmosphere.) Work done by the gas in compressing the spring is
\begin{aligned}W_{\text {Spring }} &=-\frac{k}{2}\left[\left(x_{2}-x_{0}\right)^{2}-\left(x_{1}-x_{0}\right)^{2}\right] \\&=-\frac{40000}{2} \frac{ N }{ m }\left[3^{2} \times 10^{-4} m ^{2}-5^{2} \times 10^{-4} m ^{2}\right] \\&=-2 \times(9-25)=32 Nm \times 1 \frac{ J }{ Nm }=32 J\end{aligned}
Work done by the gas in raising the 500-kg piston is
W_{\text {Piston }}=-500 kg \times 0.02 m \times 9.807 \frac{ m }{ s ^{2}} \times \frac{1 J }{ m ^{2} kg / s ^{2}}=-98.07 J
Work done by the gas in raising its center of mass by 1 cm (why does the center of mass of the gas increase by only 1 cm if the piston is raised 2 cm?) is
W_{\text {gas }}=-17.5 g \times 0.01 m \times 9.807 \frac{ m }{ s ^{2}} \times \frac{1 J }{ m ^{2} kg / s ^{2}} \times \frac{1 kg }{1000 g }=-0.0017 J
which is negligible compared with the other work terms. If we consider the gas in the cylinder to be the system, the work done by the gas is
W = Work to raise piston + Work against atmosphere + Work to compress spring
= –98.1 J – 141.4 J + 32.0 J = –207.5 J
[Here we have recognized that the gas is doing work by raising the piston and by expansion against the atmosphere, but since the spring is extended beyond its no-load point, it is doing work on the gas as it contracts. (The opposite would be true if the spring were initially compressed to a distance less than its no-load point.)]
An alternative method of computing this work is as follows. The work done by the gas on expanding (considering only the gas in the system) is
W=-\int P d V=-A \int_{0.15 m }^{0.17 m } P d y=-A \int_{0.15 m }^{0.17 m }[1.6937-5.658(x-0.5)] d y
where y is the height of the bottom of the piston at any time. The difficulty with the integral above is that two different coordinate systems are involved, since y is the height of the piston and x is the extension of the spring. Therefore, we need to make a coordinate transformation. To do this we note that when y = 0.15, x = 0.55, and when y = 0.17, x = 0.53. Consequently, x = 0.7 – y and
\begin{aligned}W &=-A \int_{0.15 m }^{0.17 m }[1.6937-5.658(0.7-y-0.5)] d y \\&=-A\left[1.6937 \times 0.02-5.658 \int_{0.15 m }^{0.17 m }(0.2-y) d y\right] \\&=-A\left[1.6937 \times 0.02-5.658\left(0.2 \times 0.02-\frac{1}{2}\left(0.17^{2}-0.15^{2}\right)\right)\right] \\&=-7.068 \times 10^{-2}[0.03387-0.02263+0.01811] \\&=-0.2075 \times 10^{-2} \text { bar } m ^{3} \times 10^{5} \frac{ J }{\text { bar } m ^{3}}=-207.5 J\end{aligned}
This is identical to the result obtained earlier.
Finally, we can compute the heat that must be added to raise the piston. The difference form of the energy balance on the closed system consisting of the gas is
U \text { (final state) }-U \text { (initial state) }=Q+W=N C_{ V }\left(T_{f}-T_{i}\right)
so that
\begin{aligned}Q &=N C_{ V }\left(T_{f}-T_{i}\right)-W \\&=0.6035 mol \times 20.3 \frac{ J }{ mol K } \times(365-298.15) K +207.5 J \\&=819.0 J +207.5 J =1026.5 J\end{aligned}
Therefore, to accomplish the desired change, 1026.5 J of heat must be added to the gas. Of this amount, 819 J are used to heat the gas, 98 J to raise the 500-kg piston, and 141.4 J to push back the atmosphere; during the process, the spring supplies 32 J.