Question about simplification
- Subject: Question about simplification
- From: Barton Willis
- Date: Tue, 26 Mar 2013 02:57:34 +0000
Try:
(%i1) load("opsubst")$
(%i2) reduce_product_gamma(e) := block([l],
l : map('first, gatherargs(e,'gamma)),
l : sublist(l, lambda([s], not integerp(s))), /* can't happen unless simp : false ? */
l : sort(l, lambda([a,b], orderlessp(b,a))), /* try to guess which sub gives simplest result */
subst(map(lambda([s], gamma(s)*gamma(1-s)=%pi/sin(%pi*s)),l),e))$
(%i3) reduce_product_gamma([12+gamma(a), gamma(a)*gamma(b), 2*gamma(1/3)*gamma(-2/3)]);
(%o3) [gamma(a)+12,gamma(a)*gamma(b),-3*gamma(1/3)^2]
--Barton
________________________________