Re: New version, new bugs
- To: mathgroup at smc.vnet.net
- Subject: [mg42384] Re: [mg42365] New version, new bugs
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 3 Jul 2003 06:10:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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? > > 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. Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/