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

1. Jun 9, 2008

Smin0

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!

Simon.

2. Jun 9, 2008

HallsofIvy

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, $z= cos(\theta)+ i sin(\theta)$ or equivalently but more simply, $z= e^{i\theta}$. Now, how are you integrating that from 1 to -1? In particular, what limits of integration are you using?

3. Jun 9, 2008

Smin0

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 $$dz = izd\theta$$ instead of $$ird\theta$$, but alas it now comes out to -4. My working this time is as follows (r = 1):

$$\int{z}^{2}{dz} = \int^{\pi}_{0}(cos\theta + isin\theta)^{2}(izd\theta)$$

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

$$\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$$

$$\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$$

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

$$\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$$

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

$$\int{z}^{2}{dz} = ( - 1 - 1 - 1 - 1) + i(0 - 0 - 0 - 0)$$

$$\int{z}^{2}{dz} = -4$$

=/

What am I doing wrong here?

Last edited: Jun 9, 2008
4. Jun 9, 2008

Smin0

o___o

... okay, and when I do it:

$$\int{z}^{2}{dz} = \int^{\pi}_{0}(e^{i\theta})^{2}(ie^{i\theta}d\theta)$$

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

$$\int{z}^{2}{dz} = i\int^{\pi}_{0}(e^{i3\theta})d\theta$$

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

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

$$\int{z}^{2}{dz} = \left(- \frac{1}{3} - \frac{1}{3}\right)$$

$$\int{z}^{2}{dz} = - \frac{2}{3}$$

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
5. Jun 9, 2008

Smin0

Minus signs ...

That should be $$-- 1 -- 1 -- 1 -- 1 = + 1 + 1 + 1 + 1 = 4$$ sorry. Still wrong though :(.

Oh, and:

should be

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

Last edited: Jun 9, 2008
6. Jun 9, 2008

Santa1

Just to be sure, this is contour you want to integrate z^2 on?

$$\setlength{\unitlength}{2cm} \begin{picture}(4,3) \linethickness{0.4mm} \qbezier(1,1)(1,2)(2,2) \qbezier(2,2)(3,2)(3,1) \linethickness{0.2mm} \put(2.1,2.20){Imag} \put(3.30,0.95){Real} \put(2,0.75){\vector(0,1){1.5}} \put(.75,1){\vector(1,0){2.5}} \put(.835,.75){-1} \put(2.95,.75){1} \end{picture}$$

Lets call that contour "$$\gamma$$", and also the same closed contour "$$\Gamma$$".

Since z^2 has no poles we know that;

$$\oint_\Gamma z^2 \mathrm{d}z = 0$$

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

$$\oint_\Gamma z^2 \mathrm{d}z = \int_\gamma z^2 \mathrm{d}z + \int_{-1}^1 z^2 \mathrm{d}z = 0$$

so

$$\int_\gamma z^2 \mathrm{d}z = -\int_{-1}^1 z^2 \mathrm{d}z$$

And finally yes, $$\gamma$$ is parameterized (in $$\mathbb{C}$$) by $$e^{it}$$ with t from 0 to pi. If you want to do it in $$\mathbb{R}^2$$ just take imaginary and real part.

7. Jun 9, 2008

maze

It looks like you just made some sort of simple algebra mistake in your first attempt with cos(q)+isin(q)

8. Jun 9, 2008

Smin0

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!

9. Jun 9, 2008

ansrivas

As anticipated some algebraic mistakes :)

$$\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$$

$$\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}$$

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

$$\int{z}^{2}{dz} = -2/3$$

10. Jun 9, 2008

Smin0

Thank you!

Oh my goodness, I see where it happened now, it was the multiplying out of the $$i(1 - sin^{2}\theta)cos\theta$$, I just ignored the $$-isin^{2}\theta\cos\theta$$ term (and the similar $$(1 - cos^{2})$$ 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