Help with a partition function calculation

In summary, the conversation discusses the calculation of the partition function for a spin-1/2 system in a constant magnetic field. The individual steps and equations for the calculation are explained, and the result is compared to the expected energy for the system. The conversation then highlights a potential mistake in the initial treatment, which is corrected by summing over all physically distinct states. The new calculation shows that the net spin converges to zero at high temperatures, unlike the previous calculation which showed a non-zero net spin.
  • #1
hammer123
2
1
<Re-opening approved by mentor.>

Hi, I've always wondered why when calculating the partition function for a quantum system, we only sum over the eigenstates and not superimposed states. Thus I decided to actually try summing over all normalized states and see what would happen. Feedback is appreciated. (Updated result at the end)

Consider a spin-1/2 system immersed in a constant magnetic field ##B##, with the Hamiltonian
$$ \hat H = - B \hat S_z$$ Consider an arbitrary state decomposed in the eigenstates of ##\hat S_z##
$$| \psi \rangle = \alpha | + \rangle + \gamma e^{i \phi} | - \rangle $$ ##\alpha## and ##\gamma## are taken to be real and greater than zero. The expected energy for this state is $$E_{| \phi \rangle}=\langle \phi | \hat H| \phi \rangle = - \frac {B \hbar} {2} (\alpha^2 - \gamma^2)$$ Now consider the "all-states" partition function of this system, in which all states such as ##| \psi \rangle## are summed over. $$Z = \sum_{| \psi \rangle} \text{exp}[\frac {B \hbar \beta} {2} (\alpha^2 - \gamma^2)]$$ By normalization of ##| \psi \rangle##, this is $$ Z = \sum_{| \psi \rangle} \text{exp}[\frac {B \hbar \beta} {2} (2\alpha^2 - 1)]$$ Explicitly, $$Z = \int_0^{2\pi} \int_0^{1}\text{exp}[\frac {B \hbar \beta} {2} (2\alpha^2 - 1)] d\alpha d\phi$$ The ##\phi## integral is to account for the phase $$Z = 2 \pi ~\text{exp}(-\frac {B \hbar \beta}{2})\int_0^{1}\text{exp}[ {B \hbar \beta}\alpha^2] d\alpha$$ The mean spin in the ##z## direction is then $$\langle m_z \rangle = \frac {1}{\beta} \frac {\partial logZ} {\partial B} = -\frac {\hbar}{2} + \frac {\hbar\int_0^{1} \alpha^2 \text{exp}[ {B \hbar \beta}\alpha^2] d\alpha}{\int_0^{1} \text{exp}[ {B \hbar \beta}\alpha^2] d\alpha} $$ This can be expressed in terms of the ##\text{erfi}(x) = -i \text{erf}(ix)## functions $$\frac {\langle m_z \rangle}{\hbar} = \frac { e^\tau}{\sqrt {\pi \tau}\text{erfi}\sqrt{\tau}} -\frac {1+\tau}{2\tau} $$ where ##\tau = B\hbar\beta##. Can be shown that (according to mathematica)
$$\lim_{\tau \rightarrow \pm\infty} \langle m_z \rangle = \pm \frac {\hbar}{2}$$ Which is good as this corresponds to ## T \rightarrow 0##. However, it appears that $$\lim_{\tau \rightarrow 0} \langle m_z \rangle = -\frac{\hbar}{6}$$ which is not right since this corresponds to the ##T \rightarrow \infty## limit.

So my question is, did I make a mistake or was this entire thing invalid to start with?

Wolframalpha results for the limits:
##\tau\rightarrow-\infty##
##\tau\rightarrow\infty##
##\tau\rightarrow0##

