Integration Boundaries for Marginal Distribution If the joint distribution of $x$ and $y$ as follow
$$f(x,y)=\left\{ \begin{align}
  & \frac{{{x}^{2}}+y}{4}\,\,\,\,,\,\,\,\,0<x<y<4 \\ 
 & 0\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,,\,\,\,\,\,\,\,\,\,o.w. \\ 
\end{align} \right.$$
How can I find the marginal distribution function of $x$? 
I tried integrating the function with respect to $y$ using the boundaries $0$ and $2$ and my answer did not match the back of the book. 
Then I tried integrating with the boundaries $0$ and $2-y$ and my answer was closer but still wrong.
Where am I making my mistake? 
 A: It is important to identify the region where the joint density function "lives."
It was specified that the joint density function of $X$ and $Y$ is $\frac{x^2+y}{4}$ where $0\lt x\lt y\lt 2$. We are to understand that it is $0$ elsewhere.
Draw the line $y=x$. The joint density function lives in the part of the $2\times 2$  square that is above the line $y=x$. This is the triangle with corners $(0,0)$, $(2,2)$, and $(0,2)$.
For the marginal density of $X$, we need to "integrate out" $y$. For any $x$ between $0$ and $2$, $y$ travels from $y=x$ to $y=2$. So the marginal density of $X$ is 
$$\int_x^2 \frac{x^2+y}{4}\,dy$$
on the interval $(0,2)$, and $0$ elsewhere.
A: $${{f}_{X}}(x)=\frac{1}{4}\int_{x}^{2}{({{x}^{2}}+y)dy=\frac{1}{4}}{{x}^{2}}y+\left. \frac{1}{8}{{y}^{2}} \right|_{y=x}^{y=2}=-\frac{1}{4}{{x}^{3}}+\frac{3}{8}{{x}^{2}}+\frac{1}{2}$$
and
$${{f}_{Y}}(y)=\frac{1}{4}\int_{0}^{y}{({{x}^{2}}+y)dx=\frac{1}{12}}{{x}^{3}}+\left. \frac{1}{4}xy \right|_{x=0}^{x=y}=\frac{1}{12}{{y}^{3}}+\frac{1}{4}{{y}^{2}}$$
