MathGroup Archive 2005

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

Search the Archive

Re: Re: Mathematica goes Bad

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59633] Re: [mg59580] Re: Mathematica goes Bad
  • From: Andrzej Kozlowski <akozlowski at gmail.com>
  • Date: Mon, 15 Aug 2005 06:50:26 -0400 (EDT)
  • References: <200508090730.DAA19089@smc.vnet.net> <ddcb4g$5bk$1@smc.vnet.net> <200508120737.DAA17602@smc.vnet.net> <921F0382-16A0-4B2B-8A3D-5FF38521F458@mimuw.edu.pl> <E0B419F0-2E00-4661-90AA-571BE03C653C@gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Since the expression "infinite path" could be confusing,  I mean by  
it a path not contained in any compact subset of the complex plane.  
Perhaps one needs to be a little more careful in defining them to  
avoid any possible problems with space filling curves which do not  
really define any "infinity". These infinite paths are mean to  
correspond to curves from a point in the interior of the unit disc to  
the boundary of the disc. By choosing a diffeomorphism between the  
open unit disc and the complex plane  we can obtain all the "infinite  
paths" in the complex plane.

Andrzej Kozlowski


On 14 Aug 2005, at 14:23, Andrzej Kozlowski wrote:


> I am inclined to believe that I have now found a better approach,  
> although it still leads to somewhat strane consequences  
> (particularly, as I will show at the end, in Maxim's case). In any  
> case the inspiration for the following whether right or wrong came  
> form a remark of Daniel Lichtblau in a private response to my posting:
>
>
>
>>  The general issue of a finite offset being discarded from a  
>> directed infinity is problematic.
>>
>>
>
> I think this is the central issue. Any topological model of  
> "infinities" in the complex plane  that can resolve the  
> contradictions that appear in the present one would have, it seems,  
> to allow for more infinities than just things of the form  
> DirectedInfinity[z], where z is a unit complex number. I don't  
> think, however, one can construct such a model unless one starts  
> with a larger space than the complex plane itself. Below I shall  
> try first to describe a possible model and then show how it would  
> work in practice. Of course, one may question the need to have a  
> topological model at all; one could just add certain rules for  
> behaviour at infinity and hope for the best. However, with this  
> approach I think it is inevitable that it will always be possible  
> contradictions of the kind that arise in the present model.
>
> The essential idea is this. In the current model and "infinity" in  
> the complex plane essentially corresponds to one of the directions  
> leading form the origin of the complex plane to infinity. As I  
> pointed out earlier, it seems to me that there is no hope to make  
> this model work well analytically. The model that I am proposing  
> will  consider as "an infinity" any infinite path originating  
> anywhere in the complex plane.  Probably it is a good idea for two  
> such paths to be identified as "the same" infinity when they  
> coincide "after some finite time". To define a suitable topological  
> space one can proceed as follows. We consider the space Maps(I,C)  
> of all continuous paths in C (the complex plane) that is continuous  
> paths from the unit interval I to C. This space is diffeomorphic to  
> the space of Maps(I,Int D), where the Int D is the interior of the  
> closed unit disc D, that is the open unit disc. Now, when we  
> compactify this space we will get just Maps(I,D), which is  
> differomorphic to the compactification of Map(I,C). Intiuitively  
> our space now consists of all finite paths in C and all unbounded  
> paths in C with one end point "at infinity". The points of C could  
> now be identified with constant paths the infinities with all paths  
> leading from a point of C to infinity. The problem with this space  
> is that we feel that infinite  paths which differ only inside a  
> compact region should represent the same infinity. So we can  
> perform this identification and obtain a topological space with the  
> resulting identification topology.
>
> We obtain a topological space CC whose set of points consists of  
> the usual points of C, all "finite" directed paths in C and all  
> infinite directed paths, where two infinite paths are considered  
> the same if they differ only inside a compact subset of C. These  
> infinite paths are our infinities. They include all the standard  
> DirectedInfinity[z] but in addition lots  others.
> It is easy to see that any analytic functions C->C can be extended  
> to continuous function CC->CC. We simply send points to  
> corresponding points, paths to corresponding paths and infinite  
> paths to corresponding infinite paths.
>
> Now when we think of an infinity as an "equivalence class of paths"  
> it is easy to see what  p+K is, where p is any finite complex  
> number and K is a "infinite directed path". It is simply the  
> infinite  directed path  K translated by the vector p. Thus
> in CC the expression Infinity + Pi * I is no longer equal to  
> Infinity. The former is "an infinity" that can be represented by an  
> infinite path obtained by starting at any point z with Im[z]=Pi and  
> then continuing horizontally to the right  and this is now  
> different from the one given by moving radially from 0 to infinity  
> along the positive real axis.
> On the other hand 2+Infinity (same as 2+DirectedInfinity[1]) is  
> clearly just Infinity while 2I + DirectedInfinity[I] is  
> DirectedInfinity[I] etc.
>
> I think with all the above we now have a fairly solid topological  
> model and we can solve some of the problems that appear in the  
> present one.
>
>
> First consider the case:
>
> Exp[Limit[x+Pi*I,x->Infinity] ]
>
> We first compute Limit[x+Pi*I,x->Infinity]. This represents a path  
> to infinity along the line Im[z]=Pi and denoted by Infinity+Pi*I.  
> We then apply Exp to all the points on this path and clearly obtain  
> the path that runs along the real line in the negative direction,  
> in other words -Infinity. No problem here.
>
> However, consider now Maxim's case:
>
> Exp[Limit[x+2*ArcTan[x]*I,x->Infinity] ].
>
> This time Limit[x+2*ArcTan[x]*I,x->Infinity] represents a different  
> path, given in parametric coordiantes by {x,2*ArtTan[x]}, as x goes  
> along the real axis form 0 to Infinity. Suppose we apply Exp to the  
> points in the complex plane on this path. We obtain the path that  
> indeed goes to infinity, but it never moves along the real axis but  
> along an infinite curve in the complex plane. Thus according to  
> this model the answer is not -Infinity but another "infinity", for  
> which unfortunately we lack a suitable notation. Note however that  
> according to our model the limit of the real part of the above  
> expression is indeed -Infinity, which is something that the current  
> Mathematica already knows:
>
>
> Limit[Re[E^(x + 2*I*ArcTan[x])], x -> Infinity]
>
>
> -Infinity
>
> Having considered all this I have come to an unexpected conclusion.  
> I am no longer convinced that the new answer returned (according to  
> Daniel Lichtblau)  by development version of Mathematica and stated  
> by Maxim as the correct one, namely
>
> Limit[E^(x + 2*I*ArcTan[x])], x -> Infinity] == -Infinity
>
> can be made mathematical sense of in any rigorous mathematical  
> model of infinities. I can see a rigorous way to show that this  
> answer is ComplexInfinity in the Riemann sphere model and I think I  
> can see how to get the answer "some kind of infinity" (the model  
> sketched above). I can't see to get the answer -Infinity, (even  
> though it is suggested by intuition). I may be confused, if anyone  
> can think of a "rigorous" way to prove that the answer really  
> "should be" -Infinity I would like to see the argument.
>
> Andrzej Kozlowski
>
>
>
>
>
>
>
>
> On 12 Aug 2005, at 17:14, Andrzej Kozlowski wrote:
>
>
>
>>
>> On 12 Aug 2005, at 09:37, Maxim wrote:
>>
>>
>>
>>
>>> On Wed, 10 Aug 2005 07:42:08 +0000 (UTC), Daniel Lichtblau
>>> <danl at wolfram.com> wrote:
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> I think it is safe to say that symbolic calculus is fraught with
>>>> problematic areas where, for example, mistakes involving a  
>>>> combination
>>>> of branch cuts and arithmetic with infinities can lead to erroneous
>>>> results. I do not see any evidence of this sort of phenomenon in  
>>>> the
>>>> example above, though. That was just a design decision. While  
>>>> you may
>>>> think it was the wrong thing to do, it is not symptomatic of deep
>>>> mathematical flaws.
>>>>
>>>> I will note that by our metrics the number of open bugs in Limit  
>>>> dropped
>>>> sharply between versions 4 and 5 of Mathematica (I am not going to
>>>> quantify more closely than that).
>>>>
>>>>
>>>> Daniel Lichtblau
>>>> Wolfram Research
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> Certainly this model of directed infinities has some peculiar  
>>> properties.
>>> For example, some functional identities don't hold when infinite
>>> quantities are involved:
>>>
>>> In[1]:= E^Infinity*E^(I*Pi) == E^(Infinity + I*Pi)
>>>
>>> Out[1]= False
>>>
>>> So E^(a + b) != E^a*E^b. This also means that Exp is not a  
>>> continuous
>>> function anymore:
>>>
>>> In[2]:= Limit[E^(x + 2*I*ArcTan[x]), x -> Infinity]
>>>
>>> Out[2]= Infinity
>>>
>>> This is the result we get if we interchange Exp and Limit  
>>> operations,
>>> which is equivalent to continuity. However, the correct result is
>>> -Infinity (Arg tends to Pi).
>>>
>>>
>>>
>>
>>
>> This is a good example, which indeed brings up one of the  
>> problematic aspects of Mathematica's "intuitive" and "informal"  
>> approach to certain mathematical issues. I am very fond of this  
>> informality, but I think that there are situations where it  
>> requires more care on the part of the user than would be the case  
>> with a program that required the user always to specify domains of  
>> functions, ground fields (real complex) for algebraic structures etc.
>>
>> In particular,  when one considers such notions as of continuity  
>> and limits one has to be  clear about what topological space one  
>> is working working with. Leaving this out and using "intuition"  
>> can sometimes tie one in all sort of knots. Unfortunately,  
>> Mathematica's "intuitive" approach in this case easily leads to  
>> confusion. The problem is that Matheamtica allows one to combine  
>> together objects belonging to different mathematical realms and  
>> perform operations on them that only make sense in one of them.
>>
>>
>> One example of this is that Mathematica allows one to combine the  
>> three objects, Infinity, -Infinty and ComplexInfinity in the same  
>> expression. If one treats these as purely formal algebraic  
>> entities one can probably state a consistent set of rules for  
>> dealing with all three in this way, but it is a different matter  
>> if you want to consider topological notions such as convergence.  
>> You then need a well defined topological space and these three  
>> object do not belong to the same one.
>>
>> In fact there are at least three topological spaces that are  
>> relevant in the context of Infinity, -Infinity and  
>> ComplexInfinity. First of all there is the standard two-point  
>> comactification of the real line (topologically the closed unit  
>> interval) [-Infinity,Infinity]. Secondly, there is the "Riemann- 
>> sphere" one point compactification of the complex plane,  
>> consisting of all the complex numbers plus the point at infinity,  
>> denoted in Mathematica by ComplexInfinity.
>>
>> Last  there is something problematic: another "compactification"  
>> of the complex plane  that turns it not into the Riemann sphere  
>> but into a closed disk, with the complex plane corresponding to  
>> the open disk whose boundary consists of DirectedInfinities in  
>> various directions.  You can think of it as the complex numbers  
>> plus entities of the form  DirectedInfinity[z], where z is a unit  
>> complex number. This compactification includes  
>> Infinity=DirectedInfinity[1]  and -Infinity=DirectedInfinity[-1]  
>> but not ComplexInfinity. It is this compactification that is often  
>> used by Mathematica. Unfortunately, this compactification has  
>> rather bad and unintuitive properties analytic properties.
>> One of them is that functions continuous on the complex plane  
>> (interior of the disc) may not have a continuous extension to the  
>> boundary. One such example is provided by the exponential  
>> function. Consider the simple question related to Maxim's example:  
>> what should be the value of Exp at DirectedInfinity[1]? One might  
>> think that it is enough to take a sequence of points in the  
>> complex plane converging to DirectedInfinity[1] and take the limit  
>> of this sequence as the value of Exp. But, of course this can't be  
>> done in the obvious way. Indeed, consider the sequences  x=a+ I Pi  
>> and x=a + 2 I Pi as a -> DirectedInfinity[1] along the positive  
>> real line. In both cases x tends to DirectedInfinity[1] (although  
>> not along rays form 0!) but in the first case we have
>>
>>
>> Simplify[Exp[a + I*Pi], a â?? Reals]
>>
>> -E^a
>>
>> while in the second
>>
>>
>> Simplify[Exp[a + 2*I*Pi], a â?? Reals]
>>
>> E^a
>>
>> Thus the first path should give us DirectedInfinity[-1] as the  
>> value of Exp[DirectedInfinity[1]] while the other should give  
>> DirectedInfinity[1]. This forces us to say that Exp 
>> [DirectedInfinity[1]] is actually not defined continuously althogh  
>> Exp[Infinity] is clearly Infinity. Here I am distinguishing  
>> Infinity (one of the ends of the two point compactification of the  
>> real line) and DirectedInfinity[1] but of course Mathematica  
>> considers them to be the same. Actually Exp[DirectedInfinity[1]]  
>> should either be left undefined  or defined as ComplexInfinity.
>>
>>
>> Of course if Mathematica consistently used the Riemann sphere one  
>> point compactification when dealing with complex infinities such  
>> problems would not occur. In the discussed example the argument  
>> would run as follows:
>>
>>
>> Consider the expression:
>>
>> Limit[E^(x + 2*I*ArcTan[x]), x -> Infinity]
>>
>> To start with, the fact that we see x->Infinity eliminates the  
>> possibility that x is a point on the Riemann sphere, since on the  
>> Riemann sphere no such thing as Infinity exists. So we must x as a  
>> real valued variable.  That means of course that 2*I*ArtTan[x] is  
>> now imaginary valued and x + 2*I*ArcTan[x] must lie on the Riemann  
>> sphere. We can now use continuity and the answer turns out to be  
>> uncontroversially
>> ComplexInfinity (there is no Infinity or -Infinity in the Riemann  
>> sphere model). This would give ComplexInfinity as the final answer.
>>
>> If we adopted this approach (Infinity and -Infinity are only used  
>> in a purely real context -- the two point compactification of the  
>> real line while in the complex context we always use  
>> ComplexInfinity) we could still get the more informative answer - 
>> Infinity but we would have to approach the problem differently. In  
>> order to avoid getting ComplexInfinity (which is the only infinity  
>> in the complex plane) we would have to make sure that the function  
>> whose limit we are seeking is always real valued. For example, in  
>> the above case we could do:
>>
>>
>> Limit[ComplexExpand[Re[E^(x + 2*I*ArcTan[x])]],
>>   x -> Infinity]
>>
>>
>> -Infinity
>>
>> Of course the current version of Mathematica returns
>>
>>
>>
>> Limit[ComplexExpand[E^(x + 2*I*ArcTan[x])],
>>   x -> Infinity]
>>
>> -Infinity
>>
>> which while happens to be what we wanted is, in my opinion,  
>> "incorrect", in view of what I tried to argue above. The correct  
>> answer ought to be ComplexInfinity. I realize that to many this  
>> may seem excessively pedantic but I can't see any other view to  
>> deal with the problem pointed out by Maxim. In other words the  
>> proposed solution is: return Infinity or -Infinity only as limits  
>> of functions which are unambiguously real valued; in all other  
>> cases return ComplexInfinity. DirectedInfinity[1] and  
>> DirectedInfinity[-1] should be distingushed from Infinity and - 
>> Infinity.
>> Expressions such as Infinity + I*Pi should either be returned  
>> unevaluated or interpreted as ComplexInfinity+I*Pi. One could  
>> still, use DirectedInfinity for limits:
>>
>>
>> Limit[x, x -> DirectedInfinity[I]]
>>
>> DirectedInfinity[I]
>>
>> although this answer should (probably) be ComplexInfinity.
>>
>>
>> The answer ComplexInfininity I consider correct in all cases,  
>> though of course to return it in all cases could sometimes be  
>> viewed a "loss of information".
>>
>> If anyone has a better idea that solves the problem pointed out by  
>> Maxim then I would like to hear of it.
>>
>> Andrzej Kozlowski
>>
>>
>>
>>
>
>
>
>



  • Prev by Date: Re: NDSolve
  • Next by Date: Re: Re: Some bugs in Mathematica
  • Previous by thread: Re: Re: Mathematica goes Bad
  • Next by thread: Re: Mathematica goes Bad