Question: Can anyone explain me how 'infinity' is treated in Maple

Hi 

I got, a bit by mistake, a weird result that seems to come from the way "Maple" manipulates infinity (please have a look at the results below)
I couldn't find a correct explanation to these results in the help pages dedicated to infinity or evaluation.

Could anyone explain me why, in some circumstances, 'infinity' seems to be a name (for instance infinity*Pi; does not return  infinity but infiniy/Pi).
Thanks in advance

 

restart:

with(Statistics):

f := PDF(Cauchy(0, 1), x)

1/(Pi*(x^2+1))

(1)

m := int(x*f, x=-infinity..+infinity);

undefined

(2)

p := int(x*f, x);

(1/2)*ln(x^2+1)/Pi

(3)

# Naive "proof" : eval(..., infinity) seems to consider infinity as a name (consistent with
# the first line in help(infinity) without any particular property.
# This seems to be confirmed by the value of p1 and p2 : I expected to get infinity instead
# of infinity/Pi.

p1 := eval(p, x=-infinity);
p2 := eval(p, x=+infinity);
p2 - p1;

infinity/Pi

 

infinity/Pi

 

0

(4)

# Correct "proof" :

a := limit(p, x=-infinity);
b := limit(p, x=+infinity);
b-a

infinity

 

infinity

 

undefined

(5)

# Does Maple treat 'infinity' as a number ?

infinity         - infinity;
infinity*2       - infinity*2;
infinity*(1/3)   - infinity*(1/3);
infinity*0.333   - infinity*0.333;
infinity*sqrt(2) - infinity*sqrt(2);
infinity/Pi      - infinity/Pi;

undefined

 

undefined

 

undefined

 

Float(undefined)

 

0

 

0

(6)

limit(sqrt(2)/x, x=0) - limit(sqrt(2)/y, y=0);
limit(Pi/x, x=0)      - limit(Pi/y, y=0);

undefined

 

undefined

(7)

 


 

Download Infinity.mw

Please Wait...