Re: What am I doing wrong?

*To*: mathgroup at smc.vnet.net*Subject*: [mg91612] Re: What am I doing wrong?*From*: Jack L Goldberg 1 <jackgold at umich.edu>*Date*: Fri, 29 Aug 2008 04:10:55 -0400 (EDT)*References*: <g95k5j$51m$1@smc.vnet.net> <48B679EA.6000300@gmail.com>

Thanks Jean-Marc. I cannot understand why I didn't add n > 0 as part of my use of assumptions. This solves the problem I was working on, however, read the following: There still remains one issue. For negative integers (-1)^n*Binomial[-1,n] returns 0, witness the output of Table[ (-1)^n*Binomial[-1,n], {n,-10,-1], say. So, > In[3]:= Assuming[Element[n, Integers] && n >= -3, > FunctionExpand[(-1)^n*Binomial[-1, n]]] > > Out[3]= ComplexInfinity So it appears that the simplification process does not like negative integers as the first argument to Binomial, but the code that evaluates Binomial doesn't mind it at all. This same result occurs for (-1)^n Binomial[-m,n] when m is any negative integer. Jack Quoting Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>: > Jack L Goldberg 1 wrote: >> In(1) SeriesCoefficient[1/(1-x),{x,0,n}] >> >> Out(1) (-1)^n*Binomial[-1,n] >> >> Next, >> >> In(2) >> FunctionExpand[(-1)^n*Binomial[-1,n],Assumptions->Element[n,Integers]] >> >> OUt(2) ComplexInfinity >> >> In(3) Table[(-1)^n*Binomial[-1,n], {n,-2,2}] >> >> Out(3) {0,0,1,1,1} >> >> Incidentally, FullSimplify in place of FunctionExpand yields the >> same result, ComplexInfinity. I wonder if this misleading answer >> is a result of FunctionExpand and FullSymplify resorting to the >> Gamma Function for the simplification? >> >> Is this a bug or a feature? >> >> Thanks, >> >> Jack > > You should tell Mathematica that n is a non-negative integer: > > In[1]:= Assuming[Element[n, Integers] && n >= 0, > FunctionExpand[(-1)^n*Binomial[-1, n]]] > > Out[1]= (-1)^(2 n) > > In[2]:= Assuming[Element[n, Integers] && n < 0, > FunctionExpand[(-1)^n*Binomial[-1, n]]] > > Out[2]= -1 > > In[3]:= Assuming[Element[n, Integers] && n >= -3, > FunctionExpand[(-1)^n*Binomial[-1, n]]] > > Out[3]= ComplexInfinity > > Regards, > -- Jean-Marc > > > > >