0
$\begingroup$

This is example 11.4.3 in Arfkin, Weber, and Harris: Calculate the following integral around a contour encircling $z=a$:

$$I=\oint_C \frac{\sin ^2(z)dz}{(z-a)^4}$$

The answer is $-\frac{8\pi i}{3}\sin(a)\cos(a)$. In the book they use a derivative formula, but I want to get the same result using Maple.

My attempt is as follows (I am very new to Maple, but this same approach has worked for me on other complex integrals):

f := sin^2*z/(z - a)^4;
                                  2   
                               sin  z 
                         f := --------
                                     4
                              (z - a) 
poles := [a];
                          poles := [a]
C := z -> is(abs(z - a) < 1);
(2*Pi)*I*add(residue(f, z = a), a = select(C, poles));
                               0

Any thoughts for what Maple is doing and how I can get it to evaluate this integral correctly?

$\endgroup$
1
  • $\begingroup$ I'm voting to close this question as off-topic because I misunderstood the [maple] tag - this question is about using the software specifically. I guess I don't understand why this tag exists at all if you can't ask questions like this, but in any case, I think my question should be closed. $\endgroup$
    – levitopher
    Apr 2, 2019 at 14:07

1 Answer 1

3
$\begingroup$

Syntax matters. Your original above has the numerator sin^2*z which doesn't parse to what you expect.

If you were originally using 2D Input mode in the Maple GUI, then I strongly suggest you stop doing that, and change GUI preferences globally to 1D (plaintext) Maple Notation input, and Worksheet instead of Document.

restart;
f := sin(z)^2/(z - a)^4;

                                2 
                          sin(z)  
                     f := --------
                                 4
                          (z - a) 

poles := [a]:
C := z -> is(abs(z - a) < 1):

(2*Pi)*I*add(residue(f, z = a), a = select(C, poles));

                  8                   
                 -- I Pi cos(a) sin(a)
                  3                   
$\endgroup$
1
  • $\begingroup$ Ah of course - something stupid, Perfect and thanks! $\endgroup$
    – levitopher
    Apr 2, 2019 at 1:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .