Uniform distribution and Exponential random variable mix Here's the question
Let X and Y be independent random variables, where X is uniformly distributed over (2,4) and Y is exponentially distributed with mean 3. Find the density of U=X/Y
Here's what I got: (3/2)e^(-u/3) 
I tried doing the PDF of both of them and divide them subbing in U for Y and it seems that's not the way to do it. I asked my professor for help and he told me that "I was on the right track and to keep thinking about it like that." However, I am at a complete loss as to what exactly I'm suppose to do.
Can anyone help me out with this one?
 A: Let $U=X/Y$ Then since $X$ and $Y$ are strictly positive.
$$\begin{align}F_U(u)~=~&\Pr(U\leq u)
\\[1ex] ~=~& \mathsf P(Y\geq uX)
\\[1ex] =~& \int_2^4 \mathsf P(Y\geq X/u\mid X=x)~f_X(x)\operatorname d x
\\[1ex] =~& \tfrac 1 2\int_2^4 \mathsf P(Y\geq x/u)\operatorname d x\quad\mathbf 1_{u\in(0;\infty)}
\\[1ex] =~& \tfrac 1 2\int_2^4 \mathsf e^{-x/3u}\operatorname d x\quad\mathbf 1_{u\in(0;\infty)}
\\[3ex] f_U(u) ~=~& \dfrac{\operatorname d~F_U(u)}{\operatorname d~u\qquad}\end{align}$$ 
A: Let $W=X/Y$. We find the cumulative distribution function $F_W(w)$ of $W$, that is, $\Pr(W\le w)$. Then one can differentiate to find the density. 
The joint density function of $X$ and $Y$ is $\frac{1}{6}e^{-y/3}$ on the strip $2\le x\le 4$, $0\lt y\lt\infty$. 
The probability that $W\le w$ is the probability that $X/Y\le w$, or equivalently the probability that $Y\ge \frac{X}{w}$. 
Draw the line $y=\frac{x}{w}$. We want the probability that $(X,Y)$ lands in the part $K_w$ of our strip that is above the line $y=\frac{x}{w}$. 
This is 
$$\iint_{K_w} \frac{1}{6}e^{-y/3}\,dx\,dy.$$
To evaluate the double integral, it may be useful to make a sketch of the region $K_w$. 
A: f(x) = 1/2 for 2≤x≤4 
 f(x) = 0 elsewhere (uniform distribution on [2,4]) 
g(y) = e^(-y/3)/3 for y≥0 
 g(y) = 0 elsewhere (exponential distribution with mean of 3) 
The density function of u, h(u) is then calculated this way: 
h(u) = Integral(-∞ to +∞)f(ux)g(x)|x|dx 
g(x) = 0 if x<0 so our lower bound is 0. 
 x will always be positive so |x| = x on our interval and: 
h(u) = Integral(0 to +∞)f(ux)xe^(-x/3)dx/3 
let us change the variable to t = ux 
 dx = dt/u and: 
 h(u) = Integral(0 to +∞)f(t)te^(-t/(3u))dt/(3u²) 
 f(t) = 1/2 on [2,4] and 0 elsewere, so: 
 h(u) = Integral(2 to 4)te^(-t/(3u))dt/(6u²) 
and when I plugged this into wolframalpha because I did NOT feel like actually integrating this by hand I got:
(e^(-4/(3 u))(-3 u+e^(2/(3 u))(3 u+2)-4))/(2 u) which was the correct answer.
