Earlier this week a colleagues approached me with a problem he was trying to solve with Maple.

The basic problem is to compute the asymptotic expansion of an expression. It's not difficult to see the leading term of this expansion, but Maple's result does not match this expectation. Let me demonstrate:

B := (n,h) -> (n+h)!/r^(n+h) * (1+(P0+h*P1)*r/n);

/ (P0 + h P1) r\

factorial(n + h) |1 + -------------|

\ n /

(n, h) -> ------------------------------------

(n + h)

r

simplify( asympt( B(n,1)/B(n,0)-1, n, 3 ) );

n + O(1)

asympt( simplify( B(n,1)/B(n,0)-1 ), n, 3 );

2

n 1 + r P1 - r P0 r + r P1 - r P0 + (-1 - r P1 + r) P0 r

- + ------------ + ------------------------------------------

r r r n

/ 2 \

\-r P1 + P0 r P1/ P0 /1 \

+ --------------------- + O|--|

2 | 3|

n \n /

The real issue is the drastically different results from the previous two commands. The only difference in the commands is the explicit simplify before or after the call to asympt.

It would be best if this last expression could be seen in the form:

(n+1)/r + (P1-1) + (1-r*P0)*P1/n - r*(1-r*P0)*P0*P1/n^2 + O(1/n^3);

n + 1 (1 - P0 r) P1 r (1 - P0 r) P0 P1 /1 \

----- + P1 - 1 + ------------- - ------------------ + O|--|

r n 2 | 3|

n \n /

What's the difference in the two uses of asympt? This simpler example appears to show the essence of what is going on. On one hand,

B := (n,h) -> 1/r^(n+h);

1

(n, h) -> --------

(n + h)

r

simplify( asympt( B(n,1)/B(n,0)-1, n, 3 ) );

Error, (in asympt) unable to compute series

while on the other hand

asympt( simplify( B(n,1)/B(n,0)-1 ), n, 3 );

r - 1

- -----

r

The only explanation I have for the current behavior is that both 1/r^(n+1) and 1/r^n have the same asymptotic expansion and so their quotient is asymptotically 1.

asympt( B(n,1), n, 3 );

1

----------------------------------

/1 \ n

exp|- I n (1 - signum(r)) Pi| |r|

\2 /

asympt( B(n,0), n, 3 );

1

----------------------------------

/1 \ n

exp|- I n (1 - signum(r)) Pi| |r|

\2 /

From our point of view, this is a bug (or, at least, undocumented feature). But, before I settle on this conclusion, I thougth I would see if anyone on MaplePrimes might be able to justify the current behavior.

Can someone explain what's happening here?

Doug

---------------------------------------------------------------------

Douglas B. Meade <><

Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu

Phone: (803) 777-6183 URL: http://www.math.sc.edu