# Residue theorem question

1. Sep 9, 2010

### quasar_4

Hi,

I am trying to prove that I have the correct value of an integral of the form $$\int_0^{2 \pi} f(\cos{\theta},\sin{\theta}) d\theta$$. I want to use the residue theorem, but I have one problem: all the literature I can find says that for contour integrals of this form, you can only use the residue theorem when the poles don't lie on the contour, and my poles are at z=0 and z=-1, so both lie on the contour.

I then thought I could just indent around these poles with two small contours, but I can't find any similar examples - everything I can find using Jordan's lemma or the Cauchy principle value is for an improper integral, and that's not what I've got. So... can I make indentations on my contour, compute the contributions from the poles inside, and use the residue theorem? Or will this not be valid for my type of definite integral?

2. Sep 9, 2010

### snipez90

If f is a rational function of two variables which is continuous on the unit circle, then put $z = e^{i \theta}$ to convert the integral you have to an integral of an analytic function over the unit circle. To do this, note that $\cos \theta = (z + 1/z)/2$ and $\sin \theta = (z-1/z)/(2i).$

Doing this ensures that the integrand has no pole on the unit circle by assumption. It follows from the residue theorem for the circle that
$$\int_{0}^{2\pi} f(\cos \theta, \sin \theta)\,d \theta = 2 \pi i \sum \mbox{ residues of f inside the unit circle. }$$

*EDIT* Sorry, did not notice that one of the poles was on the contour. Hmm, I think we should be able to enclose that pole with an extra indent but to be honest I've only computed a few integrals by actually using the residue theorem. I'll try to figure this out. By the way could you post the integral you were working on?

Last edited: Sep 9, 2010
3. Sep 10, 2010

### quasar_4

Hi snipez90,

thanks for the reply! I actually have several integrals of this form, but for a concrete example one is given by $$-2 \pi \int_0^{\pi} \frac{\cos{2\theta}}{1+\cos{\theta}} d\theta$$.

Since the integrand is symmetric, I decided to integrate from 0 to 2*pi and take half the answer (to put the integral into the 0 to 2*pi form I kept seeing in the literature/textbooks). So, making all the subtsitutions, I get this to become the following contour integral:

$$2 \pi i \oint \frac{1+z^4}{z^2 (1+z)^2} dz$$

This has a pole of order two at z=0 and a pole of order two at z=-1, both of which lie on the real axis. But, since I'm now integrating from 0 to 2*pi, I was thinking I could choose a contour that makes a complete circle except at z=-1, where I'd make a semi-circle of radius rho (where rho is small) around the pole and compute the contribution from that pole. This would leave the z=0 pole inside, but not ON the contour.

I think this method works, though I'm not sure which way I need to indent around z=-1 (clockwise or counterclockwise) and also, if I need to make any rigorous arguments about rho approaching zero... Is this a correct application of the residue theorem?

4. Sep 11, 2010

### snipez90

What is the source of this particular integral? I think it diverges. The 1 + cos(x) in the denominator seems to throw everything off as the function approaches x = pi...

5. Sep 11, 2010

### jackmell

That integral I believe is asymptotic to k/x at x=0 so it diverges. Also, you cannot indent around a non-simple pole and have the limit converge as you reduce it's diameter to zero. The whole indentation thing is based on simple poles.

I guess I should write:

$$\frac{\cos(2t)}{1+\cos(t)}\sim \frac{c}{\pi-t}$$

near $t=\pi$. And therefore the integral diverges.

Last edited: Sep 11, 2010
6. Sep 12, 2010

### quasar_4

Why can you not indent around a pole of higher order (just curious)? Is that always true?

To see if I understand, the only way the integral could converge is if the indentation around a simple pole will go to zero as the radius shrinks... is that right? Is that why higher order poles can't be indented?

And does this mean that there is no analytical solution to this integral, or just that I have to use another technique instead of the residue theorem?

7. Sep 12, 2010

### snipez90

