If I have a joint density function for X and Y:
$f_{X,Y}(x,y) = \begin{cases} \pi x \cos(\frac {\pi y} 2) & 0 \le x \le 1, 0 \le y \le 1 \\ 0 & \text{otherwise} \\ \end{cases}$
How do I find the marginal density function for X?
I think I need to integrate $f_{X,Y}(x,y)$ over $dy$ but what do I integrate it from? Should it be 0 and 1 or 0 and x or x and 0? I've looked over a lot of examples with different domains but I can't figure out their method in getting the range for integration. They always skip that step in the working because apparently it should be obvious, but I can't figure it out. Can anyone help me please?