# Expansion of Helmholtz energy

To get an expansion of Helmholtz energy of

a) an ideal gas b) a Van der waals gas

we must integrate

$\left ( \frac{\delta A }{\delta V} \right )_{T}=-P$

I saw the solution is :

Can you explain why is that?

-

Consider just part (a). we use the ideal gas law for $P$, that is $$-P=-\frac{nRT}{V}$$ and substituting this in for $P$ we get $$\delta A=-\frac{nRT}{V}\delta V\implies\Delta A=-nRT\int_{V_1}^{V_{2}}\frac{1}{V}dV$$ which gives $$\Delta A=-nRT(\ln(V_2)-\ln(V_1))=-nRT\ln\left(\frac{V_2}{V_2}\right)$$ I'm not sure where the $n$ went... It's key we held $T$ constant. Hope this helps.