Now let me suppose that $X$ and $Y$ are valued in $\mathbb{R^+} = (0, \infty)$ and $S \colon = X/Y$.
Then we have
$$
\begin{cases}
X = \frac{RS}{\sqrt{1+S^2}} \\
Y = \frac{R}{\sqrt{1+S^2}}
\end{cases}
$$
Denote the density of $(X, Y)$ and $(R, S)$ by $f(x, y)$ and $g(r, s)$ respectively.
We can prove (maybe has been proved in the probability course) that
$$
g(r, s) = \left.
f\left( \frac{rs}{\sqrt{1+s^2}}, \frac{r}{\sqrt{1+s^2}} \right) \middle/
\left|
\begin{pmatrix}
r_x & r_y \\
s_x & s_y
\end{pmatrix}
\right|
\right.
$$
where $r_x = \frac{\partial r}{\partial x} = \frac{x}{\sqrt{x^2+y^2}}$ and it is similar to calculate9 $r_y, s_x, s_y$. Inserting into the above equation yields that
$$
g(r, s) = \left.
f\left( \frac{rs}{\sqrt{1+s^2}}, \frac{r}{\sqrt{1+s^2}} \right) \frac{r}{1+s^2}\right.
$$
Then by integrating on $s$ the marginal density $g(r)$ of $R$ is given the following formula.
$$
g(r) = \int_0^\infty \left.
f\left( \frac{rs}{\sqrt{1+s^2}}, \frac{r}{\sqrt{1+s^2}} \right) \frac{r}{1+s^2}
\right.\ ds
$$
If we add the assumption that $X$ and $Y$ are indenpent which implies that $f(x, y) = f_X(x) f_y(y)$. Substituting $f$ by $f_Xf_Y$ simplify the formula.
$$
g(r) = \int_0^\infty \left.
f_X\left( \frac{rs}{\sqrt{1+s^2}}\right)f_Y\left(\frac{r}{\sqrt{1+s^2}} \right) \frac{r}{1+s^2}
\right.\ ds
$$
Actually I do think the formula is ugly which makes me suspend that if there is any wrong above.
Update: I have veirfied the formula and it should be correct.
For uniform, $f_X(x) = I(0 < x < 1)$ and $f_Y(y) = I(0 < y< 1)$.
Hence
$$
g(r) = \int_0^\infty I\left(0<\frac{rs}{\sqrt{1+s^2}}<1\right) I\left(0<\frac{r}{\sqrt{1+s^2}}<1\right) \frac{r}{1+s^2}\ ds
=\int_D \frac{r}{1+s^2} ds
$$
where $D$ is the joint of $D_1 = \{s: 0<\frac{rs}{\sqrt{1+s^2}}<1\}$ and $D_2 = \{0<\frac{r}{\sqrt{1+s^2}}<1\}$.
Case 1: $0<r<1, D = \mathbb{R}^+, g(r) = \frac\pi2 r$;
Case 2: $1 \le r < \sqrt2, D = (\sqrt{r^2-1}, 1/\sqrt{r^2-1}), g(r) = r(\tan 1/\sqrt{r^2-1} - \tan \sqrt{r^2-1})$;
Case 3: $\sqrt 2 \le r, D = \phi, g(r) = 0$.