Let $X$ and $Y$ be two random variables with joint density $f_{X,Y}(x, y)$ = \begin{cases} \frac{21x^4(1-y)^5e^{\frac{-x}{y}}}{y^2} & \text{if} \ x>0, 0< y < 1, \\ \ 0 & \text{otherwise } \\ \end{cases}
What is the conditional distribution $f_{X\mid Y}(x\mid y)$?
What I've tried was:
$$f_{X\mid Y}(x\mid y) = \frac{f_{X,Y}(x, y)}{f_Y(y)} = \frac{\frac{21x^4(1-y)^5e^{\frac{-x}{y}}}{y^2}}{\int_0^\infty \frac{21x^4(1-y)^5e^{\frac{-x}{y}}}{y^2}dx} \\$$
But I find the integration of $f_Y(y)$ very difficult to solve. I've tried to integrate by parts but it keeps resulting in messy integrals. I would like to know if there is another way less focused on integral solving to find $f_Y(y)$ and tehre fore the conditional distribution of X given Y.
Recall the gamma function definition $$\Gamma(z) = \int_{t=0}^\infty t^{z-1} e^{-t} \, dt \tag{1}$$ from which we can evaluate the desired marginal density of $Y$ after a substitution of the form $x = yt$, $dx = y \, dt$:
$$\begin{align} f_Y(y) &= \frac{21(1-y)^5}{y^2} \int_{x=0}^\infty x^4 e^{-x/y} \, dx \\ &= \frac{21(1-y)^5}{y^2} \int_{t=0}^\infty y^4 t^4 e^{-t} y \, dt \\ &= 21y^3(1-y)^5 \int_{t=0}^\infty t^4 e^{-t} \, dt \\ &= 21 y^3(1-y)^5 \Gamma(5) \\ &= 504 y^3(1-y)^5. \end{align}$$