Eigenvalue limiting distribution $\frac{1}{2\pi} \int_{f(w)\leq x} dw $ I would like to compute the limiting distribution given as $$D(x) =\dfrac{1}{2\pi} \int_{f(w)\leq x} dw $$
where $f(w)$ is  given as 
$$f(w)=\dfrac{b}{\sin(\frac{w}{2})}$$  
where  $w \in [0, 2\pi]$ and $b \in [-1, 1]$.
My question is how $D(x)$ can be computed ?
Any help and suggestions are welcomed.
 A: The quantity $\int_{f(w) \leq x}dw$ is the measure of the set of all $w \in [0,2\pi]$ such that $f(w) \leq x$.
Another way we could write this integral is
$$
\int_{f(w) \leq x}dw = \int_0^{2\pi} \mathbf{1}_{(-\infty,x]}(f(w))\,dw,
$$
where $\mathbb{1}_S$ is the characteristic function on a set $S$, defined as
$$
\mathbb{1}_S(t) = \begin{cases}
1 & \text{if } t \in S, \\
0 & \text{if } t \notin S.
\end{cases}
$$
The function $f(w) = b/\sin(w/2)$ is convex and symmetric about $w=\pi$. Here's a plot for the case $b=1$:

The first thing to note is that $f'(\pi) = 0$ and $f(\pi) = b$. Thus $f(w) \geq b$ for all $w \in [0,2\pi]$, so if $x \leq b$ then
$$
\int_{f(w) \leq x}dw = 0.
$$
If $x > b$ then this integral will be nonzero. Here's the plot of $f(w)$ with $b=1$ again, this time with a horizontal line with height $x=2$:

We see that the set of all $w$ for which $f(w) \leq 2$ is an interval whose endpoints are approximately $w=1$ and $x=5.2$, so the measure of this set is approximately $4.2$. In symbols, for $b=1$ we have
$$
\int_{f(w)\leq 2} dw \approx 4.2.
$$
If we want to compute this exactly, because of the convexity of $f$ we only need to calculate the locations of the points $w$ for which $f(w) = 2$ and subtract them. Using mathematica I get that $f(w) = 2$ when
$$
w \approx 1.0472 \quad \text{and} \quad w \approx 5.23599,
$$
so a more accurate approximation is
$$
\int_{f(w)\leq 2} dw \approx 4.18879.
$$
Using these ideas we can determine $\int_{f(w) \leq x}dw$ numerically for various values of $x$.
For this particular case, however, we can determine the integral exactly. The equation
$$
\frac{b}{\sin(w/2)} = x
$$
can be solved exactly for $w$. For $x > b$ there are two solutions, so let's pick the one with $w < \pi$. This is
$$
w_1 = 2 \arcsin(b/x).
$$
The other solution is $> \pi$:
$$
w_2 = 2\pi - w_1 = 2\pi - 2\arcsin(b/x).
$$
Thus the distance between these two points is
$$
w_2 - w_1 = 2 \pi - 4\arcsin(b/x).
$$
This distance is precisely the length of the interval for which $b/\sin(w/2) \leq x$, hence
$$
\int_{f(w) \leq x}dw = \begin{cases}
0 & \text{if } x \leq b, \\
2 \pi - 4\arcsin(b/x) & \text{if } x > b.
\end{cases}
$$
