We have a joint probability distribution $f_{X,Y}(x,y)=\frac{1}{10}$, defined over the domain $(x,y)\in[-1,1]\times[-2,2]\cup[1,2]\times[-1,1]$. From this, I need to find the conditional PDFs $f_{X|Y}(x|y)$ and $f_{Y|X}(y|x)$.
I have figured out the marginal PDFs,
\begin{align*} f_X(x)&=\left\{\begin{array}{lr}\frac{2}{5},&-1\leq x\leq 1\\ \frac{1}{5},&1<x\leq2\end{array}\right.\\ \\ f_Y(y)&=\left\{\begin{array}{lr}\frac{2}{10},&-2\leq y<-1\\\frac{3}{10},&-1\leq y\leq 1\\ \frac{2}{10},&1<y\leq 2\end{array}\right. \end{align*}
However, am stuck on how to find the conditionals, due to the various domain constraints. I thought about splitting it up into two/three areas, and then finding $f_{X|Y\in a}(x)$, but I wasn't sure how to move from this partition into a single function for $X|Y$ and $Y|X$, and every other idea I think of won't normalise.
Note: I need to eventually find the variances of $X$ and $Y$ using the the expectation and variance of $Y|X$ and $X|Y$, I'm assuming with the law of total variance? If the functions stay split up, I'm assuming I just evaluate each section individually and then add them up?
$\begin{align} f_{X,Y}(x,y) & =\begin{cases}1/10 & : (x,y)\in [-1,1]\times[-2,2]\cup[1,2]\times[-1,1] \\ 0 & : \text{elsewhere} \end{cases} \\[3ex] f_X(x) & =\begin{cases}\int_{-2}^2 1/10 \operatorname d y & : x\in [-1,1] \\ \int_{-1}^{1} 1/10 \operatorname d y & : x\in(1, 2] \\ 0 & : \text{elsewhere} \end{cases} \\[1ex] & =\begin{cases}2/5 & : x\in[-1,1] \\ 1/5 & : x\in (1,2] \\ 0 & : \text{elsewhere} \end{cases} \\[3ex] f_{Y\mid X}(y\mid x) & =\frac{f_{X,Y}(x,y)}{f_X(x)} \\[1ex] & =\begin{cases}1/4 & : x\in[-1,1], y\in[-2,2] \\ 1/2 & : x\in (1,2],y\in[-1,1] \\ 0 & : \text{elsewhere} \end{cases} \\[3ex] \mathsf E_{Y\mid X}[Y\mid X] & = \begin{cases} \int_{-2}^{2} y /4 \operatorname d y & : x\in[-1,1]\\\int_{-1}^{1} y /2\operatorname d y & : x\in(1,2]\\ 0 & : \text{elsewhere} \end{cases} \\[1ex] & = 0 \\[3ex] \mathsf E_{Y\mid X}[Y^2\mid X] & = \begin{cases} \int_{-2}^{2} y^2 /4 \operatorname d y & : x\in[-1,1]\\\int_{-1}^{1} y^2 /2\operatorname d y & : x\in(1,2]\\ 0 & : \text{elsewhere} \end{cases} \\[1ex] & = \begin{cases}4/3 & : x\in[-1,1] \\ 1/3 & : x\in (1,2]\\ 0 & : \text{elsewhere} \end{cases} \\[3ex] \mathsf {Var}[Y] & = \mathsf E_X[\mathsf E_{Y\mid X}[Y^2\mid X]]-\mathsf E_X[\mathsf E_{Y\mid X}[Y\mid X]]^2 \\[1ex] & = \int_{-1}^1 4/3\times 2/5 \operatorname d x + \int_{1}^2 1/3\times 1/5\operatorname d x \\[1ex] & = \frac{17}{15} \end{align}$
etc.
To verify that the conditional probability density functions ensure that they (1) are strictly increasing and (2) the integral over the conditional domain is equal to 1.
Our $f_{Y\mid X}$ does not decrease when progressing along the interval of $Y$ for any fixed value of $X$. It is in fact constant for each possible value of $X$ (though a different constant for different values).
$\begin{align} f_{Y\mid X}(y\mid x) & =\begin{cases}1/4 & : x\in[-1,1], y\in[-2,2] \\ 1/2 & : x\in (1,2],y\in[-1,1] \\ 0 & : \text{elsewhere} \end{cases} \end{align}$
Next we integrate with respect to $y$ over the entire conditioned domain for all given values of $X$. Thus verifying that the conditional measure is $1$ for all possible values of $X$ (and $0$ elsewhere). That is, it's the indicator function for the domain of $X$; as it should be. (We have ensured that: $\mathsf P(Y\in \Omega_Y \mid X=x) = \operatorname{\bf 1}_{\Omega_X}(x)$)
$\begin{align}\int_{\Omega_Y\mid X=x} f_{Y\mid X}(y\mid x)\operatorname d y & = \begin{cases}\int_{-2}^2 1/4\operatorname d y & : x\in [-1,1] \\ \int_{-1}^1 1/2 \operatorname d y & : x\in (1,2]\\0 & :\text{elsewhere}\end{cases} \\[1ex] & = \begin{cases}1 & : x\in[-1,1]\\ 1 & : x\in(1,2]\\ 0 & : \text{elsewhere}\end{cases} \\[1ex] & = \begin{cases}1 & : x\in[-1,2]\\ 0 & : \text{elsewhere}\end{cases} \\[1ex] & = \operatorname{\bf 1}_{[-1,2]}(x)\end{align}$
Thus this conditional function is indeed a conditional probability density measure.