I am trying to derive the internal energy of a gas which obeys the van der Waals equation.
I have however encountered some problems. I calculate the integral of $dU$ from $V=0,T=0$ to $V=V, T=\infty$ to $V=V,T=T$.
I can calculate the work:
$$\left(p+\left(\frac{a}{n}\right)^2\right)(V-nb)=nRT \implies p=\frac{nRT}{V-nb}-\frac{an^2}{V^2}$$
For the second part of the path $V$ is constant so $W=0$.
$$W=-\int\limits_\infty^V p\textrm dV=\int\limits_V^\infty \frac{nRT}{V-nb}-\frac{an^2}{V^2} \textrm dV\\=nRT\ln(V-nb)|_V^\infty+\frac{an^2}{V}|_V^\infty\\= \infty-\infty +\frac{an^2}{\infty}-\frac{an^2}{V}=-\frac{an^2}{V}$$
I know I haven't been mathematically rigorous but that is not really important to me at the moment. I think this is right.
I can't however think of how i should calculate the heat involved in following this path.
Any help on how to do this is appreciated.
EDIT: I see now that the work I calculated is wrong as well as $$nRT\ln(V-nb)|_V^\infty\neq\infty-\infty$$