UPDATE:
Okay, so it seems like my initial treatment distinguished the ##| + \rangle## state and that's what caused the non-zero net spin at ##T \rightarrow \infty##. However I'm not really sure why that was so, as far as I can tell I summed over all of the physically distinct states.
Whatever the case, to treat them equally I sum up the expressions for ##Z##, one with ##\gamma## removed and one with ##\alpha## removed$$Z = \sum_{| \psi \rangle} \text{exp}[\frac {B \hbar \beta} {2} (\alpha^2 - \gamma^2)]$$Using ##\alpha^2+\gamma^2=1## $$ =\frac{1}{2} \sum_{| \psi \rangle} \{\text{exp}[\frac {B \hbar \beta} {2} (2\alpha^2 - 1)]+\text{exp}[\frac {B \hbar \beta} {2} (1-2\gamma^2)]\}$$ $$ = \frac{1}{2}\int_0^{2\pi} \int_0^{1}\text{exp}[\frac {B \hbar \beta} {2} (2x^2 - 1)]+\text{exp}[\frac {B \hbar \beta} {2} (1-2x^2)] dx d\phi$$ $$= \pi ~\text{exp}(-\frac {B \hbar \beta}{2})\int_0^{1}\text{exp}[ {B \hbar \beta}\alpha^2] d\alpha+ \pi ~\text{exp}(\frac {B \hbar \beta}{2})\int_0^{1}\text{exp}[ {-B \hbar \beta}\gamma^2] d\gamma$$ The net spin is then $$\langle m_z \rangle = \frac{\hbar}{2}(\frac { e^\tau}{\sqrt {\pi \tau}\text{erfi}\sqrt{\tau}}+\frac { e^{-\tau}}{\sqrt {\pi \tau}\text{erf}\sqrt{\tau}}-\frac{1}{\tau})$$Where as before ##\tau = B\hbar\beta##. This function has the right limits $$\lim_{\tau \rightarrow \pm\infty} \langle m_z \rangle = \pm \frac {\hbar}{2}$$ and, more importantly $$\lim_{\tau \rightarrow 0} \langle m_z \rangle = 0$$ Compared to the net spin derived from only summing eigenstates, ##\langle m_z \rangle = \frac {\hbar}{2}\text{tanh}(\frac{\tau}{2})##, the one derived here converges to ##\pm \frac{\hbar}{2}## more slowly, as expected since the system has more degrees of freedom.Plot of the net spin compared to usual one
 
Last edited:
  • Like
Likes thephystudent
Physics news on Phys.org
  • #2
:[Insert Plot of Net Spin] So it seems like my initial treatment was indeed incorrect. I hope this helps someone else who might be trying to do something similar.
 

FAQ: Help with a partition function calculation

What is a partition function and why is it important in scientific calculations?

A partition function is a mathematical function used in statistical mechanics to calculate the thermodynamic properties of a system. It is important because it allows us to predict the behavior of a system at different temperatures and energies, and it is a fundamental tool in understanding the microscopic behavior of matter.

How is a partition function calculated?

A partition function is calculated by summing over all possible states of a system, weighted by their corresponding energies. This can be a complex calculation, especially for systems with a large number of particles and energy levels.

What is the relationship between the partition function and the free energy of a system?

The partition function is directly related to the free energy of a system through the equation F = -kT * ln(Z), where F is the free energy, k is the Boltzmann constant, T is the temperature, and Z is the partition function. This relationship allows us to calculate the free energy of a system using the partition function.

Can the partition function be used to predict the behavior of a system at any temperature?

Yes, the partition function can be used to predict the behavior of a system at any temperature. However, the accuracy of the prediction may vary depending on the complexity of the system and the accuracy of the input parameters used in the calculation.

Are there any limitations to using the partition function in scientific calculations?

One limitation of using the partition function is that it assumes the system is in thermal equilibrium, which may not always be the case in real-world systems. Additionally, calculating the partition function for large, complex systems can be computationally intensive and may require approximations or simplifications.

Similar threads

Replies
1
Views
908
Replies
5
Views
2K
Replies
3
Views
1K
Replies
4
Views
872
Replies
2
Views
1K
Replies
1
Views
1K
Replies
2
Views
1K
Back
Top