Re: FullSimplify on Gamma functions
- To: mathgroup at smc.vnet.net
- Subject: [mg48115] Re: [mg48099] FullSimplify on Gamma functions
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Fri, 14 May 2004 00:12:16 -0400 (EDT)
- References: <200405130408.AAA26697@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 13 May 2004, at 13:08, Oleksandr Pavlyk wrote: > Dear group, > > Consider > > In[1]:= > a[m_]:=(q1)^m * Gamma[q2]/Gamma[2*m+q3]; > > Then > > In[2]:= > FullSimplify[a[m-1]/a[m]] > > simplifies ratio of gamma functions just fine. > However > > In[3]:= > FullSimplify[ a[m+1]/a[m] ] > > fails to do so, leaving the ratio untouched. > > FullSimplify[ (a[m+1]/a[m])^(-1) ]^(-1) > > gives me what I expect. > > I've been trying to assist FullSimplify with > > ComplexityFunction->( If[Head[#]===Gamma,1,0]&) > > to no avail. I would appreciate anybody illuminating > me on how to extend FullSimplify to handle this case. > > Thank you in advance, > Sasha > > The problem is indeed wiht ComplexityFunction. You need to find one for which the answer you want has a lower value (LeafCOunt gives the same value of 17 for both the answer you get and the one you want). One thing that works is Depth: FullSimplify[a[m + 1]/a[m], ComplexityFunction -> Depth] q1/((2*m + q3)*(1 + 2*m + q3)) You can also use a customized funciton, just for this case: f[x_] := Count[x, Gamma, Infinity, Heads -> True] FullSimplify[a[m + 1]/a[m], ComplexityFunction -> f] q1/((2*m + q3)*(1 + 2*m + q3)) Andrzej Kozlowski Chiba, Japan http://www.mimuw.edu.pl/~akoz/
- References:
- FullSimplify on Gamma functions
- From: Oleksandr Pavlyk <pavlyk@phys.psu.edu>
- FullSimplify on Gamma functions