How to do the integrals over the multivariate delta function? How to do this integration?
$$ \int_{-\infty}^{\infty}dq\int_{-\infty}^{\infty} dp \; \delta(E-\frac{p^2}{2m}-\frac{k}{2}q^2)= 2\pi\sqrt{\frac{m}{k}}$$
I obtained the result using Mathematica, I am not even sure it is correct. Anyways, I'd love to know how one can evaluate this by hand. I am familiar with the Delta function and the identities on how to evaluate those integrals over infinities.
 A: The simplest way to solve this - and particularly, the way that minimizes the chances of messing it up - is to switch over to a single coordinate that inside the delta function. In your case it's easy - just choose an appropriate polar representation: set
\begin{align}
q& = A\, r\cos(\theta)\\
p& = B\, r\sin(\theta),
\end{align}
and require that $\frac{1}{2m}A^2 = \frac{k}{2}B^2$ (via e.g. $A=1$, $B=1/\sqrt{mk}$) to get
\begin{align}
\int_{-\infty}^\infty \mathrm dp\int_{-\infty}^\infty \mathrm dq \,\delta(E-\frac{1}{2m}p^2-\frac{k}{2}q^2)
&=
B\int_0^\infty r\:\mathrm dr \int_0^{2\pi}\mathrm d\theta \, \delta(E-\frac{1}{2m}r^2)
\\&=
\frac{2\pi}{\sqrt{mk}}\int_0^\infty  \delta(E-\frac{1}{2m}r^2) r\:\mathrm dr.
\end{align}
From there, change variables to $u=r^2/2m$, so that $\mathrm du=r\,\mathrm dr/m$, which gives you 
\begin{align}
\int_{-\infty}^\infty \mathrm dp\int_{-\infty}^\infty \mathrm dq \,\delta(E-\frac{1}{2m}p^2-\frac{k}{2}q^2)
&=
\frac{2m\pi}{\sqrt{mk}}\int_0^\infty  \delta(E-u) \mathrm du,
\end{align}
and that reduces to the result you quote since $\int_0^\infty  \delta(E-u) \mathrm du=1$ whenever $E>0$.
A: The idea here is to use the following property of the delta function:
$$\int_{-\infty}^{\infty}\delta(f(x))g(x)\,\mathrm{d}x=\sum_{r}\frac{g(r)}{|f'(r)|}$$
Where the sum ranges over all values of $r$ such that $f(r)=0$. This is basically just what happens when you change variables to perform the integral.
If we let $f(p)=p^2/2m+kq^2/2-E$, then $f=0$ at $p_{\pm}=\pm\sqrt{2mE-kmq^2}$, which is real only for $kq^2\leq 2E$. We also have $|f'(p_{\pm})|=\sqrt{(2E-kq^2)/m}$, so long as $kq^2\leq 2E$. Thus, we can perform the $p$ integral to get
$$2\int_{-\sqrt{2E/k}}^{\sqrt{2E/k}}\mathrm{d}q\,\sqrt{\frac{m}{2E-kq^2}}=\sqrt{\frac{4m}{k}}\int_{-1}^{1}\frac{\mathrm{d}u}{\sqrt{1-u^2}}=2\pi\sqrt{\frac{m}{k}}$$
Which is exactly what you got!
I hope this helped!
