How can we evaluate the following integral using the tricks of delta functions? I am trying to teach myself the statistical field theory formulation of statistical mechanics.  Not part of a class, just self study in my free time. I appreciate any help here.  
I am starting with a couple of very simple integrals.  
Let X be a random N-dim vector, normalized to N.
$$\mathbf{X}\in\mathbb{R}^{N}$$
How can we explicitly evaluate the integral over all possible X  (uniformly)
$$\Omega = \int d\mathbf{X}\>\delta(\mathbf{X}^{2}-N)$$
i.e. compute the surface of an N-sphere
using the various forms and relations of the delta function  $\delta(x)$ 
Also, I would like to consider a related integral, were we select a random Q vector, such that
$$\mathbf{X}^{T}\mathbf{Q}/\sqrt{N}=\cos(\pi\epsilon),$$
leading to the (quenched) integral , in terms of the the angle $\epsilon)$
$$\Omega(\epsilon)=\int d\mathbf{X}\>\delta(\mathbf{X}^{2}-N)\> \delta(\mathbf{X}^{T}\mathbf{Q}/\sqrt{N}-\cos(\pi\epsilon))$$
i.e. compute the density of states
Note, the goal here is to demonstrate the basic machinery of the delta function and its representations, so that the problem can be generalized and additional constraints added, such as , what if $\mathbf{X}$ is an $(N\times M)$ real matrix.  
I think this would be fine as a 'homework and exercise' problem as well, although this is not essential
Let me clarify in more detail what I am looking for...
To start off, we first have to represent the vectors directly
$$\int d\mathbf{J}\delta
(\mathbf{J}^{2}-N)=\dfrac{1}{2}\int d\mathbf{J}\;\delta(\sum{J_{i}^{2}}-N)$$
Using the Fourier representation of the delta function
$$\delta(x-a)=\dfrac{1}{2\pi}\int d\hat{x}e^{i\hat{x}(x-a)}$$
we have
$$\int d\mathbf{J}\delta
(\mathbf{J}^{2}-N)=\dfrac{1}{2\pi}\int d\mathbf{J}\;\int dx\;e^{ix(\sum{J_{i}^{2}}-N)}$$
$$\cdots=\dfrac{1}{2\pi}\int d\mathbf{J}\;\int dx\;e^{ix\sum{J_{i}^{2}}}e^{-iNx}$$
$$\cdots=\dfrac{1}{2\pi}\int dx\;\int d\mathbf{J}\;e^{ix\sum{J_{i}^{2}}}e^{-iNx}$$
If we pull terms out that only depend on $x$, 
$$\cdots=\dfrac{1}{2\pi}\int dx\;e^{-iNx}\int d\mathbf{J}\;e^{ix\sum{J_{i}^{2}}}$$
I imagine we can evaluate the integral over J 
$$\int d\mathbf{J}\;e^{ix\sum{J_{i}^{2}}}=\Pi\int dj_{i}\;e^{ixj_{i}^{2}}=\left[\int dj\;e^{ixj^{2}}\right]^{N}$$
with a change of variables $(u=i\sqrt{ix}j,\;du=i\sqrt{ix}dj)$ we get a Gaussian
$$\left[\dfrac{1}{i\sqrt{ix}}\int du\;e^{-u^{2}}\right]^{N}=\left[\dfrac{\pi}{-ix}\right]^{N/2}$$
(or something like this, give or take the minus sign)
and then plug this back in to get some kind of Contour integral
$$\dfrac{1}{2\pi}\int dx\;e^{-iNx}\left[\dfrac{\pi}{ix}\right]^{N/2}$$
$$=\dfrac{\pi^{N/2}}{2\pi}\int dx\;e^{-iNx}\left[\dfrac{1}{ix}\right]^{N/2}$$
so one is left to evaluate this final integral..although I think I made a mistake or 2 along the way
What I was expecting to have at the end is the gamma function
$$\Gamma[z]=\int_{0}^{\infty}x^{z-1}e^{-x}$$
so I think this is close ... hence the ask for help
 A: If you meant $X$ has a uniform distribution then you are asking about $$\int_{\Bbb{R}^n} \delta(r-\|x\|^2 ) d^n x = f(r)$$ where $\delta(t) $ is the distributional derivative of $1_{t > 0}$ ie.
 $$f(r) = F'(r), \qquad F(r) = \int_{\Bbb{R}^n} 1_{r-\|x\|^2  > 0} d^n x = F(1) r^{n/2}= r^{n/2} \frac{\pi^{n/2}}{\Gamma(n/2+1)}$$ so that $$f(r) =  \frac{n}{2} r^{n/2-1}\frac{\pi^{n/2}}{\Gamma(n/2+1)}$$
A: If you define $\delta(f)$ as here, you get
$$\int_{\mathbb R^d} \delta(x^2 - R^2) \, d\boldsymbol x =
\int_{x = R} \frac {dS} {\left| \nabla (x^2 - R^2) \right|} =
\frac {S_{d - 1}(R)} {2 R},$$
where $S_d(R)$ is the surface area of a $d$-sphere of radius $R$, so you have to normalize accordingly for pdf calculations.
The general formula for two $(d - 1)$-dimensional hypersurfaces $f(\boldsymbol x) = 0$ and $g(\boldsymbol x) = 0$ intersecting at angle $\phi$ is
$$\int_{\mathbb R^d} \delta(f(\boldsymbol x)) \, \delta(g(\boldsymbol x)) \,
 d\boldsymbol x =
\int_{f(\boldsymbol x) = g(\boldsymbol x) = 0} \frac {dS} {
 \left| \nabla f(\boldsymbol x) \right|
 \left| \nabla g(\boldsymbol x) \right|
 \sin \phi}.$$
For the intersection of a hyperplane and a hypersphere, the integrand on the rhs is constant, and we get simply
$$\int_{\mathbb R^d} \delta(\boldsymbol n \cdot \boldsymbol x - a) \,
 \delta(x^2 - R^2) \, d\boldsymbol x =
\frac {S_{d - 2} {\left( \sqrt {R^2 - \frac {a^2} {n^2}} \right)}}
 {2 \sqrt {R^2 n^2 - a^2}},$$
assuming that the surfaces intersect.
