MathGroup Archive 1999

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

Search the Archive

Re: "At long last, Sir, have you no shame?"

  • To: mathgroup at
  • Subject: [mg18524] Re: "At long last, Sir, have you no shame?"
  • From: colin at (Colin Rose)
  • Date: Thu, 8 Jul 1999 22:32:57 -0400
  • Organization: Theoretical Research Institute
  • References: <7luk6s$>
  • Sender: owner-wri-mathgroup at

David Withoff <withoff at> wrote:

> independent experts often disagree about what is or is not a bug. 

Two cases instantly come to mind:

1.   Sum in v4

Consider say:

    In[1]:=     g = Exp[-i];

    In[2]:=     Sum[g, {i, 1, n}]

    Out[2]=     n/E^i

which is nonsense. This happens for almost ANY expression g=g(i).
To get the correct answer, you have to wrap Evaluate around g:

   In[3]:=      Sum[Evaluate[g], {i, 1, n}]
   Out[3]=      (-1 + E^n)/(E^n*(-1 + E))

Wolfram support says Out[2] is not a bug, since Sum has attribute HoldAll. 
I say it is clearly (and obviously) an extremely serious bug,
in the sense that it gives the wrong answer to almost any Summation 
where g is pre-defined. I reported  it under v4 alpha, it was fixed 
in the betas, and it is now back in the v4 final release. But then 
it isn't a bug, apparently !?

2.  Non-convergent integrals 

Or how about the mean of a Cauchy random variable:

   In[1]:=   f = 1/(Pi(1 + x^2)); 

   In[2]:=   Integrate[x*f, {x, -Infinity, Infinity}, 
                       GenerateConditions -> False]
   Out[2]=   I

The correct answer is that the integral does not converge.
WRI claims it is not a bug, and won't fix it, even though:
  (i) GenerateConditions -> True yields the
      correct answer (convergence error), and 
 (ii) there are no conditions stated here anyway, so it is 
      not apparent why GenerateConditions -> False should yield a
      different solution to -> True. 

This is actually a general problem, with similar behaviour
in the Levy family,
   f = (1/Sqrt[2*Pi]*Exp[-(1/(2*y))])/y^(3/2);   
where the moments do not exist either.




Colin Rose 
tr(I)    -  Theoretical Research Institute
colin at

  • Prev by Date: Re: Interpolation[] problem
  • Previous by thread: Re: "At long last, Sir, have you no shame?"
  • Next by thread: Re: Re: "At long last, Sir, have you no shame?"