Solution (source code)

= Solution

The momentum integral is replaced by the sum over <momentum and winding modes>. Combining the zero modes with the oscillator trace gives
$$
\boxed{
Z_R(\tau,\bar\tau)=\frac1{|\eta(\tau)|^2}
\sum_{n,w\in\mathbb Z}
\exp\!\left[-\pi\tau_2\left(\frac{n^2}{R^2}+w^2R^2\right)
+2\pi i\tau_1nw\right]}.
$$
Equivalently,
$$
Z_R=\frac1{|\eta|^2}\sum_{n,w}
q^{p_L^2/4}\bar q^{p_R^2/4}
$$
with the left/right convention of part (iv). The answer is invariant under the <T-duality> $R\leftrightarrow1/R$ accompanied by $n\leftrightarrow w$ in these units.