I'm not sure what I'm getting wrong here. Based on this question, I'm trying to compute the double Gaussian integral using Stokes' theorem with complex forms.
I'm writing: $$ \int_R dx\wedge dy \;e^{-x^2 - y^2} = \int_R \frac{d\bar{z}\wedge dz}{2i}\; e^{-z\bar{z}}$$ for a circular region $R$ of radius $r$ centred at the origin. Then Stokes' theorem says $\int_R d\omega = \int_{\partial R} \omega$ for a differential form $\omega$ and $d = dz\frac{\partial}{\partial z} + d\bar{z}\frac{\partial}{\partial \bar{z}}$. In this case: $$\omega = -\frac{1}{4iz} \; e^{-z\bar{z}} \, dz + \frac{1}{4i\bar{z}} e^{-z\bar{z}} \, d\bar{z} \implies d\omega = \frac{1}{2i} e^{-z\bar{z}} d\bar{z}\wedge dz$$ So writing $z = r e^{i\theta}$, the integral is $$\int_{\partial R} -\frac{1}{4iz} e^{-z\bar{z}} dz + \frac{1}{4i\bar{z}} e^{-z\bar{z}} d\bar{z} = \int_{0}^{2\pi} -\frac{1}{2} e^{-r^2} d\theta = -\pi\, e^{-r^2}$$
But the answer should be $\pi$ if $r\rightarrow \infty$. What am I doing wrong or not understanding here?
In its current form, the theorem does not apply because there is a singularity at the origin in the middle of the domain. Cut it out properly by considering an annulus $r\leq |z| \leq R$ instead which gives
$$I = \pi\left(e^{-r^2}-e^{-R^2}\right)$$
with each boundary having reversed orientations. Taking the proper limits $r\to0^+$ and $R\to\infty$ now gives the correct answer.