I'm trying to create an invariant associated with the metric. P.S: I have a physics background so apologies for the lack of rigour
Consider the integral squared as a Riemann limit of a sum:
$$ (\int_0^\infty e^{-ax^2} dx)^2 = \lim_{k \to \infty} \lim_{n \to \infty} (e^{-a(\frac{k}{n})^2} + e^{-4a(\frac{k}{n})^2} + \dots + e^{-ak^2})^2 (\frac{k}{n})^2$$
Writing out the square explicitly we have:
$$ (\int_0^\infty e^{-ax^2} dx)^2 = \lim_{k \to \infty} \lim_{n \to \infty} \sum_{r=1}^n a_r e^{-a r (\frac{k}{n})^2} (\frac{k}{n})^2 $$
where $a_r=\text{number of solutions of }m^2 +n^2 = r^2$. This looks similar to the limit of a sum of $\int e^{-x} dx$ (but with some extra coefficients and missing terms):
$$ \int_0^\infty e^{-ax} dx = \lim_{k \to \infty} \lim_{n \to \infty} (e^{-a(\frac{k}{n})^2} + e^{-2a(\frac{k}{n})^2} + \dots+ e^{-ak^2})(\frac{k}{n})^2$$
Note: we have used $h^2 \to 0$ instead of $h=k/n \to 0$ above.
But $$ \lim_{k \to \infty} \lim_{n \to \infty}\ \sum_{r=1}^n a_r \left( f(\frac{k}{n}r)\frac{k}{n} \right) = \lim_{s \to 1} \! \underbrace{\frac{1}{\zeta(s)} \sum_{r=1}^\infty \frac{a_r}{r^s}}_{\text{removable singularity}} \int_0^\infty f(x) \, dx $$
Where we have chosen $f(x) = e^{-x}$ and $a_r=\text{number of solutions of }m^2 +n^2 = r^2$. Hence, we have:
$$ (\int_0^\infty e^{-ax^2} dx)^2 = \frac{\pi}{4 a} $$
Now, consider the quantity in differential geometry:
$$ e^{-ds^2} \text{det} |g^{\mu \nu}|$$
For example: $$ ds^2 = dx^2 + dy^2$$
Then consider
$$ \sum_{r,r'} a_r a_{r'} e^{-a ds^2} \text{det} |g^{\mu \nu}| = \sum_{r,r'} a_r e^{-a r^2 dx^2 } a_{r'}e^{-a r^2 dy^2 } dx^2 dy^2 = (\pi / 4a)^2 $$
Question
How do I do this in radial coordinates with $ds^2 = dr^2 + r^2 d \theta^2$?