I am diving into some statistics as self study and I am currently reading the book "Principles of Statistics" by M.G. Bulmer.
In chapter 3, there is a problem that goes:
Suppose that a machine gun is mounted at a distance $b$ from an infinitely long straight wall. If the angle of fire measure from the perpendicular from the gun on the wall is equally likely to be anywhere between $-\frac{\pi}2$ and $+\frac{\pi}2$ and if $X$ is the distance of a bullet from the point on the wall opposite the gun, show that $X$ follows the Cauchy distribution: $$f(x)=\frac{b}{\pi(b^2+x^2)} \quad,\, -\infty<x<\infty$$
I tried already calculating the answer using the Sin of the all possible angles, but I end up with results that are completely differente as the one from the book. My reasoning is that, given that all the angles are equally probable, my probability function should depend only of the $b$ parameter and $x$. So I define $x$ as:
$$\sin(\pi) \cdot b = x$$
But from there, every answer that I obtained is wrong.
Can someone illustrate me how to arrive to the above equation, given the problem?