# Contour Integral Help

vanhees71
Gold Member
Very good. That's what I called "Solution 3" but treated in a more rigorous fashion.

vanhees71
Gold Member
No! As I've shown in my "Solution 3" the correct result is indeed $+2 \pi/3$. The reason of the discrepancy is that Mathematica defines the square root in the standard way with the cut along the negative real axis and values for positive real arguments as positive. That's the cut I used in "Solution 2". Using the cut along the positive real axis, you get the positive (negative) real value when you approach the positive real axis from above (from below). For details, see my posting on "Solution 3".

BTW: I also used Mathematica first, and got the wrong result. In Mathematica (I've version 9 here on my laptop) you must even be careful with using the exponential form of the cubic roots of -1! It's much saver to explicitly write it in the proper trigonometric form. You also must evaluate the value of the square root by hand, respecting the choice of the cut along the real axis. The calculation of the residues goes as follows:

For the first pole at $z_1=-1$ for the here used square root you have $\sqrt{z_1}=+\mathrm{i}$. Thus the associated residuum is
$$\text{res}_1=\mathrm{i} \lim_{z \rightarrow -1} \frac{z+1}{z^3+1}=+\frac{\mathrm{i}}{3}.$$

Here you get lucky using the Mathematica square root, because by definition Sqrt[-1]=I.

For the 2nd pole at $$z_2=\exp(\mathrm{i} \pi/3)$$ it becomes already tricky with Mathematica. According to the branch cut chosen as described above the correct value for the square root in our function is
$$\sqrt{z_2}=\exp(\mathrm{i} \pi/6)=\frac{\sqrt{3}}{2}+\frac{\mathrm{i}}{2}.$$
Then better put this value by hand into Mathematica, because one has

FullSimplify[Exp[I Pi/6]] -> (-1)^(1/6),

which doesn't make proper sense, because it doesn't tell which of the 6 possible values you should take. The only correct one is the one given above, and the unambigues residuum is
$$\text{res}_2=-\frac{\mathrm{i}}{3}.$$

In the same way you get for the third pole $z_3=\exp(5 \mathrm{i} \pi/3)$ with the here to use value for the square root
$$\sqrt{z_3}=\exp(5 \mathrm{i} \pi/6)=-\frac{\sqrt{3}}{2}+\frac{\mathrm{i}}{2},$$
$$\text{res}_3=-\frac{\mathrm{i}}{3}.$$
In the attachment you find the mathematica notebook and the pdf printout.

#### Attachments

• integral-branchpoint-residues2.nb
6.9 KB · Views: 310
• integral-branchpoint-residues2.pdf
9.7 KB · Views: 147
I am not integrating a pole of the function. I am integrating $f(-z)$; not $f(z)$. So the pole at -1 is now at 1.

Ok, I see that now. Sorry.

Thanks for the replies everyone.

I did not use a substitution because then the integral would reduce to an arctan integral, where the problem is trivial (like a few problems in this exercise). That is why I do not want to use one.

In my own time I came up with a solution but I am unsure if it is correct; I would appreciate it if someone could look at it.

First, observe this diagram: Call this curve C, traversed along ABDEFGHJ. The smaller circle (the keyhole) is of radius r, the larger circle is of radius R. In other words:

$$\oint_{C} \frac{\sqrt{z}}{1 + z^3}dz = \int_{AB} + \int_{BDEFG} + \int_{GH} + \int_{HJA}$$

We have a branch point at z = 0 (because of the square root) and the poles are at z = e, z = eiπ/3 and z = e-iπ/3. All of these lie in our contour. Summing the residues at these points and multiplying by 2iπ gives 2π/3.

So now we have

$$\int_{AB} + \int_{BDEFG} + \int_{GH} + \int_{HJA} = \frac{2\pi}{3}$$

Note that:

$$\int_{AB} = \int_{r}^{R} \frac{\sqrt{z}}{1 + z^3}dz$$

Using the substitution z = Re in the second integral yields:

$$\int_{BDEFG} = \int_{0}^{2\pi} \frac{ \sqrt{Re^{i\theta}} \cdot iRe^{i\theta}}{1 + R^{3}e^{3i\theta}}d\theta$$

For the third integral, we replace z with ze2iπ, as we have gone through a rotation of 2π to get to this point:

$$\int_{FG} = \int_{R}^{r} \frac{ \sqrt {ze^{2i \pi}}} {1 + (ze^{2i\pi})^{3}} dz = e^{i\pi} \int_{R}^{r} \frac {\sqrt{z}}{1 + z^3}dz$$

For the fourth integral, we use the same substitution as we did for the second integral, except with z = re:

$$\int_{HJA} = \int_{2\pi}^{0} \frac{ \sqrt{re^{i\theta}} \cdot ire^{i\theta}}{1 + r^{3}e^{3i\theta}}d\theta$$

Putting it all together:

$$\int_{r}^{R} \frac{\sqrt{z}}{1 + z^3}dz + \int_{0}^{2\pi} \frac{ \sqrt{Re^{i\theta}} \cdot iRe^{i\theta}}{1 + R^{3}e^{3i\theta}}d\theta + e^{i\pi} \int_{R}^{r} \frac {\sqrt{z}}{1 + z^3}dz + \int_{2\pi}^{0} \frac{ \sqrt{re^{i\theta}} \cdot ire^{i\theta}}{1 + r^{3}e^{3i\theta}}d\theta$$

$$= \frac{2\pi}{3}$$

Now, letting r -> 0 and R -> ∞, the second and fourth integrals vanish, and we have:

$$\int_{0}^{\infty} \frac{ \sqrt{z}}{1 + z^3}dz + e^{i\pi} \int_{\infty}^{0} \frac{ \sqrt{z}}{1 + z^3}dz = \frac{2\pi}{3}$$

which gives

$$2\int_{0}^{\infty} \frac{ \sqrt{z}}{1 + z^3}dz = \frac{2\pi}{3}$$

$$\therefore \int_{0}^{\infty} \frac{ \sqrt{z}}{1 + z^3}dz = \frac{\pi}{3}$$

In my opinion FedEx, that is the best way to do this problem although you did skim across quickly the residue calculation which is the part that would stump most people because of the way we define the branch: the residue calculation is a function of which branch you choose as it should since the residue is a coefficient in the power expansion of the surface around the pole of the function which is analytically continuous with the branch we're integrating over.

Last edited:
haruspex
Homework Helper
Gold Member
2020 Award
No-one seems to like my approach, but I shall persist anyway.:shy:
##I_1 = \int_{r=0}^\infty f(r).dr##
##I_2 = \lim_{R→\infty} \int_{\theta=0}^{2\pi/3} f(R e^{i\theta}).dR e^{i\theta} = 0##
##I_3 = \int_{r=\infty}^0 f(r e^{2\pi i/3}).d(r e^{2\pi i/3}) = \int_{r=\infty}^0 \frac{(r e^{2\pi i/3})^{\frac 1 2}}{1+(r e^{2\pi i/3})^3}e^{2\pi i/3}.dr= -\int_{r=0}^\infty \frac{\sqrt r e^{\pi i/3}e^{2\pi i/3}}{1+r^3}.dr = \int_{r=0}^\infty \frac{\sqrt r }{1+r^3}.dr = I_1##
Since the residue at the only pole inside the contour is -i/3, 2 I1 = I1+I2 + I3 = 2πi * (-i/3), so I1 = π/3.

No-one seems to like my approach, but I shall persist anyway.:shy:
##I_1 = \int_{r=0}^\infty f(r).dr##
##I_2 = \lim_{R→\infty} \int_{\theta=0}^{2\pi/3} f(R e^{i\theta}).dR e^{i\theta} = 0##
##I_3 = \int_{r=\infty}^0 f(r e^{2\pi i/3}).d(r e^{2\pi i/3}) = \int_{r=\infty}^0 \frac{(r e^{2\pi i/3})^{\frac 1 2}}{1+(r e^{2\pi i/3})^3}e^{2\pi i/3}.dr= -\int_{r=0}^\infty \frac{\sqrt r e^{\pi i/3}e^{2\pi i/3}}{1+r^3}.dr = \int_{r=0}^\infty \frac{\sqrt r }{1+r^3}.dr = I_1##
Since the residue at the only pole inside the contour is -i/3, 2 I1 = I1+I2 + I3 = 2πi * (-i/3), so I1 = π/3.

It's an easier, simpler approach haruspex than what I initially came up with (the keyhole contour). Good though to see it solved several ways. That comes in handy too later on with other more difficult problems. :)