A problem about positive definite matrices 
Given $A\in\mathbb{R}^{n\times n}$, show that all eigenvalues of A has negative real part if and only if for each positive definite matrix $C\in\mathbb{R}^{n\times n}$, there exists an unique positive definite matrix $B\in\mathbb{R}^{n\times n}$ which satisfies $BA+A^TB=-C$

I thought that since $B$ and $C$ are both positive definite, then they can be simultaneously diagonalized, then I cannot go any further.
Can anyone help me? Many thanks
 A: I assume that, in this context, "positive definite" implies "symmetric". Note that the equation $BA + A^TB = -C$ is the continuous Lyapunov equation.
$\implies:$ If $A$ is such that its eigenvalues have negative real part, then to establish existence it suffices to note that the integral
$$
B = \int_0^\infty e^{A^\top\tau} C e^{A\ \tau}\,d\tau
$$
converges. Indeed: if this integral converges, then we find that
$$
\frac d{d\tau} e^{A^\top\tau} C e^{A \tau} = 
A^\top e^{A\tau} C e^{A \tau} + e^{A^\top\tau} C e^{A \tau} A,
$$
so that
$$
BA + A^TB = \int_0^\infty [A^\top e^{A^\top\tau} C e^{A \tau} + e^{A^\top\tau} C e^{A \tau} A]d\tau
\\= \int_0^\infty \frac d{d\tau} e^{A^\top \tau} C e^{A \tau}\, d \tau
\\ = 0 - C = -C.
$$
We can see that this matrix must be positive definite because for all $x \in \Bbb C^n$, we have
$$
x^*Bx = \int_0^\infty [e^{A\tau} x]^* C [e^{A\tau} x]\,d\tau > 0,
$$
where $x^*$ denotes the conjugate-transpose of the column-vector $x$.
To establish uniqueness, it suffices to note that the Sylvester equation $BA + A^\top B = -C$ has a unique solution because the eigenvalues of $A$ have negative real part, which means that $A$ and $-A^T$ have no common eigenvalues.

$\Longleftarrow:$ Suppose that $A$ has at least one eigenvalue that does not have a negative real part, and suppose for the purpose of contradiction that $B,C$ are positive definite with
$$
BA + A^TB = -C.
$$
Let $x$ be a (possibly complex) eigenvector of $A$ associated with an eigenvalue $\lambda = a + bi$ for which $a \geq 0$. We note that $x^*Bx = \langle Bx, x \rangle = \langle x,Bx \rangle > 0$, so that
$$
\begin{align}
x^*[BA + A^TB]x &=
(Bx)^*Ax +  (Ax)^*Bx \\
& = 2 \operatorname{Re} \langle Ax, Bx\rangle 
\\ & = 2 \operatorname{Re} [(a + bi)\langle x, Bx\rangle]
\\ & = 2a \langle x,Bx \rangle \geq 0.
\end{align}
$$
On the other hand, the fact that $C$ is positive definite means that
$$
x^*[BA + A^TB]x = -x^*Cx < 0,
$$
which contradicts the above.
