Re: Re: New version, new bugs
- To: mathgroup at smc.vnet.net
- Subject: [mg42406] Re: [mg42397] Re: New version, new bugs
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sat, 5 Jul 2003 03:10:53 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Friday, July 4, 2003, at 02:33 PM, Maxim wrote: > > Andrzej Kozlowski wrote: > >> On Wednesday, July 2, 2003, at 07:36 pm, Maxim wrote: >> >>> Funny that it is easy to find errors even in a couple of >>> demonstrational >>> examples of Mathematica's new capabilities on the Mathworld page >>> (http://mathworld.wolfram.com/news/2003-06-23/mathematica5/): >>> >>> 1) Re[n]>-2 is not a correct convergence condition for >>> >>> Integrate[Abs[x - y]^n, {x, 0, 1}, {y, 0, 1}] >>> >>> (a quick way to see that there's something wrong is to look at the >>> sign >>> of Mathematica's answer when -2<n<-1); >> >> My Mathematica 5.0 simply gives: >> >> Integrate::gener: Unable to check convergence. >> >> as output to this. Am I missing something? >> > > I was just looking at the Mathworld page; one of the examples there was > > In[1]= Integrate[Abs[x - y]^n, {x, 0, 1}, {y, 0, 1}] > > Out[1]= If[Re[n]>-2, 2/((n+1)*(n+2)), Integrate[Abs[x - y]^n, {x, 0, > 1}, {y, > 0, 1}]] > >> >>> >>> 2) Integrate[Log[x], {x, a, b}]/.{a->-1,b->-1-I} >>> >>> gives incorrect answer >>> >>> I + I*Pi - (1 + I)*Log[-1 - I]; >>> >>> this is the tricky case when one of the *endpoints* of the >>> integration >>> path is on the branch cut (see >>> http://library.wolfram.com/infocenter/MathSource/4741/, where this >>> situation is considered for rational functions); >> >> This is true, but >> >> In[7]:= >> Integrate[Log[x], {x, -1, -1 - I}] >> >> Out[7]= >> (-(1/4) + I/4)*((2 - 2*I) + (1 + 2*I)*Pi + 2*I*Log[2]) >> >> which is correct. >> >>> >>> 3) Integrate[Log[x], {x, a, b}]/.{a->I,b->1+I} >>> >>> gives >>> >>> Power::infy: Infinite expression 1/0 encountered. >>> >>> Greater::nord: Invalid comparison with ComplexInfinity attempted. >>> >>> Power::infy: Infinite expression 1/0 encountered. >>> >>> Greater::nord: Invalid comparison with ComplexInfinity attempted. >>> >>> Out[1]= If[ComplexInfinity >= 0 || ComplexInfinity >= 0, <<1>>] >>> >>> because conditions describing the position of the integration path >>> that >>> doesn't cross the branch cut do not include the possibility of the >>> two >>> being parallel. >> >> Again, if you use numeric limits Mathematica 5.0 get's it right >> >> In[8]:= >> Integrate[Log[x], {x, I, 1 + I}] >> >> Out[8]= >> (1/4 + I/4)*((-2 + 2*I) + Pi + Log[4]) >> >> I am not sure that the inability to return always correct answers in >> this type of situation when symbolic limits are used is a "bug" rather >> than just a limitation of the present system. In any case, the fact >> that with numeric limits one gets the right answers is a relief, and >> certainly more important in practice. >> > > What's the point of giving the results in the conditional form then? I > simply > claim that in > > Integrate[Log[x], {x, a, b}] > > (again, according to Mathworld) the condition is incorrect. > > Very cute how the Mathworld page has already been edited. > > When I wrote that I was not sure that was a bug I meant that I was not sure if there is an implementable algorithm that will guarantee correct answers (expressed in conditional form) in all such cases. Certainly, I can't think of one (but then this is not something I think about very often ;-) ). Another question is whether answers of this type are really useful, even when they are correct. After all, if Mathematica could do correctly path integration with numerical limits (so far it seems much better than in earlier versions) then as far as concrete computation is concerned these complicated general conditional formulas would not offer any advantage. As far as theoretical considerations are concerned I can't recall a case when such a formula (again assuming it could be guaranteed to be correct) would give more useful information than what you can get by carefully considering properties of the integrand. So it seems to me that the motivation for this sort of thing is the fashion for explicit "closed form" solutions that seems to be corollated with the spread of computer algebra programs and corresponding decline in analytic skills among their users. Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/