Harmonic oscillator in microcanonical ensemble Consider a hamiltonian of a simple classical pendulum
$$H=p^2+\omega q^2.$$
How can quantities such as $\langle p^2 \rangle$ or $\langle q^2\rangle$ can be calculated using the microcanonical measure?
 A: As far as I understand this average values are
$$
<p^2> = A^{-1} \iint_{-\infty}^\infty p^2\delta(p^2+\omega^2q^2-E)\ dpdq,
$$
and similar for $<q^2>$, where $E$ is fixed energy of a pendulum and
$$
A = \iint_{-\infty}^\infty \delta(p^2+\omega^2q^2-E)\ dpdq
$$
One can calculate integrals with the $\delta$-function directly or one can use the symmetry of the problem. If $x = \omega q$, then due to the $\delta$-function we have
$$
<p^2> + <x^2> = E,
$$
and due to the symmetry we have $<p^2> = <x^2>$. Hence $<p^2> = E/2$.
P.S. I think there should be $\omega^2$ in the Hamiltonian, not $\omega$.
Update. About $<p^2> + <x^2> = E$ equality. Probability density function for the microcanonical distribution has the form
$$
\rho(q,p) = A^{-1} \delta(H(q,p)-E).
$$
Here $A^{-1}$ is a normalization constant.
Because of main $\delta$-function property the only possible states $q,p$ of the pendulum are those, for which $H(q,p)=E$. After change of the variable from $q$ to $x$ we have $p^2 + x^2 = E$ for any possible state. Average of a constant equals to the same constant. Hence $<p^2 + x^2> = E$. Average of a sum is a sum of averages and we get what we need.
About $<p^2> = <x^2>$ equality. It is obvious after change of variables $p \leftrightarrow x$ in the integral.
