MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: What am I doing wrong?


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




  • Prev by Date: Re: unwanted Complex result
  • Next by Date: RE: unwanted Complex result
  • Previous by thread: What am I doing wrong?
  • Next by thread: Re: What am I doing wrong?