Hi, can you expand upon that part? You should be able to apply the residue theorem to the contour described above regardless of what type of poles are enclosed right (this is the theorem in my complex analysis text applied to "toy contours", i.e. contours that are topologically easy to consider)? Is the issue specifically with making the semicircle vanish around non-simple poles?

*EDIT* Instaposted by a minute, heh. quasar_4, the integral does not converge and thus has no meaning. Any computation that leads to a numerical answer would be invalid.

Last edited: Sep 12, 2010
8. Sep 12, 2010

### quasar_4

Bummer!! I really wanted a pretty analytical solution to this... *sigh*.

What do you mean that a numerical solution wouldn't make sense? Does that mean I can't even use some approximation? I guess I was thinking that if there was no analytical solution, then the next step would be to expand things into series and try to make approximations numerically.

9. Sep 12, 2010

### jackmell

(1)Because if you take the limit of a contour integral around any arc of a simple pole and let it's radius go to zero, the integral converges. It diverges if the pole is higher order.

Your second question is unclear. We often let the radius of the indentation go to zero in order to take some principle value of the integral along the remainder of the contour.

The integral diverges and thus has no solution but I think I made a mistake with the asymptotics near $t=\pi$:

$$\frac{k}{1+\cos(t)}\sim \frac{c}{(t-\pi)^2}$$

10. Sep 16, 2010

### quasar_4

Hey jackmell,

Do you know how to prove this rigorously?

I have a bunch of integrals, and all have poles of order 2 or higher ON the contour. They basically all diverge at pi (*sigh*) and the problem is that they represent something physical, so it makes no physical sense for these integrals to diverge. I can handle them not being analytical but I'm perplexed as to how they would have no solution. If this is indeed the case, I must be able to prove it myself (despite having basically no background in analysis :P)

11. Sep 16, 2010

### jackmell

The one above diverges. Post another one and we can work on it although I won't be able to get to it until tomorrow. Others can help too though.

12. Sep 17, 2010

### quasar_4

Ok - here are some integrals. Also, I discovered to my horror yesterday that I accidentally dropped a sin(theta) from the solid angle integration, and that changed EVERYTHING. :/

So I've got: 1. $$\int_0^{\pi} \frac{-2 \pi \sin{\theta}}{(1+\cos{\theta})(q+\cos{\theta})} d\theta \equiv \oint \frac{4 \pi (z-1)}{(z+1) (1+2 q z+z^2)} dz$$

2. $$\int_0^{\pi} \frac{-2 \pi \sin{\theta}\cos{2\theta}}{(1+\cos{\theta})} d\theta \equiv \oint \frac{\pi (z-1)(1+z^4)}{z^3 (1+z)} dz$$

3. $$\int_0^{\pi} \frac{2 \pi q \sin{2\theta}\cos{2\theta}}{(1+\cos{\theta})} d\theta$$

Now since I have the sine terms in the numerators, my functions aren't even anymore and I can't use a whole unit circle in the complex plane, only a half circle.

