How do I derive the correct distribution of $u$? Suppose that $\tau\stackrel{idd}{\sim}\mathcal{C}^+(0,1)$, here $\mathcal{C}^+(0,1)$ denotes the standard half-Cauchy distribution: $X\sim\mathcal{C}^+(0,1)$ then $X$ has  density $f_X(x) = (2/\pi)(1+x^2)^{-1}$.
I want to find the distribution of $u$, where $u$ is given by $$u = (1+\tau^2)^{-1}$$
Hence I need to find $P(u\leq x)$. I've tried to do so in the following way $$P(u\leq x)= P((1+\tau^2)^{-1}\leq x) = P\bigg(\dfrac{1}{1+\tau^2}\leq x\bigg)=\ldots = 1 - P\bigg(\tau\leq \sqrt{\dfrac{1}{x} -1}\bigg)$$
Since $\tau$ has density function $f_X(x) = (2/\pi)(1+x^2)^{-1}$, I think this would mean that $$P(u\leq x) = 1 -\displaystyle\int_{-\infty}^{\sqrt{1/x -1}}(2/\pi)(1+x^2)^{-1}dx$$ However, this integrand is apparently equal to 
$$\bigg[\dfrac{2\tan^{-1}(x)}{x}\bigg]^{\sqrt{1/x -1}}_{-\infty}$$ and this is not correct (apparently $u$ has a Beta distribution with parameters $1/2$ and $1/2$).
Question: How do I find the correct distribution of $u$?
 A: Notice that
$$P\left(\tau^2\leq \dfrac{1}{x} -1\right)\neq P\left(\tau\leq \sqrt{\dfrac{1}{x} -1}\right),$$
for all $x\in\mathbb R$. Assuming the distribution of $\tau$ is a right-half-Cauchy, we are only to consider $x>0$. Since for $x\gt 1 $, it is always true that $$\tau^2\ge 0 \gt \dfrac{1}{x} -1,$$
it follows that
$$P\left(\tau^2\leq \dfrac{1}{x} -1\right)=0,\quad\text{for}\;x>1.$$
It is only for $x\in[0,1]$ that it is possible that 
$$\tau^2\le  \dfrac{1}{x} -1.$$
Therefore
$$P(u\leq x) = \begin{cases} 0 &,\;\; x<1\\[1.5ex] 1-\int_{0}^{\sqrt{1/x -1}} \frac{2}{\pi}(1+\tau^2)^{-1}d\tau &,\;\;x\in[0,1]\\[2ex]1&,\;\;x>1 \end{cases}$$
Next, by variable substitution with
$$ \tau=\sqrt{\frac{1}{y}-1} \;\Rightarrow d\tau=-\frac{1}{2y^2\sqrt{\frac{1}{y}-1}}dy,$$
the integral can be written as
$$ \int_{0}^{\sqrt{1/x -1}} \frac{2}{\pi}(1+\tau^2)^{-1}d\tau =\frac{1}{\pi} \int_{x}^{1} y^{-\frac{1}{2}}(1-y)^{-\frac{1}{2}}dy.$$
Finally,
$$ \int_{0}^{1} y^{-\frac{1}{2}}(1-y)^{-\frac{1}{2}}dy = \pi,$$
so that
$$1-\frac{1}{\pi} \int_{x}^{1} y^{-\frac{1}{2}}(1-y)^{-\frac{1}{2}}dy = \frac{1}{\pi} \int_{0}^{x} y^{-\frac{1}{2}}(1-y)^{-\frac{1}{2}}dy,$$
which implies that the cumulative distribution can be written as
$$P(u\leq x) = \frac{\int_{0}^{x} y^{-\frac{1}{2}}(1-y)^{-\frac{1}{2}}dy}{\int_{0}^{1} y^{-\frac{1}{2}}(1-y)^{-\frac{1}{2}}dy} ,\quad x\in[0,1]$$
which is the Beta distribution with parameters $1/2$ and $1/2$.
