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

Integral of (z^2)dz around a semi-circle in the y >= 0 region.

  1. Jun 9, 2008 #1
    Help! I'm preparing for Prelims (exams taken at the end of the first year of my course in Physics) and I can't do the line integral of (z^2)dz around the open semi-circle counter-clockwise from x=1 to x=-1. However I try to tackle it the answer comes out as 0, when I know it has some size because it cancels out with the straight line integral from -1 to 1 (possibly equal to 2/3, although I've lost the original working). The z is for a complex variable, but if anyone could at least just show me how to parameterize the regular line integral (not for complex, but just in 2D) around the semi-circle that would be so helpful. I've tried everyway I can (barring using cartesian, because I know there's a nice polar way to do it, I just keep coming out 0 when I try though), and it just won't work!

    To re-iterate, the integral is (z^2)dz where z = x + iy.

    Thank you!

  2. jcsd
  3. Jun 9, 2008 #2


    User Avatar
    Science Advisor

    Yes, that's a perfectly valid way of doing it. Normally complex variables are written z= x+ iy where x and y are the real and imaginary parts. On the straight line from -1 to 1, z is always real so z= x looks like a perfectly good parameterization.

    Unfortunately, you haven't show the work that "keeps coming out 0". On the unit circle, [itex]z= cos(\theta)+ i sin(\theta)[/itex] or equivalently but more simply, [itex]z= e^{i\theta}[/itex]. Now, how are you integrating that from 1 to -1? In particular, what limits of integration are you using?
  4. Jun 9, 2008 #3
    Int((z^2)dz). Also: my GOODNESS that latex took a long time to type out.

    Okay, well I thought I'd found the trouble when I realised that [tex]dz = izd\theta[/tex] instead of [tex]ird\theta[/tex], but alas it now comes out to -4. My working this time is as follows (r = 1):

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(cos\theta + isin\theta)^{2}(izd\theta)[/tex]

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(cos\theta + isin\theta)^{2}(icos\theta - sin\theta)d\theta[/tex]

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(icos^{3}\theta - isin^{2}\theta\cos\theta - 2sin\theta\cos^{2}\theta - cos^{2}\theta\sin\theta + sin^{3}\theta - i2sin^{2}\theta\cos\theta)d\theta[/tex]

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(i(1 - sin^{2}\theta)cos\theta - isin^{2}\theta\cos\theta - 2sin\theta\cos^{2}\theta - cos^{2}\theta\sin\theta + (1 - cos^{2}\theta)sin\theta - i2sin^{2}\theta\cos\theta)d\theta[/tex]

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(icos\theta - 3isin^{2}\theta\cos\theta - 3sin\theta\cos^{2}\theta + sin\theta)d\theta[/tex]

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(sin\theta - 3sin\theta\cos^{2}\theta)d\theta + i\int^{\pi}_{0}(cos\theta - 3cos\theta\sin^{2}\theta)d\theta[/tex]

    [tex]\int{z}^{2}{dz} = \left[- cos\theta - cos^{3}\theta\right]^{\pi}_{0} + i\left[sin\theta - 3sin^{3}\theta\right]^{\pi}_{0}[/tex]

    [tex]\int{z}^{2}{dz} = ( - 1 - 1 - 1 - 1) + i(0 - 0 - 0 - 0)[/tex]

    [tex]\int{z}^{2}{dz} = -4[/tex]


    What am I doing wrong here?
    Last edited: Jun 9, 2008
  5. Jun 9, 2008 #4

    ... okay, and when I do it:

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(e^{i\theta})^{2}(ie^{i\theta}d\theta)[/tex]

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(e^{i2\theta})(ie^{i\theta}d\theta)[/tex]

    [tex]\int{z}^{2}{dz} = i\int^{\pi}_{0}(e^{i3\theta})d\theta[/tex]

    [tex]\int{z}^{2}{dz} = i\left[\frac{1}{i3}e^{i3\theta}\right]^{\pi}_{0}[/tex]

    [tex]\int{z}^{2}{dz} = \left[\frac{1}{3}e^{i3\theta}\right]^{\pi}_{0}[/tex]

    [tex]\int{z}^{2}{dz} = \left(- \frac{1}{3} - \frac{1}{3}\right)[/tex]

    [tex]\int{z}^{2}{dz} = - \frac{2}{3}[/tex]

    which is what I believe to be the right answer ... how come it works this way but not the other?
    Last edited: Jun 9, 2008
  6. Jun 9, 2008 #5
    Minus signs ...

    That should be [tex]-- 1 -- 1 -- 1 -- 1 = + 1 + 1 + 1 + 1 = 4[/tex] sorry. Still wrong though :(.

    Oh, and:

    should be

    [tex]\int{z}^{2}{dz} = \left[- cos\theta - cos^{3}\theta\right]^{\pi}_{0} + i\left[sin\theta - sin^{3}\theta\right]^{\pi}_{0}[/tex]
    Last edited: Jun 9, 2008
  7. Jun 9, 2008 #6
    Just to be sure, this is contour you want to integrate z^2 on?


    Lets call that contour "[tex]\gamma[/tex]", and also the same closed contour "[tex]\Gamma[/tex]".

    Since z^2 has no poles we know that;

    [tex]\oint_\Gamma z^2 \mathrm{d}z = 0[/tex]

    And since we can break up [tex]\Gamma[/tex] into two parts ([tex]\gamma[/tex] and the line segment from -1 to 1), we get;

    [tex]\oint_\Gamma z^2 \mathrm{d}z = \int_\gamma z^2 \mathrm{d}z + \int_{-1}^1 z^2 \mathrm{d}z = 0[/tex]


    [tex]\int_\gamma z^2 \mathrm{d}z = -\int_{-1}^1 z^2 \mathrm{d}z[/tex]

    And finally yes, [tex]\gamma[/tex] is parameterized (in [tex]\mathbb{C}[/tex]) by [tex]e^{it}[/tex] with t from 0 to pi. If you want to do it in [tex]\mathbb{R}^2[/tex] just take imaginary and real part.
  8. Jun 9, 2008 #7
    It looks like you just made some sort of simple algebra mistake in your first attempt with cos(q)+isin(q)
  9. Jun 9, 2008 #8
    Yep, that's the line integral. And I got the other part, from -1 to 1 along the x-axis, I just needed to learn to do the other part explicitly to prove that the closed contour sums to 0. I still can't see what's wrong with the integration in cosines and sines, but it comes out as the wrong answer - if anyone can see where I've gone wrong in it would be really helpful, I don't want to do the same thing in the exam when I can't check if it's right or not (so I can keep retrying it).

    I don't suppose you could see where though, could you? I got a friend over just to check it, and neither of us could see where the mistake is. I mean, I know there must be one, I don't think I've broken maths, but I don't know WHERE it is.

    Thanks for everyone's help so far!
  10. Jun 9, 2008 #9
    As anticipated some algebraic mistakes :)

    [tex]\int{z}^{2}{dz} = \int^{\pi}_{0}(sin\theta - 4sin\theta\cos^{2}\theta)d\theta + i\int^{\pi}_{0}(cos\theta - 4cos\theta\sin^{2}\theta)d\theta[/tex]

    [tex]\int{z}^{2}{dz} = \left[- cos\theta + \frac{4}{3}cos^{3}\theta\right]^{\pi}_{0} + i\left[sin\theta - \frac{4}{3}sin^{3}\theta\right]^{\pi}_{0}[/tex]

    [tex]\int{z}^{2}{dz} = ( 1 - 4/3 + 1 - 4/3) [/tex]

    [tex]\int{z}^{2}{dz} = -2/3[/tex]
  11. Jun 9, 2008 #10
    Thank you!

    Oh my goodness, I see where it happened now, it was the multiplying out of the [tex]i(1 - sin^{2}\theta)cos\theta[/tex], I just ignored the [tex]-isin^{2}\theta\cos\theta[/tex] term (and the similar [tex](1 - cos^{2})[/tex] bit). I spent forty minutes yesterday on this really simple check of the Cauchy-Riemann equations for complex differentiation because I'd missed a minus sign from when I'd crossed through the thing next to it and obscured it slightly, and so something I knew was diffable kept telling me it didn't satisfy them. I do like maths, but I wish I could do the algebra more consistently not wrong.

    Thank you! At least I know I wasn't doing the method wrong now, just apparently can't multiply and add.

    Last edited: Jun 9, 2008
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook