7.97 Bug in limit (3.3.97)

7.97.1 Preben Alsholm

I stumbled on the following bug in limit.

Let f and x in f(x) both be unassigned names:

limit( f(x)*exp(-x), x=infinity);
 

Maple answers 0, but should obviously return unevaluated.

It seems that when it doesn’t know enough about f(x), then it returns zero:

limit( -I*erf(I*x)*exp(-x), x=infinity);
 

returns 0, but should return infinity (or unevaluated).

The procedure for limit is complicated. I didn’t get very far in tracking the bug, but did find that

`limit/series`( f(1/x)*exp(-1/x),x,right);
 

correctly returns FAIL. `limit/series` is called from within `limit/limit` which in turn is called from limit.

The bug

limit( -I*erf(I*x)*exp(-x), x=infinity); 
 
                           0
 

may be due to the following feature

limit( f(x)*g(x), x=0); 
 
                       f(0)g(0)
 

which e.g. results in

limit( f(x)*x, x=0); 
 
                           0
 

I would prefer that all three returned unevaluated.