I have random variables $X$ and $Y$ with joint density given as $$f(x,y) = \begin{cases} 1/2, & |x|+|y| \le 1 \\ 0, & \text{otherwise}. \end{cases} \\ $$

To find the marginal densities for each I did this : $$ f_X(x,y) = \int_{-1}^{1-|x|}\frac{1}{2}\,dy = \frac{1}{2}(1-|x|)+\frac{1}{2}, \ \text{where} \ |x|+|y| \le 1, $$ and then similarly : $$ f_Y(x,y) = \int_{-1}^{1-|y|}\frac{1}{2}\,dx = \frac{1}{2}(1-|y|)+\frac{1}{2}, \ \text{where} \ |x|+|y| \le 1. $$ Is this correct? I am not sure about "$-1$" and boundaries in general here.

Thank you.


The boundaries of this diamond are symmetric. For $y$ under $x$ fixed: from $-(1-|x|)$ to $1-|x|$, and for $x$ under $y$ fixed: from $-(1-|y|)$ to $1-|y|$.