# Specific heat from partition function of diatomic molecule

On p. 162 of Statistical Mechanics: R K Pathria, Paul D. Beale, the partition function for a rotating diatomic molecule is derived as

$$Z_{rot}(T) = \frac{T}{\Theta_r} + \frac{1}{3} + \frac{1}{15}\frac{\Theta_r}{T} + \frac{4}{315}\bigg(\frac{\Theta_r}{T}\bigg)^2 + ...$$

In the text they say that the corresponding specific heat is

$$C_V = Nk\bigg\{1 + \frac{1}{45}\bigg(\frac{\Theta_r}{T}\bigg)^2 + \frac{16}{945}\bigg(\frac{\Theta_r}{T}\bigg)^3 + ...\bigg\}$$

I want to know where this formula for $C_V$ came from? I tried using the relations $C_V = \big(\frac{\partial U}{\partial T}\big)_{N,V}$ and $U = \frac{kT^2}{N}\frac{\partial \ln Z}{\partial T}$ but just ended up with a long expression that didn't simplify.

Firstly, I think $N$ might need to be in the numerator of the formula for $U$ in terms of $Z$.
Secondly, let $x = T/\Theta_r$, then \begin{align} \frac{\partial}{\partial T}\left(T^2\frac{\partial\ln Z}{\partial T}\right) & = \frac{\partial}{\partial (T/\Theta_r)}\left((T/\Theta_r)^2\frac{\partial\ln Z}{\partial (T/\Theta_r)} \right) = \frac{\partial}{\partial x}\left(x^2\frac{\partial\ln Z}{\partial x} \right) = \frac{\partial}{\partial x}\left(\frac{x^2}{Z}\frac{\partial Z}{\partial x}\right)\\ &= \frac{\partial}{\partial x}\left[\frac{x\left(1 - \frac{1}{15}\frac{1}{x^2} - \frac{8}{315}\frac{1}{x^3}+\cdots\right)}{1+\frac{1}{3}\frac{1}{x}+\frac{1}{15}\frac{1}{x^2}+\frac{4}{315}\frac{1}{x^3}+\cdots}\right] \\ &= \frac{\partial}{\partial x}\left[x\left(1 - \frac{1}{15}\frac{1}{x^2} - \frac{8}{315}\frac{1}{x^3}+\cdots\right)\left(1-\frac{1}{3}\frac{1}{x}+\frac{2}{45}\frac{1}{x^2}-\frac{1}{189}\frac{1}{x^3}+\cdots\right)\right]. \end{align} In going from the second-to-last line to the last line, one needs to invert the power series to third order in the small quantity $1/x$ (see below for how to do this). Now simply multiply out the expression in brackets keeping only the terms up to order $1/x^2$, and take the remaining partial derivative to obtain the desired result.
Consider the power series $1 + a_1 \varepsilon + a_2 \varepsilon^2 + a_3 \varepsilon^3 + \cdots$. We are looking for the power series $1 + b_1 \epsilon + b_2 \varepsilon^2 + b_3\varepsilon^3 + \cdots$ that is its reciprocal. This means that their product should be 1: $$(1 + a_1 \varepsilon + a_2 \varepsilon^2 + a_3 \varepsilon^3 + \cdots)(1 + b_1 \varepsilon + b_2 \varepsilon^2 + b_3\varepsilon^3 + \cdots) = 1$$ Now simply multiply out the terms to the desired order, set the coefficient of each order in $\epsilon$ to zero, and solve the resulting system of equations order-by-order to obtain the desired coefficients $b_1, b_2, b_3\, \dots$.