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

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

Maple 2015

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).

 > restart:
 > with(Statistics):
 > f := PDF(Cauchy(0, 1), x)
 (1)
 > m := int(x*f, x=-infinity..+infinity);
 (2)
 > p := int(x*f, x);
 (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;
 (4)
 > # Correct "proof" : a := limit(p, x=-infinity); b := limit(p, x=+infinity); b-a
 (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;
 (6)
 > limit(sqrt(2)/x, x=0) - limit(sqrt(2)/y, y=0); limit(Pi/x, x=0)      - limit(Pi/y, y=0);
 (7)
 >