Define the joint pdf of $(X,Y)$ as:
$$f(x,y)\propto \exp(-1/2[Ax^2y^2+x^2+y^2-2Bxy-2Cx-Dy]),$$
where $A,B,C,D$ are constants.
Show that the distribution of $X\mid Y=y$ is normal with mean $\frac{By+C}{Ay^2+1}$ and variance $\frac{1}{Ay^2+1}$. Derive a corresponding result for the distribution of $Y\mid X=x$.
Attempt:
I tried to integrate the equation w.r.t. $x$ in order to find $X\mid Y=y$. However, I'm not sure if I am correct:
$$\int_{-\infty}^{\infty}\exp(-1/2[Ax^2y^2+x^2+y^2-2Bxy-2Cx-Dy])\,dx$$
$$ =\left[\frac{\exp[-1/2[Ax^2y^2+x^2+y^2-2Bxy-2Cx-Dy]}{-Axy^2-1/2+By+C}\right]_{-\infty}^{\infty}$$
Whatever the value of the previous integration (call it "Q"), then we would divide the original equation by "Q", i.e.:
$$ \frac{f_{X,Y}(x,y)}{Q}$$
Which would give us $f_{X\mid Y=y}(X\mid Y=y)$.
How do I go about evaluating
$$ =\left[\frac{\exp[-1/2[Ax^2y^2+x^2+y^2-2Bxy-2Cx-Dy]}{-Axy^2-1/2+By+C}\right]_{-\infty}^{\infty}\text{ ?}$$
We use:
$$f_{X\mid Y}(x\mid Y=y) = \frac{f(x,y)}{f_Y(y)} = \frac{f(x,y)}{\int_{-\infty}^{\infty} f(x,y)dx} $$ We first note that: $$ -0.5(Ax^2y^2+x^2+y^2-2Bxy-2Cx-2Dy) =$$ $$ -0.5(Ay^2+1)\left(x-\frac{By+c}{Ay^2+1} \right)^2 -0.5\left(y^2-2Dy - \frac{(By+c)^2}{Ay^2+1}\right).$$ This gives us:
$$ \int_{-\infty}^{\infty} f(x,y)dx = \int_{-\infty}^{\infty} {\rm e}^{-0.5(Ax^2y^2+x^2+y^2-2Bxy-2Cx-2Dy) }dx$$ $$ ={\rm e}^{-0.5\left(y^2-2Dy- \frac{(By+c)^2}{Ay^2+1}\right) }\int_{-\infty}^{\infty} {\rm e}^{ -0.5(Ay^2+1)\left(x-\frac{By+c}{Ay^2+1} \right)^2 }dx$$ $$ = {\rm e}^{-0.5\left(y^2-2Dy- \frac{(By+c)^2}{Ay^2+1}\right) } (Ay^2+1)^{-1} \int_{-\infty}^{\infty} {\rm e}^{-0.5z^2 } dz$$ $$ = {\rm e}^{-0.5\left(y^2-2Dy- \frac{(By+c)^2}{Ay^2+1}\right) } (Ay^2+1)^{-1} \sqrt{2\pi}.$$
Finally:
$$ f_{X\mid Y}(x\mid Y=y) = \frac{1}{ (Ay^2+1)^{-1}\sqrt{2\pi}} {\rm e}^{-0.5(Ay^2+1)\left(x-\frac{By+c}{Ay^2+1} \right)^2 }.$$