Find $P(X < Y)$ where X,Y are continuous function Let $f$ a density function such that 
$f(x,y)=\left\{ \begin{array}{lcc}
            2&   if  & x+y \leq 1, x,y\geq0 \\
             \\ 0 &  \text{other case}
             \end{array}
   \right.$
Find $P(X < Y)$ and $P(X+Y<1/2)$
I try this:
$P(X<Y)=\int_0^\infty\int_0^x2\,dy\,dx=\infty$ but that is a bad result. I'm stuck here can someone help me?
I have the same problem with $P(X+Y<1/2)$
 A: Guide:
To be found are:$$\int\int[x<y]f(x,y)dydx$$where $[x<y]$ takes value $1$ if $x<y$ and takes value $0$ otherwise.
Secondly and similarly to be found is:$$\int\int[x+y<0.5]f(x,y)dydx$$
In your effort you seem to confuse the function $f(x,y)$ with the function prescribed by $(x,y)\mapsto 2$ if $x,y>0$ and $(x,y)\mapsto 0$ otherwise. 
Observe that $f(x,y)$ only takes value $2$ on the triangle that you describe.
A: Note that $(X,Y)$ is uniformly distributed on the right triangle $T$ in the first quadrant with coordinates $(0,0), (1,0), (0,1)$ (which has area $1/2$). In particular
$$
P((X,Y)\in A)=\frac{m(A\cap T)}{m(T)}=2m(A\cap T)
$$
where $m$ denotes Lebesgue measure (area) and $A\subset \mathbb{R^2}$. In particular put $A=\{(x,y)\in\mathbb{R^2}\mid x+y< 1/2 \}$. Then
$$
P((X,Y)\in A)=P(X+Y\lt1/2)=2m(A\cap T)=2\times \frac{1}{2}\times 0.5\times0.5=\frac{1}{4}
$$ 
since $A\cap T$ is a right triangle in the first quadrant with coordinates $(0,0), (1/2, 0), (0,1/2)$.
One can reason geometrically to determine $P(X\lt Y)$ as well.
