Solving a third degree matrix equation Let $X, A, B$ be square, matrices, and let $X$ be an invertible covariance matrix (symmetric, square, positive definite).
Is it possible to solve for $X$ the following equation?
$$ A=X(I+B-XX) $$
Thank you.
 A: From the spectral theorem, you can diagonalize $X$:
$X = P^{-1} D P$ with $D=\text{diag}(\lambda_1,...,\lambda_n)$ and $\lambda_i >0$ for all $i$.
Let $\tilde A = P B P^{-1}$ and $\tilde B = P B P^{-1}$
Then the new equation to solve is:
$\tilde A  = D(I+ \tilde B-D^{2})$ and you have $n$ unknowns ($\lambda_1,...,\lambda_n$).
In particular, for $i \neq j$, you get $\tilde a_{i,j} = \lambda_i \tilde b_{i,j}$. From this you can see that you will not always get a solution for any $A$ and $B$.
A: This is not always possible. For instance, suppose $B=-A$. The equation then reduces to $A=X-XA-X^3$, i.e. $(I+X)(I-X)X=(I+X)A$. Since $X$ is positive definite, $I+X$ is invertible. So the equation further boils down to $A=X(I-X)$, which is clearly insolvable if $A$ is not Hermitian.
A: I think that this problem is twisted but interesting. The question is: how to choose $A,B$ so that there is  at least a solution in the symmetric matrix $X$ ? We go to see that it is unfeasible. I assume that the matrices $A,B,X$ are real, that $S_n$ is the set of symmetric matrices and $SK_n$ the set of skew symmetric matric\es. 
$A-XB=X-X^3$ is symmetric; then $(*)$ $XB-B^TX=A-A^T$. Consider the function $f:X\in S_n\rightarrow XB-B^TX\in SK_n$. $\dim(\ker(f))\geq n(n+1)/2-n(n-1)/2=n$; let $g:X\in M_n\rightarrow XB-B^TX\in M_n$. Assume that the eigenvalues $(b_i)_i$ of $B$ are distinct and non-zero; the eigenvalues of $g$ are the $(b_i-b_j)_{ij}$, $g$ is diagonalizable and, consequently $\dim(\ker(f))\leq \dim(\ker(g))=n$; finally $\dim(\ker(f))=n$ and $f$ is onto. Thus, when $X$ is solution of $(*)$, $X=X_0+Y$ where $Y\in F$, a vector space of dimension $n$.
Roughly speaking $A-XB=X-X^3$ is a system of $n(n+1)/2$ (independent ?) equations in $n$ unknowns. Then if we want at least a solution, then (when $B$ is numerically fixed as above) we must obtain $n(n-1)/2$ algebraically independent relations in the entries $(a_{ij})$. For instance, when $n=2$, several experiments with Maple give a sole algebraic relation; yet, it is incredibly complicated.
