Complex integration is giving the wrong answer by a factor of two

Click For Summary

Homework Help Overview

The discussion revolves around a complex integration problem involving the integral $$\int_{0}^{2\pi } (1+2\cos t)^{n}\cos(nt) dt$$ and its evaluation using residue theory. The original poster (OP) is attempting to reconcile their result with a book answer that differs by a factor of two.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants explore the calculation of residues and the application of the residue theorem. The OP expresses confusion about their result compared to the expected answer, prompting others to examine the integral and the integrand for potential errors. Some participants suggest focusing on specific terms in the expansion to identify the residue.

Discussion Status

Several participants have offered insights regarding the OP's approach, noting potential oversights in the calculation of derivatives and the handling of factors in the integrand. There is an ongoing exploration of different interpretations and methods to arrive at the correct answer, with no explicit consensus reached.

Contextual Notes

Participants have pointed out that the OP may have omitted important factors in their calculations, and there are discussions about the implications of using the residue theorem versus other methods. The conversation reflects a mix of analytical approaches and a focus on clarifying the mathematical reasoning involved.

LCSphysicist
Messages
644
Reaction score
163
Homework Statement
.
Relevant Equations
.
$$\int_{0}^{2\pi } (1+2cost)^{n}cos(nt) dt$$

$$e^{it} = z, izdt = dz$$

$$\oint (1+e^{it}+e^{-it})^{n}\frac{e^{nit}+e^{-nit}}{2} \frac{dz}{iz} = \oint (1+z+z^{-1})^{n}\frac{z^{n}+z^{-n}}{2} \frac{dz}{iz}$$

$$\oint (z+z^{2}+1)^{n}\frac{z^{2n}+1}{z^{2n+1}} \frac{dz}{2i} = \pi Res = \pi \frac{d^{2n}}{(2n)! dz^{2n}}((z+z^{2}+1)^{n}(z^{2n}+1))$$

$$= \pi \sum \begin{pmatrix}
2n\\ \beta
\end{pmatrix} \frac{d^{\beta} {(z^{2n}+1)}}{dz^{\beta}(2n)!} \frac{d^{2n-\beta}}{dz^{2n-\beta}}(z+z^{2}+1)^{n}$$

Since the pole is at z=0, all terms above vanish apart from ##\beta = 2n##, in this case:

$$= \pi \frac{d^{2n} {(z^{2n}+1)}}{(2n)!dz^{2n}} \frac{d^{0}}{dz^{0}}(z+z^{2}+1)^{n} $$
$$= \pi \frac{(2n)!}{(2n)!} (1) = \pi $$

The answer provided by the book is ##2 \pi##

I can't really find the error i supposedly did :/
 
Physics news on Phys.org
Take a look at the integral and integrand to figure out the residue term without the cumbersome derivatives: You are just interested in ## z^{2n} ##, (in the numerator), and you have ## z^{2n}+1 ##, multiplied by ##(z^2+z+1)^n ##. For the ## (z^2+z+1)^n ##, you need the ## z^{2n} ## and the ## 1 ##, (the end terms on either side in the expansion). None of the other terms in the expansion will give a ## z^{2n} ## term when multiplied by ## z^{2n}+1 ##. When multiplied through and summed, it is clear that you get ## 2 z^{2n} ## as the term in the numerator that will give you the residue term, i.e. ## \frac{b}{z} ##, where ## b=2 ##.
 
Last edited:
  • Like
Likes   Reactions: LCSphysicist
Charles Link said:
Take a look at the integral and integrand to figure out the residue term without the cumbersome derivatives: You are just interested in ## z^{2n} ##, (in the numerator), and you have ## z^{2n}+1 ##, multiplied by ##(z^2+z+1)^n ##. For the ## (z^2+z+1)^n ##, you need the ## z^{2n} ## and the ## 1 ##, (the end terms on either side in the expansion). None of the other terms in the expansion will give a ## z^{2n} ## term when multiplied by ## z^{2n}+1 ##. When multiplied through and summed, it is clear that you get ## 2 z^{2n} ## as the term in the numerator that will give you the residue term, i.e. ## \frac{b}{z} ##, where ## b=2 ##.
I can see your approach. But i really would like to know what error did i comitted :c i still did't find it
 
You have omitted
\frac{1}{(2n)!}\binom{2n}{0} \frac{d^{0}}{dz^0}(z^{2n}+1)\frac{d^{2n}}{dz^{2n}} ((z^2 + z + 1)^n) = \frac{1}{(2n)!}(z^{2n} + 1)(2n)!.
 
  • Like
