Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Evaluation of Integrals using Complex Variables

  1. Nov 17, 2004 #1
    So how would one solve the following integral using complex variables?,

    Integral from 0 to pi of [dx/r +5cos(x)]

    where 0<r<5
     
  2. jcsd
  3. Nov 17, 2004 #2
    You can think of a complex integral in two ways, either as the primitive of a function or as a line integral. What is not clear to me, is in what way is your integral stated.

    You need to be a lot clearer. Whats the path of integration?
     
  4. Nov 18, 2004 #3
    Yes, that is basically what my question is. I am not sure where the branch cuts are.
     
  5. Nov 18, 2004 #4

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    edit-sorry I misread your bounds on r and missed the fact that your integrand has a discontinuity.

    If you're looking for the principle value of that integral, it should still be possible. Look at the contour that goes from -pi to pi (no loss since your integrand is even), with small half circles in the upper half plane to avoid the discontinuities, then the upper half circle of radius pi counter clockwise. There are no poles inside this region, so to find the principle value of the integral on the real axis we can evaluate the integral on these half-circles.

    You can find the value of the integral over the large half circle by looking at it's integral over the entire circle of radius pi and the fact that the integrand is even. Next, you'll need to find the limit of the integrals over the small half circles as their radius goes to zero. This will be half their residues (well, the negative of this since we are going clockwise).
     
    Last edited: Nov 18, 2004
  6. Nov 18, 2004 #5

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    I don't think what I posted above will work, sorry. I had shoddily convinced myself that it would, but I can't fill in the details. :mad:

    I'm sure of this new approach though. Integrate this function over the rectangle with corners 0, pi, pi+iT, 0+iT, except with a little half circle above the x-axis at our singularity. There are no poles inside this contour. Let T go to infinity. The integral along pi+iT to 0+iT will go to zero as we do this (the integrand is of the order e^(-T)). The integral along the vertical sides are pure imaginary since cos(z) is pure real if the real part of z is 0 or pi. We don't care what it actually is, only that its real part is 0.

    If we let the radius of the little half circle go to zero, we can get the integral we're interested in. As we do this, the integral over the half circle contributes -i*pi times residue at this pole. The residue is real, so this part of the contours contribution is again purely imaginary.

    Since the integral along the parts of our contour that lie on the x-axis must be real, we see that they must actually be zero since the other parts of our contour have only imaginary contributions. Therefore the principal value of this real integral must be zero.
     
  7. Nov 18, 2004 #6
    I dont understand one thing... is r a variable? is it fixed?

    If it is a variable, is the integral 0 for all 0<r<5 ?

    can you state the question again???

    are you trying to calculate

    [tex]\int_{0}^{\pi}\frac{dx}{r+5\cos x}[/tex]????

    another question, why are we calculating the principal value of the integral?
    cant we calculate just the integral?
     
    Last edited: Nov 19, 2004
  8. Nov 19, 2004 #7
    here is what i've done from what i've understanded


    let

    [tex]f(z)=\frac{R\left(\frac{1}{2}\left(z+\frac{1}{z}\right),\frac{1}{2i}\left(z-\frac{1}{z}\right)\right)}{iz}[/tex]

    and [itex]\gamma=e^{i\theta}[/itex] where [itex]0\leq\theta\leq2\pi[/itex]

    then

    [tex]\int_{\gamma}f=\int_{0}^{2\pi}f(e^{i\theta})ie^{i\theta}d\theta=\int_{0}^{2\pi}R\left(\frac{e^{i\theta}+e^{-i\theta}}{2},\frac{e^{i\theta}-e^{-i\theta}}{2i}\right)\frac{ie^{i\theta}}{ie^{i\theta}}d\theta=\int_{0}^{2\pi}R(\cos\theta,\sin\theta)d\theta[/tex]

    implies that

    [tex]\int_{0}^{2\pi}R(\cos\theta,\sin\theta)d\theta=2\pi i \sum res\{f(z),\Omega\}[/tex]

    where [itex]\Omega[/itex] is the unit disk.

    EDIT... in fact, you can extend the result to

    [tex]\int_{0}^{\alpha}R(\cos\theta,\sin\theta)d\theta=2\pi i \sum res\{f(z),\Omega_{\alpha}\}[/tex]

    where [itex]\Omega_{\alpha}[/itex] is the slice of unit disk. This should make calculation easier :approve:

    in your case

    [tex]f(z)=-\frac{i}{5z^2+rz+5}[/tex]

    Its all downhill from here right?
     
    Last edited: Nov 19, 2004
  9. Nov 19, 2004 #8

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    There's a discontinuity on the path of integration, at arccos(-r/5) since 0<r<5, so I expect he means the principle value if we're to make any sense of the question. When you shifted over to complex variables you end up with poles on the path of integration, so you have to be extremely careful.
     
  10. Nov 19, 2004 #9
    I'm sorry, what if r>5?
     
  11. Nov 19, 2004 #10

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    If r>5 we don't have the discontinuity problem and life is easier. Notice:

    [tex]\int_{0}^{\pi}\frac{dx}{r+5\cos(x)}=\frac{1}{2}\int_{0}^{2\pi}\frac{dx}{r+5\cos(x)}[/tex]

    You'll be evaluating the second integral.

    Next do the substitution [tex]z=e^{ix}[/tex], noticing that [tex]\cos(x)=(z+1/z)/2[/tex]. Your integrand will be the f(z) ReyChiquito gave at the end of his last post (though I get 5/2 where he has the 5's). Your path of integration will be the unit circle counterclockwise. Use the residue theorem.

    This is essentially what Rey just mentioned, though I'm not sure what he means when he's talking about doing the integral over a slice of the disc-if you aren't integrating over a closed contour you'll have a hard time evaluating the integral by residues. Maybe he'll clarify the [itex]\Omega_{\alpha}[/itex] contour.
     
    Last edited: Nov 19, 2004
  12. Nov 20, 2004 #11
    How do I obtain the integrand f(z) = -i/(5z^2/2+ rz + 5/2) ?
     
    Last edited: Nov 20, 2004
  13. Nov 20, 2004 #12

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    Did you try the substitution [tex]z=e^{ix}[/tex] I mentioned above? What happened?
     
  14. Nov 20, 2004 #13
    Oh, I'm sorry man. You are right. Simple arithmetic mistake I was making.
     
  15. Nov 20, 2004 #14
    oh yeah, my mistake... you cant extend so blindly the result, so i would use the 0 to 2pi form of the result i posted. One thing though (on top of my head) i think if you change the domain as shmoe is doing it ([0,pi] to 1/2 [-pi,pi] to 1/2 [0,2pi]) the sign of the cosine must change in the last one, as you are translating only by pi, but i might be wrong. And yeah shmoe, i clearly lost the 1/2 of the variable change *blush*
     
  16. Nov 25, 2004 #15

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    It's not a translation by pi that I was using, just symmetry about x=pi, namely [tex]\cos(x)=\cos(2\pi-x)[/tex]. So the integral from pi to 2pi will equal the integral from 0 to pi.
     
  17. Nov 26, 2004 #16
    yeah, but you are integrating from -pi to pi, so you are translating the domain of integration.

    [tex]\int_{-\pi}^{\pi}\ne\int_{0}^{2\pi}[/tex]
     
  18. Nov 26, 2004 #17

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    You never even have to talk about an integral from -pi to pi for this question, but for this function these integrals are equal anyways. Actually for any periodic function of period c it's integral over [a,a+c] will equal it's integral over [b,b+c] for any choice of a, b. The integral over any full period will always yield the same result.

    For the function at hand,

    [tex]\int_{-\pi}^{\pi}=\int_{-\pi}^{0}+\int_{0}^{\pi}=\int_{\pi}^{2\pi}+\int_{0}^{\pi}=\int_{0}^{2\pi}[/tex]

    Where [tex]\int_{-\pi}^{0}=\int_{\pi}^{2\pi}[/tex] by the 2pi periodicity of cos (a simple substitution if you prefer).
     
  19. Nov 28, 2004 #18
    K, then what im i doing wrong?

    taking the change of variable [itex]u=x+\pi[/itex] and [itex]du=dx[/itex]

    [tex]\int_{-\pi}^{\pi}\frac{dx}{r+5\cos x}=\int_{0}^{2\pi}\frac{du}{r+5\cos(u-\pi)}=\int_{0}^{2\pi}\frac{du}{r-5\cos u}[/tex]

    Im thinking is correct, because [itex]\cos x[/itex] in [itex][-\pi,\pi][/itex] doesnt look the same as in [itex][0,2\pi][/itex]. In fact, the graph is "minus" the first one.
     
    Last edited: Nov 28, 2004
  20. Nov 28, 2004 #19

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    You're not doing anything wrong. But you should realize that:

    [tex]\int_{0}^{2\pi}\frac{dx}{r+5\cos x}=\int_{0}^{2\pi}\frac{dx}{r-5\cos x}[/tex]

    To see this use your translation substitution to show:

    [tex]\int_{0}^{\pi}\frac{dx}{r+5\cos x}=\int_{\pi}^{2\pi}\frac{dx}{r-5\cos x}[/tex]

    and

    [tex]\int_{\pi}^{2\pi}\frac{dx}{r+5\cos x}=\int_{0}^{\pi}\frac{dx}{r-5\cos x}[/tex]

    think of the simpler graph of 1+cos(x) on [-pi,pi] and [0,2pi]. They look different, and if you were to integrate over these two intervals, you could use your translation to show they are equal to one another except for the "negative cos". But look at the areas under these graphs, should be the same no? You're just adding up the area in a different order.

    Think about what I said about integrating a periodic function over a full period.
     
  21. Nov 29, 2004 #20
    You are right, its just that

    [tex]\int_{0}^{2\pi}\frac{dx}{r+5\cos x}=\int_{0}^{2\pi}\frac{dx}{r-5\cos x}[/tex]

    is not as obvious at first glance, and i suck at geometry :)

    i even had to prove it analytically, just to convince myself :P
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Evaluation of Integrals using Complex Variables
Loading...