Assume $A$ is an operator on a Hilbert space with discrete spectrum. Assume $B$ is a positive operator on the same Hilbert space also with a discrete spectrum. Also assume $A$ and $B$ commute.


I'm looking at the small $t$ expansion of the expression,


$$W(t) = \mathrm{Tr} \left( A e^{-tB} \right) = \sum\_{n=0}^\infty D\_n A\_n e^{-t B\_n}$$


where $A\_n$ and $B\_n$ are the eigenvalues of $A$ and $B$, $D\_n$ is the dimension of the eigenspace corresponding to $A\_n$ and $B\_n$, and we can further assume that $B\_n$ grows quadratically with $n$, $D\_n$ grows at most polynomially with $n$ and $A\_n$ is such that $W(t)$ is finite for $t>0$, i.e. $A\_n$ does not grow too fast.


I'd like to get the $\log(t)$ term in the small $t$ expansion of $W(t)$ i.e. not the leading polynomial ones. I mean on general grounds I'll have, for $t\to 0$,


$$W(t) = \sum\_j \frac{W\_j}{t^{\alpha\_j}} + w \log(t) + O(t\log(t)) + \ldots$$


with exponents $\alpha\_j > 0$ and what I'd like to have is the coefficient $w$.


In principle I can successively find all polynomial terms, subtract them, and then the leading term will be the $\log(t)$ term, but I suppose there is a way to get directly the $\log(t)$ term, what would it be?



$\log(t)$ term in the small time expansion of $\mathrm{Tr}( A e^{-tB} )$
The answer by Carlo Beenakker is correct that any contribution to $D\_n A\_n \sim n^p$ with $p\ge 0$ does not generate any logarithmic asymptotic terms. Instead of numerical checks, one can also examine the [Taylor-Maclaurin](https://en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula#Asymptotic_expansion_of_sums) asymptotic series for $\sum\_{n=0}^\infty n^p e^{-t n^2}$ (no $\log(t)$ terms are generated by differentiating the summand w.r.t $n$).


What is left to cover is the case $p=-1$. Then
$$
 \sum\_{n=1}^\infty n^{-1} e^{-t n^2} \sim \int\_1^\infty n^{-1} e^{-t n^2} dn
 = \frac{1}{2} \int\_t^\infty \frac{e^{-x}}{x} dx
 = -\frac{1}{2} \log(t) + O(1) .
$$
The subleading terms from the Euler-Maclaurin formula and in $O(1)$ above will also not be logarithmic (compare with the series expansion of the exponential integral $E\_1(x)$ [DLMF §6.6.2](https://dlmf.nist.gov/6.6.E2)).


So to get the logarithmic contribution to $W(t)$, you can directly look at the $O(n^{-1})$ term in the asymptotic expansion of $D\_n A\_n$ (provided the expansion itself doesn't have funny terms involving $\log(n)$ or something like that).


