Ensemble of harmonic oscillators I have some problems with problem 2.3 from Reif's Fundamentals of statistical and thermal physics:

Consider an ensemble of classical one-dimensional harmonic oscillators.
a) If we assume that a in the displacement formula $x=A\cos(wt+a)$ is uniformly distributed in $[0,2\pi]$ we get the distribution for position $P(x) dx= dx/(\pi \sqrt{A^2-x^2})$

So far so good. Now b) says

suppose the energy of the oscillators lie in the range between $E$ and $E+dE$, find $P(x)\text dx$ by taking the ratio of that volume of phase space between $x$ and $x+\text dx$ and this energy range to the total volume of phase space in this energy range. Show that this gives the same answer as in a).

For $x$ around $0$, this is just a rectangle with width $\text dx$ and height $\text dE$, and the total volume is given by the ellipse formula $\pi r_1r_2$. After some algebra, this doesn't lead to the same answer as in a).
Should a) give the same answer as in b)? If so, why?
And is the probability distribution specified by saying that we have an ensemble in equilibrium, or do we need additional assumptions?
Basically can some clarify what kind of assumptions or approximations one is supposed to make to have a) correspond to b) ?
 A: Well you have detected a difference between a) and b) so you are doing better than me. But I will try to answer your question anyway. 
Let's review one way of doing a). Let's look at the trajectory of the oscillator in phase space. First let me explain phase space for completeness. Phase space is the space of states that the oscillator can be in. The state of an oscillator is specified not just by the position of the oscillator but also by its momentum. It's convential do view the phase space of a 1d oscillator as a plane with the $x$ axis being the position and the y axis being the momentum. 
That being said we are ready to look at the trajectory of the oscillator in phase space. You can convince yourself it is the circle. (It will really be an ellipse, but lets choose units where $A=k=m=1$. Then it is a circle.) The radius of the circle is $x^2 + p^2 = k x^2 + p^2/m = 2E$. So the radius of the circle is the energy. The angular coordinate is phase space is just the phase of the oscillator. 
Now let's think about a). Taking the phase $a$ to be uniformly distributed basically says we are picking a point on the circle randomly. The question is asking what is the probability of a random point on the circle having $x$-coordinate between $x$ and $x+dx$. Another way of saying is is asking, for a given value of $x$, what is the fraction of the circle between $x$ and $x+dx$. So you can imagine drawing vertical lines in the plane at $x$ and $x+dx$. You will see more of the circle lies in between these vertical lines when the given $x$ is at the far left or right of the circle. You have quantified this effect exaclty in the statement of your question in explaining part a).
Now let's think about part b). It says the energy is restricted to be between $E$ and $E+dE$. We know that $r^2$ in phase space is the energy, so this energy constraint just says the points in phase space to be considered comprise a circle. b), then, is asking what fraction of this circle lies between $x$ and $x+dx$. But this is exactly what a) asked. So the answer is the same. I will leave the details to you. I hope this helps.
