Find the density of $Y = a/(1 + X^{2})$, where $X$ has the Cauchy distribution.
MY SOLUTION
To begin with, let us remember that the Cauchy probability density function is given by \begin{align*} f_{X}(x) = \frac{1}{\pi(1+x^{2})}\quad\text{for}\quad x\in\textbf{R} \end{align*}
Consequently, the sought distribution is described as \begin{align*} F_{Y}(Y\leq y) &= \textbf{P}(Y\leq y) = \textbf{P}\left(\frac{a}{1+X^{2}} \leq y\right) = \textbf{P}\left(1+X^{2}\geq \frac{a}{y}\right)\\\\ & = \textbf{P}\left(|X|\geq \sqrt{\frac{a-y}{y}}\right) = \textbf{P}\left(X\geq \sqrt{\frac{a-y}{y}}\right) + \textbf{P}\left(X \leq -\sqrt{\frac{a-y}{y}}\right)\\\\ & = 1 - F_{X}\left(\sqrt{\frac{a-y}{y}}\right) + F_{X}\left(-\sqrt{\frac{a-y}{y}}\right) \end{align*}
where $y\in(0,a]$. Finally, we have \begin{align*} F_{X}(x) = \int_{-\infty}^{x}f_{X}(u)\mathrm{d}u = \int_{-\infty}^{x}\frac{\mathrm{d}x}{\pi(1+x^{2})} = \frac{\arctan(x)}{\pi} + \frac{1}{2}\end{align*}
I have two questions. Firstly, I would like to know if this approach is correct. Secondly, I would like to know if there is another way to solve this problem. Thanks in advance!
You can use the usual change of variables method.
Density of $X$ is
$$f_X(x)=\frac{1}{\pi(1+x^2)}\qquad,\,x\in\mathbb R$$
Note that $Y=\frac{a}{1+X^2}$ will have separate densities for $a>0$ and $a<0$.
Consider the case $a>0$.
The preimages $x_1,x_2$ for the 2-to-1 transformation are $$Y=\frac{a}{1+X^2}\implies \begin{cases}x=x_1(y)=\sqrt{(a-y)/y}&,\text{ if }x>0 \\\\ x=x_2(y)=-\sqrt{(a-y)/y}&,\text{ if }x<0 \end{cases}$$
And $$x\in\mathbb R\implies 0<y< a $$
Absolute value of the jacobian is
$$\left|\frac{\mathrm{d}x}{\mathrm{d}y}\right|=\frac{a}{2y^{3/2}\sqrt{(a-y)}}$$
Hence the density of $Y$ is
\begin{align} f_Y(y)&=f_X(x_1(y))\left|\frac{\mathrm{d}x}{\mathrm{d}y}\right|+f_X(x_2(y))\left|\frac{\mathrm{d}x}{\mathrm{d}y}\right| \\&=2\times\frac{1}{2\pi\sqrt {y(a-y)}}\mathbf1_{0<y< a} \end{align}
That is, pdf of $Y$ when $a>0$ is $$f_Y(y)=\frac{1}{\pi\sqrt {y(a-y)}}\mathbf1_{0<y< a}\tag{1}$$
Proceeding similarly for $a<0$, keeping in mind there are no negative quantities inside square roots yields the pdf
$$f_Y(y)=\frac{1}{\pi\sqrt {y(a-y)}}\mathbf1_{a< y<0}\tag{2}$$
The densities $(1)$ and $(2)$ make sense because $Y$ is of the form $Y=aZ$ where $Z\sim\text{Beta}(1/2,1/2)$, as suggested in the answer by @kimchilover using the fact that a standard Cauchy variable can be expressed as the ratio of two independent standard normal variables.