I'm trying to determine the distribution of the x-coordinate (uniformly distributed) on the unit circle (density function).
I've seen some threads on this, such as this, where they use the method of the marginal density. I'm wondering why one can't simply use the formula for the density function for a uniformly distributed function $$\frac{1}{b-a}$$ for $x \in \mathrm{[a,b]}$, which would give the result $\frac{1}{1-(-1)} = \frac{1}{2}?$
Here is an illustration using simulation of the case in which the points are uniformly distributed within the unit disk.
I generate 50,000 points in the square with vertices at $(-1,-1)$ and $(1,1)$ and discard those outside the circle. Then look at a histogram of the $x$-coordinates of the remaining 39,236 points (within the circle), which gives a pretty good idea what the density function looks like.
Analytically, you can treat the joint distribution of $x$ and $y$ as a uniform distribution on the unit circle and integrate out $y$ to get the marginal distribution on $x$. This should not be a difficult integration problem. (The integrand is a constant; the main information is in the limits of the integrals.)
I believe that the problem is a little more difficult if the points are distributed at random on the $circumference$ of the unit circle.