# Calculating the partition function based on molar heat capacity

Given the molar heat capacity of a partition function as a function of temperature, how would one determine the partition function?

Say the molar heat capacity = $\alpha T^2$

All you have to do is to use some of the well known results from Statistical Thermodynamics: The molar heat capacity at constant volume is

$$\bar{c}_V = \left( \frac{\partial \bar{U}}{ \partial T} \right)_V$$

where $\bar{U}$ is the inner energy, $T$ is the temperature, and $V$ is the volume. The molar inner energy in terms of the partition function $Z$ and the temperature is given by:

$$\bar{U} = \frac{k_{\text{B}} T^{2}}{n} \frac{\partial \ln Z}{ \partial T} \ .$$

where $n$ is the amount of substance.

Now, you simply have to plug the equation for $\bar{U}$ into the equation for $\bar{c}_V$ and after using the chain rule of differentiation you get the following differential equation:

$$\bar{c}_V = 2 \frac{k_{\text{B}}}{n} T \frac{\partial \ln Z}{ \partial T} + \frac{k_{\text{B}}}{n} T^{2} \frac{\partial^2 \ln Z}{ \partial T^2} \ .$$

Finally, you just have to use your formula for the molar heat capacity, $\bar{c}_V = \alpha T$, and solve the resulting differential equation

\begin{align} \frac{k_{\text{B}}}{n} T^{2} \frac{\partial^2 \ln Z}{ \partial T^2} + 2 \frac{k_{\text{B}}}{n} T \frac{\partial \ln Z}{ \partial T} - \alpha T^2 &= 0 \\ \frac{\partial^2 \ln Z}{ \partial T^2} + 2 \frac{1}{T} \frac{\partial \ln Z}{ \partial T} - \frac{n \alpha}{k_{\text{B}}} &= 0 \end{align}

for $\ln Z$. If solving differential equations by hand is not your thing, you can simply charge Wolfram Alpha with the task and get:

\begin{align} \ln Z &= \frac{n \alpha}{6 k_{\text{B}}} T^2 - C_1 \frac{1}{T} + C_2 \\ Z &= \exp\left(\frac{n \alpha}{6 k_{\text{B}}} T^2 - C_1 \frac{1}{T} + C_2 \right) \ , \end{align}

where $C_1$ and $C_2$ are constants of integration which can be fixed by enforcing boundary conditions for the temperature.

The heat capacity is generally not proportional to $T^2$ unless over a very small range of temperatures because it becomes constant at high temperatures.

With experimental data where the heat capacity is some function of temperature $C_V=f(T)$ it is easiest to integrate directly using the definitions from statistical mechanics. Thus as $C_V=(\mathrm dU/\mathrm dT)_V$ integrating from $0$ to $T$ produces $$U(T)=\int _0^T C_V(T)\,\mathrm dT$$ where $U(T)$ is the internal energy as a function of $T$. If $C_V=\alpha T^2$ then the integration is straightforwards. If the function is more complex or you want to use actual data then numerical integration may be needed.

Then using $$U(T) = U(0) +RT^2\,\frac{\mathrm d\ln(Z)}{\mathrm dT}$$ The log of the partition function $Z$ is obtained as $$\ln(Z)=\int_0^T \frac{U(T)}{RT^2}\,\mathrm dT$$

In your particular case $U(T)=\alpha T^3/3$ and $\ln(Z)=\alpha T^2/6$