Given a matrix $A\in \mathbb{R}^{n\times n}$, I am looking for a symmetric matrix $S\in\mathbb{R}^{n\times n}$ such that
$$ S A + A^T S = I $$
$A$ can be assumed to be regular (with positive determinant, if this is of any help).
The difficulty is of course that $S$ must be symmetric, otherwise one could simply take $2S = A^{-T}$. In principle this is a linear equation with $\frac{n(n+1)}{2}$ unknowns and this can be solved for $S$.
Is there a nicer way to find $S$ such as a closed solution formula using some factorization? Has this problem been studied anywhere?