Solution (source code)

= Solution

In the one-mole <Van der Waals equation>, $b>0$ represents <excluded volume>: the volume available to molecular motion is $V-b$, rather than $V$. Subtracting $b$ in the denominator therefore increases the repulsive contribution to <pressure>. The $a>0$ term represents intermolecular attraction, which reduces the outward <momentum flux> at a wall and hence appears as the negative correction $-a/V^2$. The two minus signs do not mean that both physical effects lower <pressure>.

For a reversible <isothermal process> along a homogeneous gas branch with $V_2>V_1>b$, the <work> done by the gas is
$$
W_{\rm by}=\int_{V_1}^{V_2}\left(\frac{RT}{V-b}-\frac a{V^2}\right)dV
=\boxed{RT\ln\frac{V_2-b}{V_1-b}+a\left(\frac1{V_2}-\frac1{V_1}\right).}
$$
To find the <internal energy> change without guessing a caloric law, combine $dU=T\,dS-p\,dV$ with the <Helmholtz free energy> <Maxwell relation> $(\partial S/\partial V)_T=(\partial p/\partial T)_V$. This gives
$$
\left(\frac{\partial U}{\partial V}\right)_T=T\left(\frac{\partial p}{\partial T}\right)_V-p=\frac a{V^2}.
$$
Therefore
$$
\boxed{\Delta U=a\left(\frac1{V_1}-\frac1{V_2}\right)>0.}
$$
The attractive contribution $-a/V$ becomes less negative as the gas expands: separating attracting particles requires <energy>. This differs from the <ideal gas> result $\Delta U=0$ at fixed <temperature>. The required <heat> is $Q=\Delta U+W_{\rm by}=RT\ln[(V_2-b)/(V_1-b)]$. Below the critical <temperature>, an equilibrium path crossing a liquid–gas coexistence region needs the equilibrium coexistence construction rather than the unstable homogeneous <Van der Waals isotherm>.