Help finding the Marginal PDF of Y given a Density Function of Two Variables Problem:
The join pdf of $(X,Y)$ is given by
$
f(x,y) = \begin{cases}
\Big( \frac{5}{32} \Big) x^2(4 - y) & \text{for } x < y < 2x, 0 < x < 2 \\
0 & \text{otherwise} \\
\end{cases}
$
where $k = \frac{5}{32}$. Find the marginal pdf of $Y$.
Answer:
\begin{eqnarray*}
f_y(y) &=& \int_{-\infty}^{\infty} f(x,y) \,\, dx \\
f_y(y) &=& \int_{0}^{2} \Big( \frac{5}{32} \Big) x^2(4 - y) \,\, dx \\
f_y(y) &=& \Big( \frac{5}{32} \Big) \frac{x^3}{3}(4 - y) \Big|_{x = 0}^{x = 2} \\
f_y(y) &=& \Big( \frac{5}{32} \Big) \frac{2^3}{3}(4 - y)  \\
f_y(y) &=& \Big( \frac{5}{12} \Big) (4 - y)  \\
\end{eqnarray*}
My answer is:
\begin{eqnarray*}
f_y(y) &=& \begin{cases}
 \Big( \frac{5}{12} \Big)(4x^3 - \frac{3x^4}{2}) & \text{for } 0 < y < 4 \\
 0 & \text{otherwise} \\
\end{cases} \\
\end{eqnarray*}
but the books answer is:
\begin{eqnarray*}
 f_y(y) &=& \begin{cases}
  \Big( \frac{5}{12} \Big) (4 - y) & \text{for } 0 < y < 2 \\
  \Big( \frac{5}{32} \Big)\Big( \frac{1}{3} \Big)(4-y)(8 - \frac{y^3}{8}) & \text{for } 2 < y < 4 \\
  0 & \text{otherwise} \\
 \end{cases} \\
\end{eqnarray*}
I would like to know what I did wrong.
Thanks
Bob

It seems like you have a good idea of what to do but just made a tiny mistake, I'll clear that up and leave you the work of finishing up. 
The problem is that the set of possible values of $y$ depends on the value of $x$. You are not taking this into account. To do so you can write the joint pdf in terms of characteristic functions. 
So, rewrite the pdf as follows: 
$$ f(x,y) = \left( \frac{5}{32} \right) x^2 (4-y) \mathbf{1}_{ [x,2x]} (y) \cdot \mathbf{1}_{[0,2]}(x) $$
Now aply the same method you did before, integrating with respect to all possible values of $x$. 
Take into account that if $ y$ must be between $x$ and $2x$, this is equivalent to $x$ being smaller than $y$ and $2x$ being bigger than $y$. (Draw the region for easier integration)
Hope this helps!  