For the first integral I was thinking of doing half of a pacman, basically - arc around the unit circle for 0 < theta < 3*pi/4, then make a radial line going to the origin. This contour isn't so bad because there are only simple poles, and the integral definitely converges (I think) though I'm not 100% sure HOW to compute the actual value (if I just use the residue theorem, I'm ok, but I am not sure if I need to do something special to deal with the pole at z=-1 (my pac-man contour avoids this singularity, and the contour then encloses just one of the other poles).

The second integral is where I have real trouble. Because these are definite integrals from 0 to pi, I'm stuck using unit circle contours, and one of the poles lies on the corner of the half circle at z=-1. To make matters worse, I have a pole of order 3 at z=0. Different people keep telling me different things, and now I don't understand how to deal with this. One of my professors said I could still indent around z=0, even though it's a pole of order 3. On this forum, people are saying you can't do this for anything but a simple pole. And I'm also not sure how to deal with the quarter circle indentation around z=-1. Basically, I'm kind of lost as to how I could actually evaluate this integral... and yet, it's something that's a physical quantity, and I need it to exist, so I am in real trouble if there just isn't a solution.

Note: q = cos(xi), which is a constant in this problem. Ultimately if there are analytic solutions (I know, probably not) then they should end up being functions of xi. There is also a variable p=sin(xi), so one can use the fact that q^2+p^2 =1 to help simplify things a bit.

13. Sep 17, 2010

### jackmell

Quasar, this is what you need to do from now on ok: you've got to find a machine running Mathematica or use Wolfram Alpha and learn how to input problems you're working on just to get a general appraisal of the situation keeping in mind that Mathematica is not 100% correct but at least 98% I would say. So I input all four integrals and Mathematica says they all diverge. Again, 98% confidence at least, that they do indeed diverge in the Riemann sense since that's the default Mathematica is using. Of course in the Cauchy sense, a divergent Riemann integral can converge nicely but I don't think that's the case here simply because we're dealing with non-simple poles. We can probably prove divergence using asymptotics like I did with the first one or just show divergence applying the Residue Theorem to an indentation around a non-simple pole. And also, I'm not an Analyst and might be wrong with some things, so you need to do the work yourself and prove it to yourself.

Last edited: Sep 17, 2010
14. Sep 17, 2010

### quasar_4

Thanks. You're absolutely right about that - it's an important skill to be able to appraise things without having a specific answer. I just started research and am new to this, so I'm working to make it a habit from now on! :-)

15. Sep 20, 2010

### mathwonk

look. a higher order pole is good, not bad. if you want to integrate say 1/z^2 around a closed arc, it always gives zero, because this is the derivative of -1/z.

so you can certainly integrate it around a small contour centered at the pole and get zero. this is why it does niot matter which way you go around the pole.

so it looks to me offhand that those integrals are doable precisely because, even though they have poles on the contour, there is no residue there, i.e. the coefficient of 1/z is zero. I could be wrong but I don't think so.

I.e. the first thing to do is to define what you mean by an integral along a contour that passes through a pole, and it looks to me as if you can do that precisely when the residue at that pole is zero.

In particular the remarks above about divergence seem false. but I would have to actually calculate it to be sure. i am just saying how it looks to me without doing any work.

16. Sep 20, 2010

### jackmell

\begin{aligned} &=\lim_{\rho\to 0}\mathop\int\limits_{\Gamma(t)} \frac{1}{z^2}dz,\quad \Gamma(t)=\rho e^{it},\quad 0\leq t\leq \alpha \\ &=\lim_{\rho\to 0} \int_{0}^{\alpha} \frac{\rho i e^{it}}{\rho^2 e^{2 it}} dt \\ &=\lim_{\rho\to 0}i\int_0^{\alpha} \frac{1}{\rho e^{it}}dt \\ &=k i \infty \end{aligned}

Same dif with higher-ordered poles.

17. Sep 20, 2010

### mathwonk

pardon me if i was unclear. the point is that the integral over the original curve can be defined without taking this limit.

i.e. you don't take a limit, you just define the integral over any one dented contour. the integral over the dented contour is the same without regard to which dented contour you take.

I.e. there is obviously no difficulty in integrating 1/z^2 over any contour in the plane, by antidifferentiation and evaluating at endpoints.

so maybe I was too vague if I implied this integral does not diverge, just that that is irrelevant to the problem of evaluating a contour integral.

Indeed the divergence of what you wrote down is immediately and much more easily implied by using antidifferentiation, since 1/z diverges as z goes to zero, but that is not a problem.

Even though the integral around the dent diverges, the whole contour integral wherein you add that integral to the rest of the integral around the rest of the path does not diverge. i.e. the two integrals you are adding up both diverge in a way that cancel each other out, but you don't need to break them up that way.

this a residue problem, and one definition of the residue at the point is the limit of your path integral where alpha equals 2pi, and that integral is zero for all rho.

What am I missing?

Last edited: Sep 20, 2010
18. Sep 20, 2010

### jackmell

Jesus, give me a break. More than likely you got this better than me. I do have comments:

I would say any contour not including the origin that would be true for.

I agree we can take the limit of infinite terms in the contour. But I fail to see taking the limit of a circular contour, indented around the pole at -1, is the same as the original substitution z=e^{it} for a circle, and not a circle with an indentation around a point.

What then do you argue is:

$$\int_{0}^{\pi} \frac{\cos(2t)}{1+\cos(t)}dt$$

19. Sep 20, 2010

### snipez90

Yes, please return to the original integrals, as I fail to see how this talk about 1/z^2 sheds any light on the original situation (perhaps if the relationship was specified...). I was confident that the residue theorem could be applied, until that first integral was posted. Intuition suggested that the integral diverged, and jackmell gave the asymptotic argument, which I later convinced myself of by taking limits. As everyone is probably aware of, convergence of an integral and calculation of its value can often be treated as separate questions, and without the former the latter is meaningless.

Thus, show that the very first integral posted converges or give an argument that demonstrates both convergence and the correct value of the integral. I'm skeptical, but that's partly because if this question could easily be resolved by making the indent in the unit circle, then I'm sure Ahlfors, Lang, Marsden, Stein and Shakarchi, and other sources would have mentioned it.

20. Sep 20, 2010

### mathwonk

well I'm not too nuts about that integral since the bottom does seem to have a double pole at an endpoint. I was looking at that integral in post 3 with the z's in them taken around closed curves. that has zero residues at both poles.

i claim you can integrate around any closed curve as long as the curve does not pass through a pole where the residue is non zero. I.e. then the value changes depending which way you go around the pole to avoid it.

The revised integral given by the original poster had a sine instead of a cosine in the top. does that help? I.e. if you are saying you can take a limit as you approach a simple pole as an endpoint, then the sin in the top seems to reduce the order of the double pole of the bottom at pi.

??? I am still too lazy to actually try to do the integral. If I am doing more harm than good I will just hush.

21. Sep 20, 2010

### mathwonk

but notice that if by "first integral posted" you mean the one in post 3, that it seems to have been changed in post 12 to a different integral which has different behavior at pi. doesn't it? I mean with sin instead of cos, since sin(pi) = 0.

Last edited: Sep 20, 2010
22. Sep 20, 2010

### mathwonk

well I have learned something here. My remarks were correct about defining and evaluating contour integrals in the plane, but that is not what you are doing. You are interested in evaluating real, sometimes improper, integrals on the real line.

thus your definition of the integral differs from mine. It is true I can define perfectly well that integral as a contour integral by choosing any dented contour, but in so doing I introduce a convergence term which is not there in the improper real integral definition.

I.e. by the improper integral definition, the real integral only exists if the part away from the dent converges, which happens only if the integral over the dent converges. moreover the two integrals are equal iff the integral over the dent converges to zero.

hence although my definition of the contour integral does make sense and does converge as a contour integral, it does not converge to the value of the (divergent) improper real integral.

so in your situation, as you understood before i butted in, you must first show convergence of your integral in the sense of an improper integral, and then you are allowed to compute it as a contour integral.

consider the example of the integral of 1/z^2 from -1 to 1. this contour integral does exist and converges by taking any dented contour avoiding zero, and equals -2. The real improper integral of 1/x^2 however does not converge on this interval and hence does not equal the contour integral.

the problem is exactly that the integral around the dent, is allowed in the definition of the complex contour integral, but not in the real improper one. so one integral converges and the other does not.

so just ignoring everything I said will not hurt you. my apologies for jumping in without understanding really what the problem was.

23. Sep 20, 2010

### snipez90

Ah, thanks for clarifying. There was no harm done. I think the confusion, at least on my end, was that you mentioned in your first post that the arguments on divergence seem false, and there was really only one actual argument made, so I assumed it was regarding the integral in post 3. Thus I felt the need to clarify the issue, but inadvertently I failed to mention real analysis in the the attempt.

24. Sep 20, 2010

### mathwonk

i did a poor job of reading what was posted. i was reacting to this lament:

"I have a bunch of integrals, and all have poles of order 2 or higher ON the contour."

since to me that poses no difficulty as long as the contour is closed and the residues are zero.