Van der waals equation In deriving the Van der Waals equation in the book concepts in thermal physics it is written that if we change the volume by $dV$ then change in potential energy of molecules will be $-\frac{a(n^2)dV}{V^2}$ where $n$ is number of moles.I understood this part. But according to me this energy change should be equal to $-pdV$ where $p$ is the pressure that we measure. However, in book it is written that this energy change is equal to $-p'dV$ where $p'$ is some effective pressure and the pressure that we measure is equal to sum of this effective pressure and the pressure of ideal gas(pressure if there were no intermolecular interactions). Help me understand this part.
 A: Start with the ideal gas law for pressure $p$, molar volume $\bar{V}$, and temperature $T$.
$$ p \bar{V} = R T$$
As derived from kinetic theory, this equation is for a system where the particles have no volume and no inter-particle interactions (among other things).
Allow the particles to have inter-particle interactions. The inter-particle interactions arise from a potential energy between the particles as a function of separation distance $U(r)$. We obtain the force between the particles as $F = -dU/dr$, and this inter-particle force directly affects the pressure that the particles exert.
We can obtain a first principled derivation for attractive potential for (fluctuating) dipole-dipole with $U \propto 1/r^6$ where $r$ is separation distance. This is the attractive term in the Lennard-Jones potential energy equation. With suitable mathematical analysis using $\bar{V} \propto r^3$, we find that this leads to a term for an effective change in pressure as
$$ \Delta_{e} p = \frac{a}{\bar{V}^2}$$
where $a$ is a constant that depends on the chemical characteristics of the particle (i.e. its polarizability). We modify the ideal gas law accordingly to account for this effective change in pressure from inter-particle interactions to obtain
$$\left(p_{m} + \frac{a}{\bar{V}^2}\right)\bar{V} = p_{vdW}\bar{V} = RT $$
As derived, the term $a$ is positive because forces between (dipole-dipole) particles are attractive. We find that a gas with attractive inter-particle attractions exerts a lower measured pressure $p_m = p_{vdW} - ({a}/{\bar{V}^2})$ than it would as an ideal gas.
