Given $X,B,A \in \mathbb{R}^{p \times p}$ how do you solve
$A=2BXB - \text{Diag}(BXB)$
for $X$? Is there a closed-form? One can assume the following: $A,B$ and $X$ are symmetric positive definite.
I can iteravitly solve the problem as follows : $B^{-1}(A+\text{Diag}(BXB))B^{-1}/2=X_{+}$
Note: $Diag(BXB)$ is a diagonal matrix containing the diagonal elements of BXB.
Apologies, this has a trivial solution. On the diagonal, it is clear that $A_{ii}=(BXB)_{ii}$.
Thus $X=B^{-1}$(A + Diag(A))$B^{-1}/2$.