# Query on statiscal mechanics and thermodynamics properties

Hello I have a question abot some thermodynamics quontites. I know that the internal energy is defined as

$$\delta U= \mathrm{Tr}[\rho H]$$

where $\mathrm{Tr}$ stands for the trace, $\rho= \frac{e^{-\beta H}}{Z}$ with $\beta=1/T$ and $T$ is the temperature and $H$ is the Hamiltonian. If I differentiate that I get

$$\delta U = \mathrm{Tr}[\delta \rho H + \rho \delta H]$$

The first quantity is identified as heat $\delta Q = \mathrm{Tr}[\delta \rho H]$ and work $\delta W = - \mathrm{Tr}[\rho \delta H]$. If I start with entropy with von Neumann's definition I have $$S = - \mathrm{Tr}[\rho \ln \rho]$$ and differentiating I get $$\delta S = \beta \mathrm{Tr}[\delta \rho H - \rho\delta H]$$ So here's my question. The thermodynamic relation is $$T\delta S= \delta U + \delta W$$. In the above relation (the one with the trace) I can identify the work but if I identify the former term it should be what I call heat and I would get $$T \delta S = \delta Q + \delta W$$

Where's the mistake? Why is contradictory this? Why should I identify the former quantity as internal energy if I called it heat??

Thanks

Edit: A pic where is calculated the differential of the entropy

• There's something odd about the way you differentiated the entropy. How did you do it? – udrv Aug 24 '16 at 3:13
• By definition $\delta S = -\delta (\mathrm{Tr}[\rho \ln \rho])=-\delta (\mathrm{Tr}[\rho \ln (\frac{e^{-\beta H}}{Z})])=-\delta(\mathrm{Tr}[\rho (-\beta H - \ln Z)])=\beta \mathrm{Tr}[\delta \rho H-\rho \delta H ]$ The term $\mathrm{Tr}[\delta \rho \ln Z]=0$ because $\mathrm{Tr}\rho =1$ and he $\ln Z$ does not contribute since $Z = \mathrm{Tr}e^{-\beta H }$ and the this is a number for a trace (I have a trace of a trace, so the second trace is a number for the first trace). Is the standar procedure that can be found in books such as Balian From microphysics to macrophysics vol 1 – Daniel Aug 24 '16 at 4:16
• I don't have Balian on hand, but: 1) You write $$\delta S = -\delta(Tr[\rho(-\beta H - \ln Z)]) = \beta Tr[\delta\rho H - \rho \delta H]$$ and say that the term in $\ln Z$ does not contribute. This would leave $\delta S = \delta (Tr[\rho H])$, which is not $\beta Tr[\delta\rho H - \rho \delta H]$. 2) The reason I asked in the first place is because in general $$\delta S = - Tr[\delta \rho \ln \rho] - Tr[\delta \rho] = - Tr[\delta \rho \ln \rho]$$ For $\rho = e^{-\beta H}/Z$ this gives $\delta S = \beta Tr[H\delta \rho]$, which retrieves the standard heat term. – udrv Aug 24 '16 at 5:10
• @udrv I edited the post with a pic where differential entropy is calculated but with chemical potential. – Daniel Aug 24 '16 at 11:44
• Well, you missed a sign. Eqs.(4) & (5) give $$\delta S = \beta Tr[\delta \rho (H - \mu N)] - \beta {\bf F} \cdot \delta {\bf V} - \beta \left( - Tr[\rho \delta H]\right) = \\ = \beta Tr[\delta \rho (H - \mu N) + \rho \delta H]$$as expected. Also, if $\rho = e^{-\beta H}/Z$ (ignoring $\mu$), its variation from $\delta H$ does imply a variation of the partition function, which must be accounted for in $\delta \rho$. Check if this works. It should, and should confirm $\delta S = - Tr[\delta \rho \ln\rho]$. – udrv Aug 24 '16 at 14:44