Re: Integrate bug and workaround
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1058] Re: Integrate bug and workaround
- From: withoff (David Withoff)
- Date: Fri, 12 May 1995 15:00:48 -0400
- Organization: Wolfram Research, Inc.
In article <3okes6$jh7 at news0.cybernetics.net> Steven Trainoff <steve at borglet.ucsb.edu> writes: >Hello all, > >I am constantly amazed at how fickle MMA's integrator is. Perhaps >this example is well known, but it sure surprised me. Can anyone >explain this behaviour, or is it a simple bug? I am running MMA >version "NeXT 2.0 (November 14, 1991)" > >(* It can't do this... *) > >In[1]:= Integrate[x E^(Sqrt[z^2]*x), x ] > > 2 > x Sqrt[z ] >Out[1]= Integrate[E x, x] Yes, this is a bug. The Integrate function is being overly pessimistic about its ability to handle algebraic expressions. Handling algebraic subexpressions, even algebraic constants, is indeed difficult in general, and it is best for Integrate to give up than to get the wrong answer, but this particular algebraic is in an innoccuous position and should not have caused any trouble. The only workaround is, as you suggested, to temporarily remove the algebraic constants so that Integrate doesn't see them. This problem will not lead to wrong answers, and has been fixed for the next release of Mathematica. Since this class of examples is fairly specific, I am concerned that there must be other examples that led to your broader remark about being "constantly amazed at how fickle" the integrator is. If you have other examples like this, please send them to support at wri.com so that we can make sure than they have been fixed. Dave Withoff Research and Development Wolfram Research