could you please help me to solve this training example for my exam? I need to find marginal density $f_X (x)$ based on knowing conditional density $f_{X|Y}$ and marginal density $f_{Y}$.
$$ f_{X\mid Y} (x\mid y) = \frac{2x}{y^2-1}~\mathbf 1_{1 \le x \le y \le 2} $$
$$ f_{Y} (y) = \frac{4}{9}y(y^2 - 1)~\mathbf 1_{1 \le y \le 2} $$
I am very insecure at statistics so please correct me when I am wrong:
based on this formula: $$ f_{X,Y}(x,y) = f_Y(y) \cdot f_{X\mid Y} (x\mid y) $$
I got this:
$$ \frac{4}{9}y(y^2 - 1)\frac{2x}{y^2 - 1} = \frac{8}{9}xy $$
and then I computed $f_X (x)$ by inserting limits to $f(x,y)$:
$$ f_X(x) = \int_x^{\pi/2} f(x,y)~dy = \int_x^{\pi/2} \frac{8}{9}xy~dy = \frac{1}{9}x(\pi - 4x^2) $$
My friend says it is probably wrong but he is not able to help Is there logical mistake or numeric one? Could someone assist, please? Also if you could help me to understand the logic behind, I would appreciate it.