Max Fasi and Bruno Iannazzo have shown how to compute all primary solutions of a matrix equation for rational functions . A primary solution is one that can be written as a polynomial in . The proposed algorithm exploits the Schur decomposition and generalizes earlier algorithms for matrix roots.
Fasi and Iannazzo’s paper Computing Primary Solutions of Equations Involving Primary Matrix Functions appears in Linear Algebra Appl. 560, 17-42, 2019.