Menu

#1688 Problems with "residue"

open
nobody
None
5
2012-11-18
2009-06-08
Anonymous
No

Hi,

Sorry for posting this message again, but I've just realised I didn't really "create" a bug report the first time. There seem to be a number of problems with the "residue" function, which may or may not be related, I don't really know.
I've tried the following:

(%i1) set_display('ascii)$
domain : complex $
declare(N, integer) $
H : 1 / (x*(x-x0)*(1 - x^N/y)) $

Problem #1:

(%i5) residue(H, x, 0);
y
(%o5) - ------------
N
x0 y - x x0

This should not depend on x, but it does...
However the residue at x0 does not suffer from the same problem.

(%i6) residue(H, x, x0);
y
(%o6) --------------
N + 1
x0 y - x0

Problem #2:

(%i8) declare(k, integer) $
Hk : x^(k-1) / ((x - x0)*(1 - x^N/y)) $

(%i10) declare(p, integer) $
residue(subst(k=+p, Hk), x, 0);
residue(subst(k=-p, Hk), x, 0);

(%o11) 0
y
(%o12) - -------------------
p N + p
x x0 y - x x0

Funnily enough, the result actually is different, depending on the sign
affected to the parameter... Answer #2 suffers from problem #1, but both
are wrong anyway.

Problem #3:

(%i13) residue(Hk, x, 0);
(%o13) 0

I believe Maxima should ask if k is positive (which makes 0 a zero of order
k-1) or negative (which makes 0 a pole of order 1-k). The residue is 0 only
if k > 0.

Problem #4:

(%i13) kill(m1) $ kill(m2) $ residue(exp(-(m1-m2)*T/RC) * 1/(x - x0) * x^(N*m2) * x/(x - 1), x, 1);
m1 : 1 - a $ m2 : 1 - b $ residue(exp(-(m1-m2)*T/RC) * 1/(x - x0) * x^(N*m2) * x/(x - 1), x, 1);

(%o14) -%e^(((m2-m1)*T)/RC)/(x0-1)
(%o15) 0

Why does the evaluation fails when some of the parameters are not "unknown" but have to be substitued with other expressions ?

Discussion


Log in to post a comment.