Completing the Square (Bivariate) I am running a bivariate regression with fitted equation given by
$$\hat{P} = b_0+b_1X+b_2Y+b_3X^2+b_4Y^2+b_5XY$$
It is easy to obtain the 6 coefficients given $X,Y$ and $P$. However, I want to reparameterize the formula as 
$$\hat{P} = \alpha + \dfrac 1 {σ_{xx} σ_{yy}-σ_{xy}^2} \Big[σ_{yy}(X-μ_x)^2-2σ_{xy}(X-μ_x)(Y-μ_y)+σ_{xx}(Y-μ_y)^2\Big]$$
Sadly, I'm stumped as to how to solve for $[\alpha,μ_x,μ_y,σ_{xx},σ_{yy},σ_{xy}]$ in terms of $[b_0,b_1,b_2,b_3,b_4,b_5]$. Any help would be much appreciated.
 A: The answer got too lenghty and I don't really have much more time, so take this as a partial answer. I'll revisit this if no one provides a full answer (if one exists).

$$\hat{P} = b_0+b_1X+b_2Y+b_3X^2+b_4Y^2+b_5XY$$
$$\hat{P} = \alpha + \dfrac 1 {σ_{xx} σ_{yy}-σ_{xy}^2} \Big[σ_{yy}(X-μ_x)^2-2σ_{xy}(X-μ_x)(Y-μ_y)+σ_{xx}(Y-μ_y)^2\Big]$$
$$σ_{yy}(X-μ_x)^2-2σ_{xy}(X-μ_x)(Y-μ_y)+σ_{xx}(Y-μ_y)^2=\\
σ_{yy}X^2
-2σ_{yy}X\mu_x
+σ_{yy}\mu_x^2
-2\sigma_{xy}XY
+2\sigma_{xy}X\mu_y
+2\sigma_{xy}\mu_xY
-2\sigma_{xy}\mu_x\mu_y
+\sigma_{xx}Y^2
-2\sigma_{xx}Y\mu_y
+\sigma_{xx}\mu_y^2=\\
σ_{yy}\mu_x^2
-2\sigma_{xy}\mu_x\mu_y
+\sigma_{xx}\mu_y^2
+2(\sigma_{xy}\mu_y-σ_{yy}\mu_x)X
+2(\sigma_{xy}\mu_x-\sigma_{xx}\mu_y)Y
+σ_{yy}X^2
+\sigma_{xx}Y^2
-2\sigma_{xy}XY
$$
So, from the second equation we get:
$$\hat{P} = \alpha + \dfrac 1 {σ_{xx} σ_{yy}-σ_{xy}^2}
\left(
σ_{yy}\mu_x^2-2\sigma_{xy}\mu_x\mu_y+\sigma_{xx}\mu_y^2+2(\sigma_{xy}\mu_y-σ_{yy}\mu_x)X+2(\sigma_{xy}\mu_x-\sigma_{xx}\mu_y)Y+σ_{yy}X^2+\sigma_{xx}Y^2-2\sigma_{xy}XY
\right)$$
We get:
$$\alpha+\dfrac {σ_{yy}\mu_x^2-2\sigma_{xy}\mu_x\mu_y+\sigma_{xx}\mu_y^2} {σ_{xx} σ_{yy}-σ_{xy}^2}=b_0$$
$$\dfrac {2(\sigma_{xy}\mu_y-σ_{yy}\mu_x)} {σ_{xx} σ_{yy}-σ_{xy}^2}=b_1$$
$$\dfrac {2(\sigma_{xy}\mu_x-\sigma_{xx}\mu_y)} {σ_{xx} σ_{yy}-σ_{xy}^2}=b_2$$
$$\dfrac {\sigma_{yy}} {σ_{xx} σ_{yy}-σ_{xy}^2}=b_3$$
$$\dfrac {\sigma_{xx}} {σ_{xx} σ_{yy}-σ_{xy}^2}=b_4$$
$$\dfrac {-2\sigma_{xy}} {σ_{xx} σ_{yy}-σ_{xy}^2}=b_5$$
Let's start here:
$$\left\{\begin{matrix}
-b_5\mu_y-2b_3\mu_x=b_1\\ -b_5\mu_x-2b_4\mu_y=b_2
\end{matrix}\right.
\\
\left\{\begin{matrix}
-\frac{b_5}{2b_3}\mu_y-\mu_x=\frac{b_1}{2b_3}\\
\mu_x+\frac{2b_4}{b_5}\mu_y=-\frac{b_2}{b_5}
\end{matrix}\right.$$
Summing both:
$$\left(\frac{2b_4}{b_5}-\frac{b_5}{2b_3}\right)\mu_y=\frac{b_1}{2b_3}-\frac{b_2}{b_5}$$
So:
$$\mu_y=\left(\frac{b_1}{2b_3}-\frac{b_2}{b_5}\right)\Big/\left(\frac{2b_4}{b_5}-\frac{b_5}{2b_3}\right)
=\frac{b_5b_1-2b_3b_2}{4b_4b_3-b_5^2}$$
Let's use $-b_5\mu_y-2b_3\mu_x=b_1$ to uncover $\mu_x$:
$$\mu_x=-\frac{b_1+b_5\mu_y}{2b_3}=-\frac{b_1+{\frac{b_5^2b_1-2b_5b_3b_2}{4b_4b_3-b_5^2}}}{2b_3}=
-\frac{4b_4b_3b_1-b_5^2b_1+{b_5^2b_1-2b_5b_3b_2}}{8b_3^2b_4-2b_3b_5^2}
=
-\frac{2b_4b_1-b_5b_2}{4b_3b_4-b_5^2}$$
So far:
$$
\mu_x=\frac{b_5b_2-2b_4b_1}{4b_4b_3-b_5^2}
\\\mu_y=\frac{b_5b_1-2b_3b_2}{4b_4b_3-b_5^2}
$$
(I think) By further manipulating the expressions all six coefficients can be solved.
EDIT:
Another easy one is $\alpha$:
$$\alpha = 
b_0 - \dfrac {σ_{yy}\mu_x^2-2\sigma_{xy}\mu_x\mu_y+\sigma_{xx}\mu_y^2} {σ_{xx} σ_{yy}-σ_{xy}^2}=\\=
b_0 - b_3\mu_x^2-b_5\mu_x\mu_y-b_4\mu_y^2
$$
