Consider $\frac{dX}{dt}(t)=AX(t) + X(t)A^{T} + BX(t)B^{T}$ with $X(0)=X_0$, where $X$ is a square matrices, and $A$, $B$ and $X_0$ are diagonal matrices.
When is $X$ diagonal?
For the equation $\frac{dX}{dt}=AX + XA^{T} + BB^{T}$, if the initial condition $X_0$ is diagonal, then what we have is just multiple scalar valued ODEs, so it is clear. But in the presence of $BXB^{T}$ I am not really sure. I thought of Euler methods, and argue each step $\hat{X}$ is diagonal, and then argue a convergence etc., but I want to think about an infinite dimensional setting as well, and wondering if there is a neat way of proving/disproving this.