Division of Two Random Variables

I'm given a simple PDF: $$f_{x,y}(x,y) = \begin{cases} 2 & \quad 0\leq x,y\leq1; \ \ \ x+y \leq 1 \\ 0 & \quad else \end{cases}$$ And I want to find the density of $W = \frac{Y^2}{X}$.

What I did first is find the intersection of $y^2/w$ and $1-y$ to get that $y = \frac{1}{2}( \sqrt{w \cdot (w+4)}-w)$ and $x =\frac{1}{2}(2+ \sqrt{w \cdot (w+4)}+w)$. Then I calculated the CDF of $W$:

$$F_W(w) = \int P[W\leq w]$$ $$=\iint\limits_{\frac{y^2}{x}\leq w} 2dx\,dy$$ $$\implies F_W(w) = \int\limits_0\limits^{1/2\big( \sqrt{w (w+4)}-w\big)}\frac{d}{dw}\int\limits_{y^2/w}\limits^12\ dx\,dy$$ And then working this out seems to give the correct answer (integrating $w$ from $0\to \infty$ yields an answer of $1$).

My question is, why are the bounds on $x$ what they are? I was fighting with this question for a while until I got it work, but instinctively I feel that $x$ should go from $\frac{y^2}{w} \to \frac{1}{2}(2+ \sqrt{w \cdot (w+4)}+w)$

I suppose this is more of a calculus question than a probability one, but can someone shed some light on this for me?

Thank you!

• $(x,y)\in X^2/Y$? What does this mean? – zhoraster Dec 18 '16 at 19:08
• Are you asking whether or not I wrote it right? Or are you asking me to actually think about it? – Lerbi Dec 18 '16 at 19:09
• I don't understand what you have written, that's why I'm asking. Do you understand it yourself? – zhoraster Dec 18 '16 at 19:10
• I think I wrote it wrong. I'll edit it. – Lerbi Dec 18 '16 at 19:12

$F_W(w) = \mathbb P(W \le w)$ is the integral of the joint density over the region where $y^2/x \le w$. For $x,y,z>0$ this can be expressed as $x \ge y^2/w$ or $y \le \sqrt{xw}$. A sketch will be useful.
Using a Dirac delta method, what you want to compute is the pdf of W $$f_W(w)=2\int_0^1 dx \int_0^{1-x}dy\ \delta\left(w-y^2/x\right)\ .$$ Changing variables $y=\sqrt{xt}$, we get $$f_W(w)=2\int_0^1 dx \int_0^{(1-x)^2/x}dt \frac{x}{2 \sqrt{t x}}\delta(w-t)\ .$$ $$=\frac{1}{\sqrt{w}}\int_0^1 dx\ \sqrt{x}\Theta\left(0\leq w\leq (1-x)^2/x\right)$$ $$=\frac{\Theta(w)}{\sqrt{w}}\int_0^{\frac{w+2}{2}-\frac{1}{2} \sqrt{w^2+4 w}}dx\ \sqrt{x}$$ $$=\Theta(w)\frac{\left(w-\sqrt{w (w+4)}+2\right)^{3/2}}{3 \sqrt{2 w}}\ .$$ The upper bound to $x$ is obtained by the intersection of the conditions $0\leq w\leq (1-x)^2/x$, $0\leq x\leq 1$ and $w>0$. Here, $\Theta(x)=1$ if $x>0$ and $0$ otherwise.