Likes   Reactions: LCSphysicist and Charles Link
Herculi said:
I can see your approach. But i really would like to know what error did i comitted :c i still did't find it
I think you also get a term from ## \beta=0 ## in the derivative summation. (The product rule with multiple derivatives is clumsy, but I think that's the term you missed).

Edit: and I see @pasmith agrees with me=he posted just as I was posting.
 
Herculi said:
Homework Statement:: .
Relevant Equations:: .

$$\int_{0}^{2\pi } (1+2cost)^{n}cos(nt) dt$$

$$e^{it} = z, izdt = dz$$

$$\oint (1+e^{it}+e^{-it})^{n}\frac{e^{nit}+e^{-nit}}{2} \frac{dz}{iz} = \oint (1+z+z^{-1})^{n}\frac{z^{n}+z^{-n}}{2} \frac{dz}{iz}$$

$$\oint (z+z^{2}+1)^{n}\frac{z^{2n}+1}{z^{2n+1}} \frac{dz}{2i} = \pi Res = \pi \frac{d^{2n}}{(2n)! dz^{2n}}((z+z^{2}+1)^{n}(z^{2n}+1))$$

$$= \pi \sum \begin{pmatrix}
2n\\ \beta
\end{pmatrix} \frac{d^{\beta} {(z^{2n}+1)}}{dz^{\beta}(2n)!} \frac{d^{2n-\beta}}{dz^{2n-\beta}}(z+z^{2}+1)^{n}$$

Since the pole is at z=0, all terms above vanish apart from ##\beta = 2n##, in this case:

$$= \pi \frac{d^{2n} {(z^{2n}+1)}}{(2n)!dz^{2n}} \frac{d^{0}}{dz^{0}}(z+z^{2}+1)^{n} $$
$$= \pi \frac{(2n)!}{(2n)!} (1) = \pi $$

The answer provided by the book is ##2 \pi##

I can't really find the error i supposedly did :/
Why is it not ##2\pi i Res## in
$$\oint (z+z^{2}+1)^{n}\frac{z^{2n}+1}{z^{2n+1}} \frac{dz}{2i} = \pi Res = \pi \frac{d^{2n}}{(2n)! dz^{2n}}((z+z^{2}+1)^{n}(z^{2n}+1))$$

The residue at z=0 is $$\frac 1 i$$
 
The OP simplified using the factor of ##2i## in the denominator of the integrand. It made me look twice too.
 
I still don't see it..
$$ \oint (1+z+z^{-1})^{n}\frac{z^{n}+z^{-n}}{2} \frac{dz}{iz}=2\pi i~Res \left[(1+z+z^{-1})^{n}\frac{z^{n}+z^{-n}}{2} (-i)\right]_{z=0} $$ $$=2\pi$$
 
  • Like
Likes   Reactions: Charles Link
The OP is finding the residue of the integrand without the factor of ##2i##.
 
  • Like
Likes   Reactions: Infrared, hutchphd and Charles Link
  • #10
Apologies I don't know what you mean. The value of the integral is ##2\pi## and this is how you find it. He gets the wrong value...
 
  • #11
hutchphd said:
Apologies I don't know what you mean. The value of the integral is ##2\pi## and this is how you find it. He gets the wrong value...
The OP was somewhat sloppy in changing the function of interest by dropping a factor of ## 1/2 i ##, ( using it to cancel the ## 2i ## of ##2 \pi i ##). In any case, he uses a derivative formula to isolate the term of interest in the series, (the coefficient ## b ## of the ## \frac{b}{z } ## term), and when he did, he miscalculated the derivative.
 
  • Like
Likes   Reactions: hutchphd
  • #12
Wow that is a strange manipulation. Got it. Thanks.
I know it was mentioned by @Charles Link but the OP needs to understand his error was occasioned by doing the problem in a most ill-advised manner. That needs to be the take-away IMHO. The Residue Theorem is troo voodoo.
 
  • Like
Likes   Reactions: Charles Link
  • #13
In response to the previous post by @hutchphd , I do see a way to work this problem without using the residue theorem, where you can use ## \int\limits_{0}^{2 \pi} e^{imt} \, dt=0 ## for all integers ## m ##, except ## m=0 ##.
 
  • #14
Don't get me wrong I love Cauchy, but I always feel that I am summoning the occult. Sticking pins in the complex plane as it were. It works so well. I suppose when I really feel at home with Euler's Equation the feeling will abate. But anyway no derivatives are necessary to get to the residue term in this case.
 
  • Like
Likes   Reactions: Charles Link

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K