Kernel density estimation integral of squared kernel For computing the mean integrated squared error of an estimated distribution, there is a term
$$
R(g) = \int_{-\infty}^{\infty}g(x)^2 \,\text{d}x,
$$
where $g(x)$ denotes the so-called kernel. No suppose that I have a gaussian kernel, i.e.,
$$
g(x) = \frac{1}{\sqrt{(2\pi)^d}} \exp \left\{-\frac{1}{2} \|x\|^2\right\},
$$
where $d$ denotes the dimension of the vector $x$ and $\|\cdot\|$ denotes the 2-norm, i.e. $\|x\|^2=x^T x$. Then, what is the value of $R(g)$?

My attempt:
I try to write the integral as a gaussian distribution (which is normalized) with covariance $\frac{1}{2}I$, where $I$ denotes the identity matrix, so the determinant of the covariance equals $2^{-d}$. The result is this:
\begin{align}
R(g) &= \int_{-\infty}^{\infty}g(x)^2 \,\text{d}x \\
&= \int_{-\infty}^{\infty} \frac{1}{(2\pi)^d} \exp \left\{ \|x\|^2 \right\} \,\text{d}x\\
&= \frac{\sqrt{2^{-d}}}{\sqrt{(2\pi)^d}} \int_{-\infty}^{\infty} \frac{1}{\sqrt{(2\pi)^d} \sqrt{2^{-d}}} \exp \left\{ \frac{1}{2} x^T \left(\frac{1}{2}I\right)^{-1} x \right\} \,\text{d}x\\
&=\frac{\sqrt{2^{-d}}}{\sqrt{(2\pi)^d}} = \frac{1}{2^d \pi^{d/2}}.
\end{align}
Is my approach correct?
 A: Your integral notation is  unorthodox – since you take norms and transposes of vectors, I take it that $x\in\mathbb R^n$ and the integral is over all $\mathbb R^n$, which is usually symbolized either by $\int_{\mathbb R_n}$ (or for some other volume $V$ by $\int_V$) or by $\int_{-\infty}^\infty\ldots\int_{-\infty}^\infty$, whereas your notation is the usual one for a one-dimensional integral over $\mathbb R$.
Assuming that I've interpreted the integral correctly, your approach is correct, and if this formula involving a general covariance matrix and its determinant is the first that occurs to you, that's fine. I personally would have found it slightly easier to substitute $x=\frac u{\sqrt2}$, thus transforming to the standard normal distribution and obtaining the factor of $2^{-\frac d2}$ from the Jacobian of the substitution.
This is of course also how the determinant formula is derived, so it's just a matter of what you're more familiar with whether you do it from first principles or from a formula for a specific substitution that this is a special case of.
