# What went wrong?

Consider the thermodynamic partition function $Z = \sum_{i=0}^\infty e^{-\beta E_i}$.

We derive the relation \begin{equation} \langle E \rangle = \sum_{i=0}^\infty E_i P_i = \frac{1}{Z} \sum_{i=0}^\infty E_i e^{-\beta E_i} = -\frac{1}{Z} \frac{\partial}{\partial \beta} \sum_{i=0}^\infty e^{-\beta E_i} = -\frac{1}{Z} \frac{\partial Z}{\partial \beta} \end{equation}

Formally, this looks similar to $-\frac{\partial \ln Z}{\partial \beta}$

However, if we actually compute this latter expression, we get \begin{equation} - \frac{\partial \ln \sum_{i=0}^\infty e^{-\beta E_i}} {\partial \beta} = - \frac{\partial \ln e^{\sum_{i=0}^\infty -\beta E_i}} {\partial \beta} = \frac{\partial \beta \sum_{i=0}^\infty E_i} {\partial \beta} = \sum_{i=0}^\infty E_i \end{equation} Which is a nonsense answer.

Could someone please help explain what went wrong?

https://en.wikipedia.org/wiki/Partition_function_(statistical_mechanics)#Calculating_the_thermodynamic_total_energy

• $e^{\sum x_i}\neq \sum e^{x_i}$ – Soba noodles Feb 23 '17 at 18:06
• @Sobanoodles But ln (e^x + e^y) = ln e ^(x+y) = x+y – Rascalniikov Feb 23 '17 at 18:08
• Btw, how do I add latex for comments? – Rascalniikov Feb 23 '17 at 18:09
• just type equations inside dollar signs for TeX typesetting. Regarding the question, $e^x+e^y \neq e^{x+y}=e^x e^y$ – Soba noodles Feb 23 '17 at 18:11
• Ah, crap. I just saw it. $ln a + ln b = ln ab$, but $ln (a + b) \neq ln ab$. Sorry guys. – Rascalniikov Feb 23 '17 at 18:14

## 1 Answer

At one point you replace \begin{equation} \sum_{i=0}^\infty e^{-\beta E_i} \tag{1} \end{equation} with \begin{equation} e^{-\sum_{i=0}^\infty \beta E_i}. \tag{2} \end{equation} This is wrong. The quantity that could be replaced by (2) would be \begin{equation} \prod_{i=0}^\infty e^{-\beta E_i}. \tag{3} \end{equation} Typically, there's no simple transformation of a sum of exponentials.