Different ways of calculating a bivariate probability The question is as follows: If two random variables $X$ and $Y$ are independent with marginal pdfs $f_x(x)=2x, 0\leq x\leq 1$ and $f_{Y}(y)=1, 0\leq y\leq 1$, calculate $P\left(\frac{Y}{X}>2\right)$.
My attempt: Since both RV are independent then it follows that $f_Y(y)f_X(x)=k(2x)$ let us now solve for the missing $k$, in which case $\int_0^1\int_0^1 2xkdxdy=1$, from which $k=1$. Fine.
One approach: $P(Y>2x)=1-P(Y<2x)$. We draw the line $y=2x$ on the xy-plane to find out that when $x$ changes from $0$ to $1$, $y$ changes from $0$ to $2x$, which means
\begin{equation}
P(Y<2x)=\int_{0}^{1}\int_{0}^{2x}2xdydx=4/3 > 1 \ \ \text{(contradiction)}.
\end{equation}
The second approach is  to work with $P(\frac{X}{Y}>2)$ which means that now $Y>2X$ and by the same logic using $1\ge Y>2x>0$ we have $\int_{0}^{1}\int_{2x}^{1}2xdydx=-1/3 < 0$ (contradiction).
A third approach: use $1\ge Y>2x>0$ and divide it by two so to get that $Y\in(0,1)$ and $x\in(0,\frac{Y}{2})$ and if I use this, it follows that:
\begin{equation}
P(Y>2x)=\int_{0}^{1}\int_{0}^{\frac{y}{2}}2xdxdy=1/12
\end{equation}
The above equation is the correct one, however, my problem is that I don't understand why my other suggestions didn't work out.
 A: It's easy to get trapped like this:
$$
\begin{align}
P(Y > 2X) &= E(P(Y>2X|X)) \\
&\color{red}{\neq} \int_{x=0}^\color{red}{1} P(Y>2x)f_X(x)dx = \int_0^1 (1-2x)2xdx\\
&= 2\int_0^1 x - 4\int_0^1x^2dx \\
&= 2(1)^2/2 - 4(1)^2/3 = 1 - 4/3 = -1/3
\end{align}
$$
Instead, noting that $Y>2x$ is impossible for $x>1/2$,
$$\begin{align}
P(Y > 2X) &= E(P(Y>2X|X)) \\
&\color{red}{=} \int_{x=0}^\color{red}{1/2} P(Y>2x)f_X(x)dx = \int_0^{1/2} (1-2x)2xdx \\
&= 2\int_0^{1/2} x - 4\int_0^{1/2}x^2dx \\
&= 2\left(\frac12\right)^2/2-4\left(\frac12\right)^3/3 = 1/4 - 1/6 = 1/12\end{align}.$$
For any general random variables $X,Y$, the value $P(Y>2X)$ is an integral over two variables. To make this intuitive, this is also $E_XE_Y(1_{Y>2X}))$. So you should write out the first line of working like I did instead of skipping it. To force yourself to consider these cases, I'd write
$$\begin{align}
P(Y > 2X) &= E(P(Y>2X|X)) \\
&= \int_{x\in\mathbb{R}} \int_{y\in\mathbb{R}}1_{y>2x}f_Y(y)dy f_X(x)dx, \qquad f_X(x) = 2x\cdot1_{x\in[0,1]}\\
&= \int_{x=0}^1 \int_{y\in\mathbb{R}}1_{y>2x}f_Y(y) dy \ 2x \ dx, \qquad f_Y(y) = 1\cdot 1_{y\in[0,1]}\\
&=\int_{x=0}^1\int_{y=0}^1 1_{y>2x} 2x dydx \quad \text{now draw a picture to see}\\
&=\int_{x=0}^{1/2}\int_{y=2x}^1 2x dydx\\
&= \int_0^{1/2} (1-2x)2xdx \\
&= 2\int_0^{1/2} x - 4\int_0^{1/2}x^2dx \\
&= 2\left(\frac12\right)^2/2-4\left(\frac12\right)^3/3 = 1/4 - 1/6 = 1/12\end{align}.$$
Similarly
$$
\begin{align}
P(Y < 2X) &= E(P(Y<2X|X)) \\
&= \int_{x=0}^1 P(Y<2x)f_X(x)dx \color{red}{\neq} \int_0^1 \color{red}{(2x)}2xdx\\
&= \int_0^1x^2dx \\
&= 4(1)^2/3 = 4/3
\end{align}
$$
because when $x>1/2$, we have $P(Y<2x)=1$, not $2x$.
