# Integral of complex number over a contour

I have $$\int_{-1}^1 |z|dz$$

I need to calculate the integral where the integration contour is the upper semi-circle with unit radius. I calculated the integral in $$(-1; 1)$$ section; the answer is 1, but I'm not sure how to calculate for the upper semi-circle.

• What is the upper semi-sphere? We're on a plane here. – José Carlos Santos Nov 28 '18 at 19:00
• Are you looking for $\int\limits_\gamma |z| dz$ where $\gamma$ is semicircle in the upper half-plane? – J. Pistachio Nov 28 '18 at 19:01
• Do you mean semi circle? – Cloud JR Nov 28 '18 at 19:01
• Yes, sorry, semi circle. Will update the post now. @Josh, yes – user3132457 Nov 28 '18 at 19:02

Note: I think I may have been considering a different contour, since the original poster asked what they could do after finding $$\int\limits_{-1}^1 |z|dz$$. I am thinking of a contour like this:

where $$R=1$$. If OP only requires the upper half, then we can disregard the $$1$$ in the final sum.

If you're taking $$\gamma$$ to be this contour, note that $$\gamma$$ is formed by two curves: $$\gamma_1$$ and $$\gamma_2$$ where $$\gamma_1$$ is the interval $$[-1,1]$$ and $$\gamma_2$$ is the upper arc of the semicircle. Thus we have that $$\int\limits_\gamma |z| dz = \int\limits_{\gamma_1} |z|dz + \int\limits_{\gamma_2}|z|dz$$ You already found that $$\int\limits_{\gamma_1} |z|dz = \int\limits_{-1}^1 |z| dz = 1$$ We have to find $$\int\limits_{\gamma_2}|z|dz$$. Note that for all $$z$$ on $$\gamma_2$$, $$|z|=1$$ because $$z$$ lies on the arc of the unit circle. So \begin{align*}\int\limits_{\gamma_2}|z|dz = \int\limits_{\gamma_2}1dz = \int\limits_0^\pi ie^{i\theta}d\theta = -2 \end{align*} So $$\int\limits_\gamma |z| dz = -1$$

• That's the contour I meant. – user3132457 Nov 28 '18 at 19:17
• Apologies, I made a dumb error, let me fix that – J. Pistachio Nov 28 '18 at 19:23
• I just don't understand how you get the π. Isn't $\int_{\gamma}1dz=z$, which is just 1? – user3132457 Nov 29 '18 at 5:28

Are you integrating clockwise or anti-clockwise?

Assuming you're integrating anti-clockwise, use a substitution of $$z=\mathrm e^{\mathrm i \theta}$$, where $$0 \le \theta \le \pi$$.

It follows that $$\mathrm dz = \mathrm{ie}^{\mathrm i \theta}~\mathrm d\theta$$.

Hence $$\int_C |z|~\mathrm dz = \int_0^{\pi} |\mathrm e^{\mathrm i \theta}| ~\mathrm{ie}^{\mathrm i \theta}~\mathrm d\theta = \mathrm i\int_0^{\pi}\mathrm e^{\mathrm i\theta}~\mathrm d\theta$$

• Given that the original integral is $\int_{-1}^1$, I suspect the semicircle is actually supposed to be parametrized clockwise. (Also because your parametrization gives an answer of $-2$.) – André 3000 Nov 28 '18 at 19:11
• @André3000 I'm not sure. It's not clear from the OP. Most students, when integrating along the real line, have the lower limit less than the upper limit. (They don't realise that we're integrating along an oriented path.) – Fly by Night Nov 28 '18 at 19:13