On Tue, 29 Jun 2010, David Chappaz wrote:
<
< Hi everyone,
<
< ?
<
< About a year ago, I reported a few problems with the ?residue? function, in particular where residue(expr, z, z0) returns an expression that depends on z?.
<
< More details here:
<
< ?
<
< http://www.math.utexas.edu/pipermail/maxima/2009/016877.html
<
< ?
<
< At the time, I was using maxima 5.18.1. I have now updated to 5.21.1 and as far as I can tell, the residue function still suffers from the same problems.
<
< But it seems there are now a few more issues:
<
< ?
<
< In maxima 5.18.1 I used to observe the following behaviour (which is correct):
<
< ?
<
< (%i1) set_display('ascii) $
<
< H : (a*q^2 + b*q) / (q^2 + 2*c*q + d^2) $
<
< p : solve(denom(H) = 0, q) $
<
< G : fullratsimp(a + 1/z * lsum(residue(H / (1 - q/z), q, qk), qk, [rhs(p[1]), rhs(p[2]), 0]));
<
< ?
<
< Is? (d - c) (d + c)? positive, negative, or zero?p;
<
< ???????????????????????????????????? 2
<
< ????????????????????????????????? a z? + b z
<
< (%o4)??????????????????? ???????---------------
<
< ???????????????????????????????? 2??????????? 2
<
< ??????????????????????????????? z? + 2 c z + d
<
< ?
<
< ?
<
< In maxima 5.21.1 I now get:
<
< ?
<
< set_display('ascii) $
<
< H : (a*q^2 + b*q) / (q^2 + 2*c*q + d^2) $
<
< p : solve(denom(H) = 0, q) $
<
< G : fullratsimp(a + 1/z * lsum(residue(H / (1 - q/z), q, qk), qk, [rhs(p[1]), rhs(p[2]), 0]));
<
< ?
<
< (%o4)????????????????????????????????? a
<
< ?
<
< In fact the problem can be tracked down to here:
<
< ?
<
< (%i5)residue(H / (1 - q/z), q, rhs(p[1]));
<
< (%o5)????????????????????????????????? 0
<
< ?
<
< (%i6)residue(H / (1 - q/z), q, rhs(p[2]));
<
< (%o6)????????????????????????????????? 0
<
< ?
<
< ?
<
< Therefore it looks like something has been broken between 5.18.1 and 5.21.1.
<
< However, both versions also suffer from the further problem below:
<
< ?
<
< (%i1)assume(T > 0) $
<
< assume(RC > 0) $
<
< declare(N, integer) $
<
< assume(N > 0) $
<
< assume(a >= 0 and a <= 1) $
<
< assume(b >= a and b <= 1) $
<
< m1 : 1 - a $
<
< m2 : 1 - b $
<
< exp(-(m1-m2)*T/RC) * residue(1/(q - q0) * q^(m2*N) * q/(q - 1), q, 1);
<
< residue(exp(-(m1-m2)*T/RC) * 1/(q - q0) * q^(m2*N) * q/(q - 1), q, 1);
<
< ?
<
< ???????????????????????????????????? (a - b) T
<
< ???????????????????????????????????? ---------
<
< ??????????????????????????????????????? RC
<
< ????????????????????? ?????????????%e
<
< (%o9)??????????????????????????? - -----------
<
< ???????????????????????????????????? q0 - 1
<
< (%o10)???????????????????????????????? 0
<
< ?
<
< ?
<
< Obviously both answers should be identical, since the factor exp(-(m1-m2)*T/RC) does not depend on the variable q, therefore it should have no influence, inside or
< outside of ?residue?. I have tried to understand the cause of the problem, to no avail?.
<
< ?
<
< Beause of all these issues, I am a bit struggling to work with the ?residue? function?. Obviously residues can always be determined with ?ad hoc? solutions, on a
< case by case basis. But I?m using residues in a ?black box? where ad hoc solutions are just not an option, and all I can do is call the generic ?residue? function.
< Can anyone help ?
<
< ?
<
< Many thanks,
<
< David.
David, since there hasn't been a response to your email, would
you please file a bug report at
http://sourceforge.net/tracker/?group_id=4933&atid=104933
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.