Optimizing a numerical integration that involves matrices using sympy The expression I’m integrating is