MathGroup Archive 2008

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

Search the Archive

Bug: dummy variable appears in result

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84859] Bug: dummy variable appears in result
  • From: "David W.Cantrell" <DWCantrell at sigmaxi.net>
  • Date: Wed, 16 Jan 2008 23:06:48 -0500 (EST)

In an effort to answer a question recently posed in sci.math.research, I
encountered a strange bug.

In[6]:=
2^(k - 1)*Integrate[Product[1 - Cos[2*i*Pi*x], {i, 1, k}], {x, 0, 1}]

Out[6]= (1/(i^2*Pi*Gamma[1 + k]))*(2^(-2 +
2*k)*(Sqrt[i^2]*Sqrt[Pi]*Gamma[1/2 + k] - 2*i*Cot[i*Pi]*Gamma[1 +
k]*Hypergeometric2F1[1/2, 1/2 - k, 3/2, Cos[i*Pi]^2]*Sqrt[Sin[i*Pi]^2]))

The above is nonsense because i, being the index of the product and hence
merely a "dummy variable", appears in the result! What's going on?

But anyway, Mathematica can successfully calculate the result if specific,
fairly small, positive integers k are given. For example,

In[7]:= Table[
2^(k - 1)*Integrate[Product[1 - Cos[2*i*Pi*x], {i, 1, k}], {x, 0, 1}],
   {k, 1, 7}]

Out[7]= {1, 2, 3, 5, 6, 10, 12}

BTW, if anyone can find a closed form for the terms of the sequence a_k, I
and Tom Ward (the OP in sci.math.research) would be interested.

David W. Cantrell


  • Prev by Date: Re: Version 6 graphics can be painfully slow
  • Next by Date: Re: Version 6 graphics can be painfully slow
  • Previous by thread: Re: Can you minimize a notebook window from a notebook in Version 6?
  • Next by thread: Simplifying integer expressions with Mod and BitAnd