Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Re: Nasty bug in Integrate (version 5.0)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45993] Re: [mg45958] Re: Nasty bug in Integrate (version 5.0)
  • From: Dr Bob <drbob at bigfoot.com>
  • Date: Mon, 2 Feb 2004 05:20:28 -0500 (EST)
  • References: <200401281019.FAA18530@smc.vnet.net> <bvapk6$aat$1@smc.vnet.net> <200401300917.EAA05062@smc.vnet.net> <68A351B5-5333-11D8-94B3-00039311C1CC@mimuw.edu.pl> <opr2mc5zdhamtwdy@smtp.cox-internet.com> <7159C05C-53B8-11D8-9076-00039311C1CC@mimuw.edu.pl>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

Don't put me in that category; I'm using Mathematica, not debugging it. 
And I like Mathematica -- a lot.

I'm simply saying the answer to errors with a small problem isn't, "Don't 
use it for small problems."

And of course people come to the Group when they think they've found a bug 
or a gap in documentation. They don't need to come there when everything 
works fine.

Bobby

On Sat, 31 Jan 2004 07:41:04 +0100, Andrzej Kozlowski <akoz at mimuw.edu.pl> 
wrote:

>
> On 31 Jan 2004, at 03:57, Dr Bob wrote:
>
>>>> if you are going to use it only for problems that are trivial to do 
>>>> by hand what is the point of using it at all?
>>
>> Why use it only for the ones that are too big to check? That way, we 
>> don't know whether we're wrong or not. We wouldn't know about this bug, 
>> for instance.
>
>  From reading the Mathgroup I get the impression that more people are 
> "debugging" Mathematica than using it. This may not bad thing for those 
> who are actually using it, since it presumably helps to improve the 
> program, but I am surprised that so many find this sort of thing worth 
> their while.
>
> Andrzej
>
>
>
>>
>> Bobby
>>
>> On Fri, 30 Jan 2004 15:48:47 +0100, Andrzej Kozlowski 
>> <akoz at mimuw.edu.pl> wrote:
>>
>>> But then if you are going to use it only for problems that are trivial 
>>> to do by hand what is the point of using it at all? Computers are 
>>> supposed to be good at computing, we are supposed to be good at 
>>> thinking.
>>>
>>> Andrzej
>>>
>>>
>>> On 30 Jan 2004, at 10:17, Bobby R. Treat wrote:
>>>
>>>> The only reason we know the answer is wrong is BECAUSE it's trivial by
>>>> hand. It makes no sense to trust Mathematica for problems that are 
>>>> too hard to
>>>> check.
>>>>
>>>> Bobby
>>>>
>>>> Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote in message 
>>>> news:<bvapk6$aat$1 at smc.vnet.net>...
>>>>> Mathematica seems to get lost in the large number of checks that it
>>>>> attempts to perform to find the exact conditions  (in the complex
>>>>> plane) for the convergence of this integral. Even if a and b are
>>>>> assumed to be real there is a problem that 0 may lie in between them.
>>>>> Only in the case when you specify that the limits are both positive 
>>>>> or
>>>>> both negative you get the correct answers because Mathematica can
>>>>> quickly deal with this problem.
>>>>> If you really want to see how much checking Mathematica attempts to 
>>>>> do
>>>>> just evaluate:
>>>>>
>>>>> Trace[Integrate[1/x + x^c, {x, a, b}], TraceInternal->True]
>>>>>
>>>>> and be prepared to wait and obtain a huge output.
>>>>>
>>>>> Anyway, this is clearly a  bug. However, it is in general a good idea
>>>>> not to ask a computer program to do what is trivial to do by hand,
>>>>> which in this case means evaluating a definite rather than an
>>>>> indefinite integral. Note that
>>>>>
>>>>>
>>>>> Integrate[1/x + x^c, x]
>>>>>
>>>>> x^(c + 1)/(c + 1) + Log[x]
>>>>>
>>>>> and the answer is obtained instantly. If this is what you really were
>>>>> after (you can substitute in the limits for example by using:
>>>>>
>>>>>
>>>>> Subtract @@ (Integrate[1/x + x^c, x] /. x -> #1 & ) /@ {b, a}
>>>>>
>>>>>
>>>>> -(a^(c + 1)/(c + 1)) - Log[a] + Log[b] + b^(c + 1)/(c + 1)
>>>>>
>>>>>
>>>>> Of course this now makes sense only under certain conditions on a,b 
>>>>> and
>>>>> c which you now have to determine yourself.
>>>>>
>>>>>
>>>>> On 28 Jan 2004, at 11:19, Math User wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Sorry if this has been discussed before. Could anyone explain why
>>>>>> Mathematica 5.0 is ignoring the term 1/x in the first and second
>>>>>> answers?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>> In[1]:= Integrate[1/x + x^c, {x, a, b}]
>>>>>>
>>>>>> Out[1]= (-a^(1 + c) + b^(1 + c))/(1 + c)
>>>>>>
>>>>>> In[2]:= Integrate[1/x + x^c, {x, a, b}, Assumptions -> {Element[a,
>>>>>> Reals], Element[b, Reals]}]
>>>>>>
>>>>>> Out[2]= (-a^(1 + c) + b^(1 + c))/(1 + c)
>>>>>>
>>>>>> In[3]:= Integrate[1/x + x^c, {x, a, b}, Assumptions -> {a > 0, b > 
>>>>>> 0}]
>>>>>>
>>>>>> Out[3]= (-a^(1 + c) + b^(1 + c))/(1 + c) + Log[b/a]
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>
>>
>>
>>
>




  • Prev by Date: Re: clarification. Re: one liner for a function?
  • Next by Date: Re: Re: AW: Re: Nasty bug in Integrate (version 5.0)
  • Previous by thread: Re: Nasty bug in Integrate (version 5.0)
  • Next by thread: Re: Nasty bug in Integrate (version 5.0)