The joint probability function of $(X,Y)$ is given by: $$f_{(X,Y)}(x,y) = e^{-x}$$ Which is defined for the values: $$ 0 \le y\le x<\infty$$ $$0\text{ elsewhere}$$
How would I find the cumulative distribution function of $(X,Y)$?
I know that the area that I am integrating in is a infinite triangle(if drawn in a 2d plane) so I set up my integration as:
$$\int_0^\infty \int_y^\infty e^{-x}\,dx\,dy$$
After the inside integral is evaluated I get: $$\int_0^\infty e^{-y}dy$$
Which then evaluates to 1.
But the answer is supposed to be: $$ 0,\quad x<0 \quad \text{or} \quad \ y\ <0$$ $$1-e^{-y}-ye^{-x},\quad 0\le y\le x$$ $$1-e^{-x}-xe^{-x},\quad y>x\ge0$$
I have completely no idea how the answer came about and also why are these instances where y is greater than x even though the values specifically state that y is less than x?
