This is a problem from Hans-Otto Georgii's textbook.
Recall the situation of Bertrand’s paradox, and let X be the distance of the random chord to the centre of the circle. Find the distribution density of X if
(a) the midpoint of the chord is uniformly distributed on the disk $|x|<r$,
(b) the angle under which the chord is seen from the centre of the circle is uniformly distributed on the interval $\Omega_2$ = $[0,\pi]$.
The solutions are given as: a. the distribution density of X on [0,r] is $\rho_1(x)$ = $2x/r^2$.
b. $\rho_2(x) = 2/(\pi*\sqrt(r^2 - x^2))$, x $\in [0,r]$.
edit: the overall approach is to derive cdf then differentiate.
a. cdf = $\pi x^2/ \pi r^2$; pdf = $2x/r^2$ .
my thoughts for b:
The probability formula for continuous uniform distribution in my textbook: $U_\Omega(A) = \lambda^n(A) / \lambda^n(\Omega)$. So I tried expressing cdf like some probability:
$\Omega = [0,\pi]$, so $\lambda^n(\Omega) = \pi$. A is the range of angle POQ when the distance is in $[0,x]$. PQ is the chord.
A = $2arccos(x/r)$ for x in $[0,x]$.
cdf = $2arccos(x/r) / \pi$; pdf = $- 2 / \pi \sqrt(r^2 - x^2)$.
However there is an extra negative sign here. could anybody help correct my workings?

