Find CDF of Z=X/Y from PDF of X, Y Given a joint probability density function of $X$ and $Y$
$$f(x, y)= \begin{cases} \frac{8}{\pi^2\left[1+(x^2+y^2)^2\right]} & x>0 \text { and } y>0 \\ 0, & \text {otherwise} \end{cases}$$
I now want to find the cumulative distribution function of $Z=X/Y.$ How can I do this?
 A: Expanding on @MichaelHardy's answer, we get $$\left(\frac{\pi}{2}-\arctan\frac{1}{z}\right)\int_0^\infty\frac{8}{\pi^2}\frac{r \, dr}{1+r^4}=\arctan z\cdot\frac{4}{\pi^2}[\arctan r^2]_0^\infty=\frac{2}{\pi}\arctan z.$$In other words, $Z$ has the folded equivalent of a standard Cauchy distribution.
A: \begin{align}
&\Pr(Z \le z) \\[8pt] = {} & \Pr(X\le zY) \\[8pt]
= {} & \Pr( (X,Y) \text{ is above the line of} \\
& \qquad\qquad\quad \text{slope $1/z$ through $(0,0)$}) \\[8pt]
= {} & \int_{\arctan(1/z)}^{\pi/2} \int_0^\infty f(r\cos\theta,r\sin\theta) r\,dr\,d\theta \\[8pt]
= {} & \frac 8 {\pi^2} \int_{\arctan(1/z)}^{\pi/2} \underbrace{\int_0^\infty \frac 1 {1 + r^4} r\,dr}_\text{No $\theta$ appears here.} \,\,\, d\theta \\[10pt]
= {} & \frac 8 {\pi^2} \left( \frac \pi 2- \arctan\frac 1 z \right) \int \cdots \\[8pt]
= {} & \frac 8 {\pi^2} (\arctan z) \int\cdots \\[8pt]
= {} & \frac 8 {\pi^2} (\arctan z) \int_0^\infty \frac 1 {1+u^2}\, \frac{du} 2 \\[8pt]
= {} & \frac 2\pi \arctan z.
\end{align}
Thus $Z = |W|$ where $W$ has a standard Cauchy distribution.
