For the canonical density matrix C(r, r 0 ,ß) a variational ansatz C f = (1 -/) C cl + /C gr is made where C cl and C gr are the classical and the ground state expressions which are exact in the hightemperature (ß -> 0) and in the low-temperature limits (ß -* + x)^ respectively, and / is a trial function subject to the restriction that f0for ß -» 0 and f-*• 1 for ß -» oo. With the approximation that / be dependent only upon ß, not upon spatial variables, the mean square error arising when C f is inserted into the Bloch equation is made a minimum. The Euler equation for this variational problem is an ordinary second order differential equation for f=f(ß) to be solved numerically. The method is tested for the exactly solvable case of the onedimensional harmonic oscillator.