Solution of a Sylvester equation? I'd like to solve $AX -BX + XC = D$, for the matrix $X$, where all matrices have real entries and $X$ is a rectangular matrix, while $B$ and $C$ are symmetric matrices and $A$ is formed by an outer product matrix (i.e, as $vv^T$ for some real vector $v$) while $D$ is 'not' symmetric. $A,B,C,D$ matrices are fixed while $X$ is the unknown.
How can this equation be solved? Secondly, is there any case, where the solution of this equation has a closed form?

How about a small but concrete example of $AX + XB = C$:
$$\pmatrix{a_0 & a_1 \\a_2 & a_3}\pmatrix{x_0 \\ x_1} + \pmatrix{x_0 \\ x_1} b= \pmatrix{c_0 \\ c_1}$$
This gives a system of two equations:
\begin{align}
  a_0x_0 + a_1x_1+bx_0 &= c_0 \\
  a_2x_0 + a_3x_1+bx_1 &= c_1 \\
\end{align}
Which leads to the vectorized (using the Kroneker product formula for the Sylvester Equation):
$$\pmatrix{a_0 +b & a_1 \\a_2 & a_3+b}\pmatrix{x_0 \\ x_1} = \pmatrix{c_0 \\ c_1}$$
And depending on the determinant, it has a single solution. In this particular example, the $b$ as a scalar was transformed into $bI$ the scale of the identity. In higher dimensions, it will not generalize that way, you just have to follow the vectorization, and the dimension of the new equation will be a square of the multiple of the respective dimensions.
