Suspicious behaviour of "residue"



< -----Original Message-----
< From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
< 
< Subject: Suspicious behaviour of "residue"
 However I've come across the following problem, involving residues :
< 
< (%i1) set_display('ascii) $
< domain : complex $
< declare(N, integer) $
< H : 1 / (x*(x - x0)*(1 - x^N/y)) $
< 
< (%i5) residue(H, x, 0);
<                                        y
< (%o5)                           - ------------
<                                           N
<                                   x0 y - x  x0
< 
 

You can compute the residue from first principles and maxima
does it correctly in 2/3 cases:

(%i4) domain:complex$ declare(N,integer)$ H : 1/(x*(x-x0)*(1-x^N/y));

(%o6) 1/(x*(x-x0)*(1-x^N/y))
(%i7) limit(x*H,x,0);

Is  N+1  positive, negative, or zero?

p;
Is  N  positive, negative, or zero?

p;
(%o7) -1/x0
(%i8) limit(x*H,x,0);

Is  N+1  positive, negative, or zero?

p;
Is  N  positive, negative, or zero?

z;
(%o8) -y/(x0*y-x0)

(%i9) is(x^0=1);

(%o9) true
-----------------------------------------------------
Bug: (I have filed a report),

(%i1) domain:complex$ declare(N,integer)$ H:1/((x-x0)*(1-x^N));
(%o3) 1/((1-x^N)*(x-x0))
(%i4) limit(H,x,0);
Is  N+1  positive, negative, or zero?

n;
Is N an even number?

y;
(%o4) -1/x0     <-----incorrect answer


(%i5) H:subst(N=-N,H);
(%o5) 1/((1-1/x^N)*(x-x0))
(%i6) limit(H,x,0);
Is  N-1  positive, negative, or zero?

p;
Is N an even number?

y;
(%o6) 0
(%i7) build_info();

Maxima version: 5.18.1
Maxima build date: 14:8 4/20/2009
host type: i686-pc-linux-gnu
lisp-implementation-type: CLISP
lisp-implementation-version: 2.47 (2008-10-23) (built 3448862542)
(memory 3449221717)


Leo.


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.