Given the joint density function f of X and Y, find the density of X: $$ f(x, y) = \begin{cases} xe^{-x + y} &\quad x>0, y>0 \\ 0, &\quad \text{otherwise} \end{cases} $$
My approach to computing the marginal is the following: $$ f_X = \int_{-\infty}^{\infty} f(x, y) dy = \begin{cases} \int_0^{\infty} f(x, y) dy = xe^{-x}\int_0^{\infty} e^y dy = \infty \textbf{???!!!}, &\quad x > 0 \\ 0, &\quad \text{otherwise} \end{cases} $$
My problem is that the pdf goes to $\infty$ if x>0. Am I correctly computing the pdf and the integral, or am I missing something?