There is no general analytic expression. However, the integral (when it exists) satisfies Sylvester's equation,
$$
AX + XB = \text{Id},
$$
and can be computed using specialized algorithms, such as the Bartels–Stewart algorithm.
Surprisingly, neither of these links mentions the connection to exponential integrals.
There is no general analytic expression. However, the integral (when it exists) satisfies Sylvester's equation, $$ AX + XB = \text{Id}, $$ and can be computed using specialized algorithms, such as the Bartels–Stewart algorithm.
Surprisingly, neither of these links mentions the connection to exponential integrals.