answered 1 year ago
Maybe it is trivial but can (Qi*R).subs(h==log(q)).simplify_full() solve your problem?
(Qi*R).subs(h==log(q)).simplify_full()