Trick with partial derivatives in Statistical Physics

— 1. The problem —

Some time ago I was studying Statistical Physics and I ended up solving an interesting exercise. The exercise in question is from the book Statistical Physics by Mandl and it is on page 66:

A system possesses three energy levels ${E_1=\epsilon}$, ${E_2=2 \epsilon}$ and ${E_3=3 \epsilon}$, with degeneracies ${g(E_1)=g(E_3)=1}$, ${g(E_2)=2}$. Find the heat capacity of the system.

The first time I solved this problem I did it in a normal way, but then I realized something that allowed to simplify my calculations and solve the problem in a more elegant way.

First we have to calculate the partition function, ${Z}$, for this system.

— 1.1. First Solution —

Since what matters in this problem is the difference of energies we let ${E_2=0}$.

{\begin{aligned} Z &= \displaystyle \sum_{E_r}g(E_r)e^{-\beta E_r} \\ &= e^{\beta \epsilon}+2+2e^{-\beta \epsilon} \\ &= 2(1+ \cosh (\beta \epsilon)) \end{aligned}}

After calculating the partition function we have to calculate the mean energy, ${\bar{E}}$, of this system. By definition it is:

{\begin{aligned} \bar{E} &= -\dfrac{\partial}{\partial \beta} \ln Z \\ &= -\dfrac{\partial}{\partial \beta} \ln 2(1+ \cosh (\beta \epsilon)) \\ &= -\dfrac{2 \epsilon \sinh (\beta \epsilon)}{2(1+\cosh (\beta \epsilon))} \\ &= -\dfrac{\epsilon \sinh (\beta \epsilon)}{1+\cosh (\beta \epsilon)} \end{aligned}}

By definition ${c}$ is

{\begin{aligned} c &= \dfrac{\partial \bar{E}}{\partial T} \\ &= -\dfrac{\partial}{\partial T} \left( \dfrac{\epsilon \sinh (\beta \epsilon)}{1+\cosh (\beta \epsilon)}\right) \end{aligned}}

To differentiate the last expression with respect to ${T}$ isn’t that hard, but it is bothersome and if one isn’t careful the possibility of making a mistake shouldn’t be discarded.

Keeping in mind that in Statistical Physics it is ${\beta = 1/(kT)}$, it follows that (this is the point were I start to use the mathematical trick):

{\begin{aligned} c &= \dfrac{\partial \bar{E}}{\partial T} \\ &= k \dfrac{\partial \bar{E}}{\partial (kT)} \\ &= k \dfrac{\partial \bar{E}}{\partial (1/\beta)} \\ &= -\beta ^2 k \dfrac{\partial \bar{E}}{\partial \beta}\\ &= \beta ^2 k \dfrac{\partial}{\partial \beta}\left( \dfrac{\epsilon \sinh (\beta \epsilon)}{1+\cosh (\beta \epsilon)}\right) \end{aligned}}

Please notice that I haven’t differentiated anything so far. All I’ve done is to change variables in order to calculate the derivative in an easier way.

This last expression is already easy to differentiate but we are caught up in the moment and we’ll just make one more change of variable.

{\begin{aligned} c &= \beta ^2 k \dfrac{\partial}{\partial \beta}\left( \dfrac{\epsilon \sinh (\beta \epsilon)}{1+\cosh (\beta \epsilon)}\right) \\ &= \beta ^2 \epsilon ^2 k \dfrac{\partial}{\partial (\beta \epsilon)}\left( \dfrac{ \sinh (\beta \epsilon)}{1+\cosh (\beta \epsilon)}\right) \\ &= x ^2 k \dfrac{\partial}{\partial x}\left( \dfrac{ \sinh x}{1+\cosh x}\right) \\ &= x ^2 k \dfrac{\cosh x + \cosh ^2 x - \sinh ^2 x}{(1+ \cosh x)^2} \\ &= x ^2 k \dfrac{\cosh x + 1}{(1+ \cosh x)^2} \\ &= \dfrac{x ^2 k}{1+ \cosh x} \end{aligned}}

Yes, in this case the simplification of the hard work involved wasn’t that big, but I think that we should keep in mind this type of reasoning. This way we can apply it to similar scenarios that appear countless times in Physics and Mathematics.

— 1.2. Second Solution —

The previous steps could be even more simplified if we let ${E_1=0}$ and remember an elementary algebraic identity.

{\begin{aligned} Z &= 1+2e^{-\beta \epsilon}+e^{-\beta 2\epsilon} \\ &= (1+e^{-\beta \epsilon})^2 \\ \end{aligned}}

With this expression the calculus of ${\bar{E} }$ and ${c}$ is a lot easier.

{\begin{aligned} \bar{E} &= -\dfrac{\partial}{\partial \beta} \ln Z \\ &= -\dfrac{\partial}{\partial \beta} \ln(1+e^{-\beta \epsilon})^2 \\ &= -2\dfrac{\partial}{\partial \beta} \ln(1+e^{-\beta \epsilon}) \\ &= \dfrac{2\epsilon e^{-\beta\epsilon}}{1+e^{-\beta \epsilon}} \\ &= \dfrac{2\epsilon}{1+e^{\beta \epsilon}} \end{aligned}}

Now for ${c}$ it is

