# What went wrong?

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

We derive the relation $$\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}$$

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

However, if we actually compute this latter expression, we get $$- \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$$ Which is a nonsense answer.

• $e^{\sum x_i}\neq \sum e^{x_i}$ – Soba noodles Feb 23 '17 at 18:06
• 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
At one point you replace $$\sum_{i=0}^\infty e^{-\beta E_i} \tag{1}$$ with $$e^{-\sum_{i=0}^\infty \beta E_i}. \tag{2}$$ This is wrong. The quantity that could be replaced by (2) would be $$\prod_{i=0}^\infty e^{-\beta E_i}. \tag{3}$$ Typically, there's no simple transformation of a sum of exponentials.