# Finding the partition function with degeneracy levels

Before I post the question: I'm not looking for someone to solve it for me. I just want to give my solution and ask if what I'm doing is correct. I feel like I've attempted to solve the problem correctly (used the correct formulas etc) but the solutions I'm getting are a little hairy. Meaning, they don't look to neat.

A system possess three energy levels $E_1 = \epsilon$, $E_2 = 2\epsilon$ and $E_3 = 3\epsilon$, with degeneracies $g(E_1)=1$, $g(E_2)=2$ and $g(E_3)=1$.

(a) Find the partition function $Z$ of the system.

(b) Find the total energy $E$ of the system from the partition function.

(c) Find the heat capacity $C$ of the system

(a) $$Z = \sum_{r}g(E_r)e^{-\beta E_r}$$ where $\beta = \dfrac{1}{kT}$. Using the formula and plugging in the values gives the following:

$$Z= 1+2e^{-2\epsilon \beta} + e^{-3\epsilon \beta}$$

(b)The total energy is simply the expected value or ensemble average

$$\langle E \, \rangle=\sum_{r}E_rP_r = -\dfrac{1}{z}\dfrac{\partial z}{\partial \beta}= - \dfrac{\partial \ln z}{\partial \beta}$$

Just differentiating $\ln Z$ w.r.t $\beta$ I got

$$\langle E \, \rangle= \dfrac{-4\epsilon e^{-2\epsilon \beta}-3\epsilon e^{-3\epsilon \beta}}{1+2e^{-2\epsilon \beta}+ e^{-3\epsilon \beta}}$$

This doesn't look too bad, insofar as it looks like it could be a legitimate value for the total energy.

It's when I do the calculation for (c). I get a very messy answer and that's what brings me back to part (b) and thinking that it's incorrect.

For part (c) I used the relationship between the heat capacity and total energy of the system. That is

$$C_v=\dfrac{\partial \langle E \, \rangle }{\partial T}$$

I got a messy fraction. I might be missing some algebra trick though so I'll post the answer anyway.

$$C_v= -\dfrac{8\epsilon^2 e^{-\frac{2\epsilon}{kT}}-11\epsilon^2 e^{-\frac{5\epsilon}{kT}}}{kT^2(1+2e^{-2\epsilon \beta}+ e^{-3\epsilon \beta^2})^2}$$

Edit: $E_1 = 0$ this is the level of the zero energy scale.

• I think your partition function should be $e^{-\epsilon\beta}+2e^{-2\epsilon\beta}+e^{-3\epsilon\beta}$? Unless you ment to specify that $E_1=0$. – Turbotanten Oct 5 '17 at 18:51
• Sorry I forgot to mention that – Patrick Moloney Oct 5 '17 at 18:55
• I get the same thing except that when you're differentiating w.r.t $\beta$ you forgot that you have a minus sign in front of the equation that cancels with the minus sign from the exponential. Otherwise it doesn't seem to be any further simplification. – Turbotanten Oct 5 '17 at 19:21
• very good! Thanks I was wondering why I had a $-$ cause then I tried to solve (b) using $\langle E \, \rangle = \dfrac{1}{Z}\sum_{r}g(E_r)E_r e^{-E_r \beta}$ and I got a + ive answer. That clears up everything. – Patrick Moloney Oct 5 '17 at 19:24

If you have put the reference of energy in $E_1=0$, then the partition function should read $Z=1+2e^{-\epsilon\beta}+e^{-2\epsilon\beta}$. You can draw the levels in a diagram to see it clearly.

Original --------------------------- New energy reference $E_1=0$

$E_3=3\epsilon$ ---------------------- $E_3=2\epsilon$

$E_2=2\epsilon$ ============ $E_2=\epsilon$

$E_1=\epsilon$ ---------------------- $E_1=0$

You are interested in the difference of energy between the levels. Between 1 and 2 there is $\epsilon$ energy. You must keep this difference whatever point of reference you set.

With this, I obtain (using Mathematica, I hope these are correct):

$$\langle E\rangle = \frac{2\epsilon}{1+e^{\epsilon\beta}}$$

(To do this Mathematica simplfied multplying by $e^{-\epsilon\beta}$ both numerator and denominator).

And finally:

$$C_T=\frac{2\epsilon^2\beta^2k_be^{-\epsilon\beta}}{(1+e^{\epsilon\beta})^2}=\frac{\epsilon^2\beta^2k}{1+\cosh(\epsilon\beta)}$$

• I didn't let $\epsilon = E_2 - E_1 = E_2$ after I set $E_1 =0$ – Patrick Moloney Oct 5 '17 at 19:43
• To get $\langle E \rangle$ I simply multiply my expression by $e^{-\epsilon \beta}$ in the numerator and the denominator? – Patrick Moloney Oct 5 '17 at 19:51
• @PatrickMoloney not the expression provided in your answer but the one using the correct partition function. – VictorSeven Oct 5 '17 at 21:37