In Maxima 5.50post (SBCL 2.6.7) both of dimpase's expressions simplify: trigsimp(s2) no longer signals "Quotient by a polynomial of higher degree", and neither call produces any error. The two results are the same expression modulo the renaming — ratsimp(subst([y=a,z=b],trigsimp(s1)) - trigsimp(s2)) is 0 — and each agrees with its own input numerically, e.g. 0.06872495342570636 vs 0.06872495342570595 at x=0.7, a=1.1, b=0.4.
Here is how to get this with Maxima only (5.39.0 with SBCL or ECL):
gives
Expression s2 is obtained from s1 by renaming y->a, z->b.
In Maxima 5.50post (SBCL 2.6.7) both of dimpase's expressions simplify:
trigsimp(s2)no longer signals "Quotient by a polynomial of higher degree", and neither call produces any error. The two results are the same expression modulo the renaming —ratsimp(subst([y=a,z=b],trigsimp(s1)) - trigsimp(s2))is0— and each agrees with its own input numerically, e.g.0.06872495342570636vs0.06872495342570595atx=0.7,a=1.1,b=0.4.Verified by Claude.