Being θ an aleatory variable with a uniform distribution function on the interval (-pi/2 , pi/2). Knowing that x = cos θ. How can I prove that this is a probability density function?
Can anyone here explain me how I get to know the analytic expression?
First calculate the CDF of your uniform rv.
Then, observe that
$$P(X> x)=F_{\Theta}(arccos (x))-F_{\Theta}(-arccos(x))=\frac{2}{\pi}arccos(x)$$
Thus, just using the definition of CDF you get
$$F_X(x)=1-\frac{2}{\pi}arccos(x)$$
Deriving you get the requested density
$$f_X(x)=\frac{2}{\pi\sqrt{1-x^2}}\mathbb{1}_{(0;1)}(x)$$
EDIT: if you do not like the use of the indicator function, the density can be expressed in the following form
$$ f_X(x) = \begin{cases} \frac{2}{\pi\sqrt{1-x^2}}, & \text{if $x \in (0;1)$ } \\ 0, & \text{elsewhere} \end{cases}$$
To prove that $f_X(x)$ is a nice density you can verify that all the density's properties are attained
$f_X(x)\geq 0$, $\forall x$
$\int_{\infty}^{\infty}f_X(x)dx=1$
EDIT2: Here are the passages for the integral
$$\int_0^1\frac{2}{\pi\sqrt{1-x^2}}dx=\frac{2}{\pi}\Big[-arccos(x)\Big]_0^1=\frac{2}{\pi}\cdot\frac{\pi}{2}=1$$
The same properties can be verified directly on the CDF
$F(-\infty)=0$
$F(\infty)=1$
$\frac{d}{dx}F_X(x)\geq 0$, $\forall x$