Suppose I have a complex quadratic form
Q(px,py)=p2yy2α2−2pxpyxyαβ+p2xx2β2−p2yy2α−p2xx2β
Of course all parameters has been declared as variables, that is
var('p_x p_y x y \alpha \beta')
(I use unicode α and β)
Is there a way to find the matrix \boldsymbol{A} such that
Q(\boldsymbol{p})= \boldsymbol{p}^\top \boldsymbol{A}\boldsymbol{p} ?