The following would appear to be a pretty straightforward improper integral for Maple to handle:

q := Int( 1/x^p, x=1..infinity );
                                /infinity      
                               |          1    
                               |          -- dx
                               |           p   
                              /1          x    

Things start of well, with Maple recognizing that the answer depends on the value of p:

value( q );               # fine
                         /   (-p + 1)                  \
                         |  x         - 1              |
                    limit|- -------------, x = infinity|
                         \      p - 1                  /

The first case is when p>1:

value( q ) assuming p>1;  # good
                                      1  
                                    -----
                                    p - 1

The other case should be for p<1:

value( q ) assuming p<1;  # say what?
                            infinity p - infinity
                            ---------------------
                                    p - 1        

Hmm. That's not what we would have expected. Why can't Maple understand this one?

To dig a little deeper, let's try the restrictions to 0<p<1 and p<0:

value( q ) assuming p<1 and p>0; # good
                                  infinity
value( q ) assuming p<0;  # good
                                  infinity
These both work well. What's left? p=0
value( q ) assuming p=0;  # why does this cause a problem?
                            infinity p - infinity
                            ---------------------
                                    p - 1        

Say what? Why doesn't Maple simplify this to -infinity?

eval( %, p=0 );
                                  undefined

Aha! Maple is (rightly) complaining that it does not know what to do with infinity times zero.

If we go back to the very beginning, and insert p=0 BEFORE evaluating the integral, then there is no trouble.

value( eval( q, p=0 ) );
                                  infinity

The question remains, why is there a difference in Maple's response to the following two commands:

value( q ) assuming p=0;
value( eval( q, p=0 ) );

Is it because the assuming feature has not fully permeated the integration routines?

As further information related to this problem, consider the situation in which the integral is evaluated with no assumptions on p and this answer is simplified for p<1 and for p>1:

r := int( 1/x^p, x=1..infinity );
                         /   (-p + 1)                  \
                         |  x         - 1              |
                    limit|- -------------, x = infinity|
                         \      p - 1                  /
r assuming p>1;
                                      1  
                                    -----
                                    p - 1
r assuming p<1;
                                  infinity

This seems to work as expected. What really perplexes me is why the first attempt, which would seem to be more robust, actually leads to a situation that Maple is unable to handle completely.

Any ideas?


Please Wait...