# Expectation values in coupled thermalized harmonic oscillators

Consider a pair of equal mass (set $m=1$) harmonic oscillators of frequencies $\omega_1$ and $\omega_2$ coupled through a positive constant $g$. The Hamiltonian is

$$H=\frac{1}{2}p_1^2+\frac{1}{2}\omega_1^2q_1^2+\frac{1}{2}p_2^2+\frac{1}{2}\omega_2^2q_2^2+\frac{1}{2}g(q_1-q_2)^2.$$

It is then pretty straightforward to diagonalize the system into normal modes and write (with $\hbar=1$)

$$H=\omega_-\left(a_-^\dagger a_-+\frac{1}{2}\right)+\omega_+\left(a_+^\dagger a_++\frac{1}{2}\right).$$

The expressions for the normal modes are ridiculously long and nasty so I won't bother writing them here. But the nice part is that $a_\pm$ commute, and therefore are easy to trace over independently. We then write down the partition function

$$Z=\mathrm{tr}\exp(-\beta H),$$

And in principle compute every expectation value imaginable using $Z$.

And so I did, and it worked out for a while. I then decided to compute moments. In particular, $\langle q_1^2\rangle$. My intuition then pointed me to

$$\frac{\partial Z}{\partial\omega_1},$$

Since $\omega_1$ shows up with $q_1^2$ in the Hamiltonian. But when I compute that, I don't get what I wanted. Instead, using some operator identities that I can elaborate on if necessary, I get

$$\frac{\partial Z}{\partial\omega_1}=-\beta\omega_1\mathrm{tr}\left(\left(q_1^2+i\frac{\beta}{2}(q_1p_1+p_1q_1)-\frac{\beta^2}{6}p_1^2\right)\exp(-\beta H)\right).$$

i.e. not $\langle q_1^2\rangle$. Can anyone help me extract this expectation value, and maybe other moments from this partition function?

• $q^{2}$ is related to $a$ and $a^{\dagger}$. Would it be easier to first compute the moment of $a$ and $a^{\dagger}$? – K_inverse Sep 19 '18 at 9:19
• @K_inverse it might be, but I'm not sure how to do that either – Gabriel Golfetti Sep 19 '18 at 23:30

I just realized there's a mistake in my calculations. Not sure where, but I'm sure it's there. The calculation goes as follows. The Free Energy is defined as

$$F=-\frac{1}{\beta}\log\mathrm{tr}\,e^{-\beta H}.$$

Suppose then the Hamiltonian depends on some parameter $$\lambda$$ as $$H(\lambda)$$. If we differentiate w.r.t. $$\lambda$$, making sure to keep temperature constant, we get

$$\frac{\partial F}{\partial\lambda}=-\frac{1}{\beta}\frac{\partial}{\partial\lambda}\log\mathrm{tr}\,e^{-\beta H}.$$ We now need to compute the right-hand side of the equation. The derivative of the log of something is easy:

$$\frac{\partial}{\partial\lambda}\log\mathrm{tr}\,e^{-\beta H}=\frac{\frac{\partial}{\partial\lambda}\mathrm{tr}\,e^{-\beta H}}{\mathrm{tr}\,e^{-\beta H}}$$ The derivative infiltrates the trace and we get

$$=\frac{\mathrm{tr}\,\frac{\partial}{\partial\lambda}e^{-\beta H}}{\mathrm{tr}\,e^{-\beta H}}.$$

Now we just need to compute that operator inside the trace. To do so, note that

$$e^{\beta H}\frac{\partial}{\partial\lambda}e^{-\beta H}=-\int\limits_0^\beta e^{tH}\frac{\partial H}{\partial\lambda}e^{-tH}\,dt.$$

$$\frac{\partial}{\partial\lambda}e^{-\beta H}=-e^{-\beta H}\int\limits_0^\beta e^{tH}\frac{\partial H}{\partial\lambda}e^{-tH}\,dt.$$

This is easy to check by noting that it's trivially true for $$\beta=0$$ and checking that the derivatives are equal. Now, we plug that into the thing we want to find out:

$$\frac{\partial}{\partial\lambda}\log\mathrm{tr}\,e^{-\beta H}=-\frac{\mathrm{tr}\,e^{-\beta H}\int\limits_0^\beta e^{tH}\frac{\partial H}{\partial\lambda}e^{-tH}\,dt}{\mathrm{tr}\,e^{-\beta H}}.$$

We pull the integral out of the trace and get

$$=-\int\limits_0^\beta \frac{\mathrm{tr}\,e^{-\beta H}e^{tH}\frac{\partial H}{\partial\lambda}e^{-tH}}{\mathrm{tr}\,e^{-\beta H}}\,dt$$ And using the cyclic property and the fact that all the exponentials commute with each other we get $$=-\int\limits_0^\beta\frac{\mathrm{tr}\,e^{-\beta H}\frac{\partial H}{\partial\lambda}}{\mathrm{tr}\,e^{-\beta H}}\,dt=-\beta\frac{\mathrm{tr}\,e^{-\beta H}\frac{\partial H}{\partial\lambda}}{\mathrm{tr}\,e^{-\beta H}}.$$

If we remember that the density operator in a thermal state is $$\rho=\frac{e^{-\beta H}}{\mathrm{tr}\,e^{-\beta H}}$$, we can write the final version of the expression for the derivative of the log:

$$\frac{\partial}{\partial\lambda}\log\mathrm{tr}\,e^{-\beta H}=-\beta\,\mathrm{tr}\,\rho\frac{\partial H}{\partial\lambda}=-\beta\left\langle\frac{\partial H}{\partial\lambda}\right\rangle.$$

We get the final expression, what we expected from intuition:

$$\frac{\partial F}{\partial\lambda}=\left\langle\frac{\partial H}{\partial\lambda}\right\rangle.$$