Liouville-Green asymptotic approximation for a class of matrix differential equations and semi-discretized partial differential equations