{\begin{aligned} c &= \dfrac{\partial \bar{E}}{\partial T} \\ &= \dfrac{\partial}{\partial T}\left( \dfrac{2\epsilon}{1+e^{\beta \epsilon}}\right) \end{aligned}}

Even though this expression is relatively easy to differentiate with respect to ${T}$ than ${-\dfrac{\epsilon \sinh (\beta \epsilon)}{1+\cosh (\beta \epsilon)}}$ we’ll use the same technique of change of variables that we already know:

{\begin{aligned} c &= \dfrac{\partial \bar{E}}{\partial T} \\ &= k \dfrac{\partial \bar{E}}{\partial (kT)} \\ &= k \dfrac{\partial \bar{E}}{\partial (1/\beta)} \\ &= -\beta ^2 k \dfrac{\partial \bar{E}}{\partial \beta}\\ &= -2\beta^2 \epsilon k \dfrac{\partial}{\partial \beta}\left( \dfrac{1}{1+e^{\beta \epsilon}}\right)\\ &= -2x^2 k \dfrac{\partial}{\partial x}\left( \dfrac{1}{1+e^{x}}\right)\\ &= 2k\dfrac{x^2e^x}{(1+e^{x})^2} \end{aligned}}

An expression that is, apparently, different from ${\dfrac{x ^2 k}{1+ \cosh x}}$.

The proof that these two expressions for ${c}$ are indeed the same is left as an exercise for the reader.

— 2. Appendixes —

In this section we will show that the value of ${c}$ doesn’t depend on what level we consider to be the zero level of energy. We will also show some elementary properties of derivatives taking into account the change of variables.

— 2.1. Derivatives and changes of variables —

Throughout this text we used the properties of changes of variables in derivatives. The goal of this section is to give some quick proofs of the said properties.

Let ${u=u(x)}$. It is an elementary result that ${\dfrac{\partial}{\partial u}=\dfrac{\partial x}{\partial u}\dfrac{\partial}{\partial x}}$.

If it is ${u=kx}$ then

$\displaystyle \dfrac{\partial}{\partial u}=\dfrac{1}{k}\dfrac{\partial}{\partial x} \ \ \ \ \ (1)$

If it is ${u=1/x}$ then

$\displaystyle \dfrac{\partial}{\partial u}=-\dfrac{1}{u^2}\dfrac{\partial}{\partial x} \ \ \ \ \ (2)$

Rewriting equation 1 and equation 2 in order to ${\dfrac{\partial}{\partial x}}$ we get the equalities used in the text.

— 2.2. The invariance of ${c}$

In the two deductions of ${c}$ we took the the ${0}$ level of energy the level that was most convenient. In the interest of having a self contained post we’ll give a justification of why this can be so.

The partition function of the system is ${Z=e^{-\beta \epsilon}+2e^{-\beta 2\epsilon}+e^{-\beta 3\epsilon}}$.

First we let ${E_2=0}$, and the partition function was ${Z_2=e^{\beta \epsilon}+2+e^{-\beta \epsilon}}$; while in the other resolution we let ${E_1=0}$, obtaining the partition function ${Z_1=1+2e^{-\beta \epsilon}+e^{-\beta 2\epsilon}}$.

Hence ${Z_2=e^{\beta E_2} Z}$ and ${Z_1=e^{\beta E_1} Z}$. This method is readily generalized to ${p}$ levels of energy where one has ${Z_n=e^{\beta E_n} Z}$, with ${n\leq p}$.

What we want to show is that for ${Z}$ and ${Z_n}$ it follows ${c_n=c}$.

{\begin{aligned} c_n &= \dfrac{\partial\bar{E}_n}{\partial T} \\ &= -\dfrac{\partial}{\partial T}\dfrac{\partial}{\partial \beta}\ln Z_n \\ &= -\dfrac{\partial}{\partial T}\dfrac{\partial}{\partial \beta}\ln \left( e^{-\beta E_n}Z\right) \\ &= -\dfrac{\partial}{\partial T}\dfrac{\partial}{\partial \beta}\ln e^{-\beta E_n} -\dfrac{\partial}{\partial T}\dfrac{\partial}{\partial \beta}\ln Z \\ &= \dfrac{\partial}{\partial T}\dfrac{\partial}{\partial \beta}(\beta E_n)+c\\ &= \dfrac{\partial}{\partial T} E_n+c\\ &= 0+c\\ &= c \end{aligned}}

Advertisements

About ateixeira

Physics, Math, Life and Poetry. Lately it has been more about Physics and Math though...
This entry was posted in 03 Physics, 04 Statistical Physics and tagged , , , , , . Bookmark the permalink.

5 Responses to Trick with partial derivatives in Statistical Physics

1. Já não me lembro de nada disto, mas tás lá! Gostei de ler =)

• ateixeira says:

Boas! Era na altura que estava a dar Física Estatística e não gostei de resolver isso por derivadas directas porque algo me dizia que havia uma maneira mais bonita de se fazer isto. Depois de algum tempo cheguei a este resultado. A parte de mostrar que $c$ não depende dos valores absolutos dos níveis de energia mas sim das suas diferenças é dita sem demonstração no Mandl, mas sendo eu quem sou tive que ver se o conseguia demonstrar.

2. caleb says:

Pls explain d 2nd method

• ateixeira says:

Hello caleb. What exactly you didn’t understand in the second method? Please read the appendixes because in there we show why we can make any energy level 0 and not affect the value of $c$.