MathGroup Archive 2008

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

Search the Archive

Re: What am I doing wrong?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91601] Re: What am I doing wrong?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 28 Aug 2008 07:40:21 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g95k5j$51m$1@smc.vnet.net>

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?