Setting integral for marginal pdf The $X$ and $Y$ are bounded by $2>x>0,\; 1>y>0,\;$ and $y>x-1.$ Suppose $f_{XY}(x,y)$ is given, then how do I set up the integral for the $f_X(x)?$
I have two integral forms for $f_X(x):$ 
$$\int_0^1 f_{XY}(x,y) \, dy$$ or $$\int_{x-1}^1 f_{XY}(x,y) \, dy$$
So which one is correct? Or do I need to add them up?
 A: The joint density function "lives" on the part of the rectangle with corners $(0,0)$, $(2,0)$, $(2,1)$, and $(0,1)$ that lies above the line $y=x-1$. Draw the rectangle, and the line $y=x-1$. Note that this line passes through $(1,0)$ and $(2,1)$.
We want to "integrate out" $y$. From $x=0$ to $x=1$, we have 
$$f_X(x)=\int_0^1 f_{X,Y}(x,y)\,dy.$$
The geometry  changes in the interval from $x=1$ to $x=2$. In that interval, we have
$$f_X(x)=\int_{x-1}^1 f_{X,Y}(x,y)\,dy.$$
For completeness, note that the marginal density of $X$ is $0$ if $x\lt 0$ and of $x\gt 2$.
Remark: The answer to your specific question is that both your expressions are correct, the first in the interval $0\le x\lt 1$, and the second  in the interval $1\le x\le 2$.
A: The support is $\{(X,Y):0<X<2, 0< Y< 1, Y> X-1\}$. 
I believe you have noticed what happens when $X<1$ and $X\geq 1$, leading to your question.   The two integrals you have are both correct, for certain values of $X$. 
Which one is in use depends on where the value of $X$ lies in its support.   That is: the density is a piecewise function.
$$\begin{align}
f_X(x) ~=~& \int\limits_{\max\{0, x-1\}}^{1} f_{X,Y}(x,y)\operatorname d x~\mathbf 1_{x\in (0;2)} 
\\[1ex] =~& \int\limits_0^1f_{X,Y}(x,y)\operatorname d x~\mathbf 1_{x\in (0;1)} + \int_{x-1}^2 f_{X,Y}(x,y)\operatorname d x~\mathbf 1_{x\in [1;2)}
\\[4ex] f_X(x) ~=~&\begin{cases} \int\limits_0^1 f_{X,Y}(x,y)\operatorname d x & :{x\in (0;1)} \\[1ex] \int\limits_{x-1}^2 f_{X,Y}(x,y)\operatorname d x & :{x\in [1;2)} \\[1ex] 0 & : \textsf{otherwise}\end{cases}
\end{align}$$
