REDUCE

7.15 RESIDUE and POLEORDER Operators

The residue Resz=af(z) of a function f(z) at the point a is defined as

            1  ∮
Res f(z) = ----  f(z)dz,
 z=a        2πi

with integration along a closed curve around z = a with winding number 1.

If f(z) is given by a Laurent series expansion at z = a

        ∞∑
f(z) =      ak(z − a)k,
       k=−∞

then

Rze=sa f(z) = a− 1.
(7.1)

If a = , one defines on the other hand

Res f (z) = − a−1
z=∞
(7.2)

for given Laurent representation

        ∑∞
f (z ) =      ak 1-.
       k=− ∞   zk

The operator residue(f,z,a) determines the residue of f at the point z = a if f is meromorphic at z = a. The calculation of residues at essential singularities of f is not supported, as are the residues of factorial terms.2

poleorder(f,z,a) determines the pole order of f at the point z = a if f is meromorphic at z = a.

Note that both functions use the operator taylor in connection with representations (7.1)–(7.2).

Here are some examples:

2: residue(x/(x^2-2),x,sqrt(2));  
 
 1  
---  
 2  
 
3: poleorder(x/(x^2-2),x,sqrt(2));  
 
1  
 
4: residue(sin(x)/(x^2-2),x,sqrt(2));  
 
 sqrt(2)*sin(sqrt(2))  
----------------------  
          4  
 
5: poleorder(sin(x)/(x^2-2),x,sqrt(2));  
 
1  
 
6: residue(1/(x-1)^m/(x-2)^2,x,2);  
 
 - m  
 
7: poleorder(1/(x-1)/(x-2)^2,x,2);  
 
2  
 
8: residue(sin(x)/x^2,x,0);  
 
1  
 
9: poleorder(sin(x)/x^2,x,0);  
 
1  
 
10: residue((1+x^2)/(1-x^2),x,1);  
 
-1  
 
11: poleorder((1+x^2)/(1-x^2),x,1);  
 
1  
 
12: residue((1+x^2)/(1-x^2),x,-1);  
 
1  
 
13: poleorder((1+x^2)/(1-x^2),x,-1);  
 
1  
 
14: residue(tan(x),x,pi/2);  
 
-1  
 
15: poleorder(tan(x),x,pi/2);  
 
1  
 
16: residue((x^n-y^n)/(x-y),x,y);  
 
0  
 
17: poleorder((x^n-y^n)/(x-y),x,y);  
 
0  
 
18: residue((x^n-y^n)/(x-y)^2,x,y);  
 
  n  
 y *n  
------  
  y  
 
19: poleorder((x^n-y^n)/(x-y)^2,x,y);  
 
1  
 
20: residue(tan(x)/sec(x-pi/2)+1/cos(x),x,pi/2);  
 
-2  
 
21: poleorder(tan(x)/sec(x-pi/2)+1/cos(x),x,pi/2);  
 
1  
 
22: for k:=1:2 sum residue((a+b*x+c*x^2)/(d+e*x+f*x^2),x,  
    part(part(solve(d+e*x+f*x^2,x),k),2));  
 
 b*f - c*e  
-----------  
     2  
    f  
 
23: residue(x^3/sin(1/x)^2,x,infinity);  
 
  - 1  
------  
  15  
 
24: residue(x^3*sin(1/x)^2,x,infinity);  
 
-1  
 
25: residue(gamma(x),x,-1);  
 
-1  
 
26: residue(psi(x),x,-1);  
 
-1  
 
27: on fullroots;  
 
28: for k:=1:3 sum  
28: residue((a+b*x+c*x^2+d*x^3)/(e+f*x+g*x^2+h*x^3),x,  
28: part(part(solve(e+f*x+g*x^2+h*x^3,x),k),2));  
 
0