I'm studying statistical mechanics, and I found this problem in my study material: Suppose you have a gas consisting of N identical non-interacting atoms in a harmonic trap. Consider its Hamiltonian as:
$$ H_N = \displaystyle \sum_{i=1}^N \dfrac{\vec{p}^2_i}{2m}+\dfrac{K}{2}\vec{r}_i^2$$
where K is constant. The problem is to build a generalized partition function that preserves angular momentum $\vec{L}= \displaystyle \sum_{i=1}^N \vec{r_i} \times \vec{p_i} $. The problem states to solve in 2 dimensions for simplicity, so my take is $\displaystyle \vec{L}=\hat{z}( \sum_{i=1}^N r_{i1}p_{i2}-r_{i2}p_{i1})$ (with $\vec{r}=(r_1,r_2,0)$ and same for p). So I understand that $L_3 = (r_1p_2-r_2p_1)$ is the quantity to be conserved, besides the energy.
Since there is no interaction, I understand it's safe to assume you can build the generalized partition function for a single particle and simply exponenciate to N to get the total partition function.
So with that in mind, i'd guess the generalized partition function must be of the form: $$ Z_1 = \dfrac{1}{h^2}\int e^{-\beta H_1-\lambda L_3}d\vec{r} d\vec{p} =\dfrac{1}{h^2}\displaystyle \int e^{-\beta(\frac{p_1^2+p_2^2}{2m}+\frac{K}{2}(r_1^2+r_2^2))-\lambda(r_1p_2-r_2p_1)} dr_1 dr_2 dp_1 dp_2 $$
Now my problem becomes apparent: the angular momentum term gives diverges if I were to take the integration limits from $-\infty$ to $\infty$. So I'm guessing either I must somehow define finite integration limits (but I'm conflicted because there isn't a defined volume in the problem), or go to a discrete version and build $Z_1$ as a sum. I think you could argue there is a maximum distance of displacement given by initial conditions perhaps? But I'm not convinced. I've also tried completing the square for the terms in the exponent to see if it could help, but besides suggesting $\lambda = \beta \omega = \beta \sqrt{\dfrac{K}{m}}$ I cannot get rid of the divergence.
The problem eventually asks to calculate the average values $\langle r^2\rangle$, $\langle \vec{r} \times \vec{p}\rangle$, and of $\langle \dfrac{\vec{r} \times \vec{p}}{r^2}\rangle$ and then interpret the Lagrange multiplier associated to L, that's why I'm using lagrange multipliers for L in the partition function. Perhaps there is another way to introduce it?
EDIT: I just thought that maybe using the alternate expression for angular momentum for a single point-like particle $L=I \omega = m r^2 \omega$ could solve the issue. Is it safe to use this expression?