# Deriving a path-integral expression for a thermal density matrix with position-dependent temperature

I've been fiddling with deriving a path-integral expression for a thermal partition function with a position-dependent temperature but I'm not sure how to get started on this. Concretely, I'm trying to derive a path-integral expression for the following thermal partition function with a free scalar Hamiltonian :

$$Z[\beta] = Tr(e^{-\int dx \; \beta(x) \; ( (\partial\phi)^2 + \; \pi^2_\phi ) })$$ I guess that to get started, it all comes down to deriving the equivalent of
$$\left<\phi_f|e^{-iHt}|\phi_i\right> = \int_{\phi(0)=\phi_i}^{\phi(t)=\phi_f} D[\phi] \, e^{iS}$$ or $$\left<\phi_f|e^{-H\beta}|\phi_i\right> = \int_{\phi(0)=\phi_i}^{\phi(\beta)=\phi_f} D[\phi] \, e^{-S_E[\phi]}$$ for a uniform $\beta$ after wick rotation, i.e. $\tau=it$

Any help or hints on how to get started on deriving the path-integral for this thermal density matrix expression will be much appreciated.

• Thanks for your answer. I'll definitely check those papers by Luttinger. However, I have one further question. If the partition function is not defined except in equilibrium, does that necessarily mean that deriving a path integral expression for a position-dependent temeprarure thermal partition function is somewhat equivalent to deriving it for curved spacetimes? I'm not sure if this makes sense but $\beta (x)$ seems to be equivalent to spacetime curvature. Is this a correct analogy or is it not at all related to the answer you gave? – Amro May 31 '18 at 19:36
• If you think of the partition function as a PI in Euclidean signature with "time" $\tau=-it$ being periodic , $\tau\sim \tau+\beta$, then varying $\beta$ does indeed cause spacetime curvature. – mike stone May 31 '18 at 19:42