# Contour Integral Help

1. Jul 10, 2013

### FeDeX_LaTeX

1. The problem statement, all variables and given/known data

Using contour integration, evaluate $\int_{0}^{\infty} \frac{\sqrt{x}}{x^3 + 1} dx$.

3. The attempt at a solution

Normally what I try to do in these problems is consider the upper half of a semi-circle from -R to R in the complex plane, as R goes to infinity. In doing so, I've found the residues as:

$\frac{1}{3}e^{i\frac{\pi}{2}}$ at the pole $z = e^{-i\frac{\pi}{3}}$;

$\frac{1}{3}e^{-3i\frac{\pi}{2}}$ at the pole $z = -1$;

$\frac{1}{3}e^{-i\frac{\pi}{2}}$ at the pole $z = e^{i\frac{\pi}{3}}$.

Summing and multiplying by $2 \pi i$ yields $-\frac{2 \pi}{3}$.

However, what I've noticed is that my (real) integral is only defined for x ≥ 0. Does this mean I should consider instead the upper half of a semi-circle from 0 to R as R goes to infinity, so that only the pole $z = e^{i\frac{\pi}{3}}$ lies in my contour? The problem is, when I do that, I end up getting $\frac{2 \pi}{3}$... still not the correct answer which is apparently $\frac{\pi}{3}$.

What am I doing wrong here?

2. Jul 10, 2013

### Ackbach

That's probably what I would do. Then you have three contours to worry about:
$$\gamma_{1}: 0 \to R, \quad \gamma_{2}: R \to iR, \quad \gamma_{3}: iR \to 0.$$
The first leg is a straight line (and the one in which you're interested), the second leg is a quarter-circle, and the last leg is again a straight line. The sum
$$\int_{\gamma_{1}}+ \int_{\gamma_{2}}+ \int_{\gamma_{3}}=2\pi i \cdot \text{Res} \left[ \,f(z), e^{i\frac{\pi}{3}} \right].$$
You can probably use the $ML$ inequality on the second leg. And if you can find a way to compute the third leg, then you have that
$$\int_{0}^{\infty} \frac{ \sqrt{x}}{x^{3}+1} \, dx=2\pi i \cdot \text{Res} \left[ \,f(z), e^{i\frac{\pi}{3}} \right] - \int_{ \gamma_{3}}.$$
See how that works for you.

Last edited: Jul 10, 2013
3. Jul 11, 2013

### haruspex

The last leg looks messy. I would suggest using a different angle between the first and last legs.

4. Jul 11, 2013

### Millennial

I find your lack of observation disturbing. Try the substitution $x^{3/2} = u$, and then look if the integral turns into something simpler.

5. Jul 11, 2013

### haruspex

I read the OP as dictating use of contour integration. Simplifying instead or first with a substitution might not be quite in the spirit.

6. Jul 11, 2013

### WannabeNewton

This is uncalled for. There's no need to be rude; he is just asking for help. I find your lack of courtesy disturbing.

7. Jul 11, 2013

### Millennial

It is not being rude, it is simply a reference to Star Wars.

The OP dictates the use of contour integration, but the same contour integration can also be applied to the resulting integral after that substitution if you need to use it due to the question.

8. Jul 11, 2013

### jackmell

You should consider the integral in the complex plane:

$$\int_{\gamma} \frac{\sqrt{z}}{z^3+1}dz$$

with the contour $\gamma$, a keyhole contour traversing over a selected analytic determination of the square root function and the key-slot over the positive real axis. Can you do the integration over the legs of that contour? Need to take care when computing residues over branches that way right?

Last edited: Jul 11, 2013
9. Jul 12, 2013

### vanhees71

But the OP is supposed to calculate the integral from 0 to $\infty$ along the real axis, using contour integration. In this case one has to be careful that the additional paths added to the original one give no contribution to the integral. Another problem is that $z=0$ is an essential singularity of the integrand. Thus to have the contour running through this singularity may be troublesome. The hint with the substitution looks better to me. The suggestion given is thus fine. I'd use
$$u=x^{3/2}, \quad \mathrm{d} u = \mathrm{d} x \frac{3}{2} \sqrt{x}.$$
Then you get
$$I=\int_0^{\infty} \mathrm{d} x \frac{\sqrt{x}}{x^3+1}=\frac{2}{3} \int_0^{\infty} \mathrm{d} u \frac{1}{u^2+1} = \frac{1}{3} \int_{-\infty}^{\infty} \mathrm{d} u \frac{1}{u^2+1}.$$
This integral is easily evaluated by contour integration, closing the contour with a large semicircle (no matter whether in the upper or lower $u$-half plane).

10. Jul 12, 2013

### jackmell

Got some problems with that vanhees:

(1) You mean select a contour so that we can express the unknown (real) integral in terms of the other knows integrals around the contour,

(2) Zero is a branch-point, not an essential singularity,

(3) By making that substitution, you obliterate the underlying technique of evaluating an integral over a multi-valued function, something that will come up again and again in Complex Analysis so might as well get good at it by practicing with them.

11. Jul 12, 2013

### vanhees71

As far as I know, a branch point is an essential singularity, i.e., it is not an isolated pole.

The contour-integral technique is of course not necessary here, because after the substitutino you can evaluate the integral directly as well. It's nevertheless a nice execise to use the theorem of residues by closing the contour with a semicircle of infinite radius. It's easy to see that of course both calculations give the same result (which is $\pi/3$ by the way).

12. Jul 12, 2013

### haruspex

I don't see what's wrong with using Ackbeet's method but changing the path a little. After going out along the +ve real axis, instead of arcing around pi/2 and coming back down the +i axis, continue the arc a little further before travelling a straight line back to the origin. With the right choice of angle, it gives the right answer quite easily.

13. Jul 12, 2013

### vanhees71

How do you prove that the added path, not at infinity, do not contribute to the integral? Closing the path on the substituted integral with a semicircle at infinity doesn't have this problem.

I also still don't see, how you make sense of original the integral along a path containing the origin. Of course, you can take out a little region around the origin.

14. Jul 12, 2013

### Millennial

Well, I noticed something interesting.
In the webpage http://math.fullerton.edu/mathews/c2003/IntegralsBranchPointsMod.html [Broken], there is a Theorem 8.7 that gives the result for this integral as $-\pi/3$.

Quite strange, don't you think? Our integrand satisfies all the requirements of the theorem.

Here is the proof I found for the said theorem.

Last edited by a moderator: May 6, 2017
15. Jul 12, 2013

### vanhees71

Well, then there is something wrong, because obviously the integral is positive, isn't it? One has to be very careful, on which Riemann sheet you work and where you put the cut. I still think, doing the substitution for the real integral first ist much more save ;-)).

16. Jul 12, 2013

### Millennial

Ignore that post, the branch cut of the logarithm is being taken as the positive real axis in the proof. It should be the negative real axis. Constructing the keyhole like that and modifying the integrand appropriately gives the proper answer $\pi/3$, however I don't know why they made such a mistake in the proof.

17. Jul 12, 2013

### jackmell

Yes vanheees, that's what you do: you indent around the origin and let the radius of the indentation go to zero. Sometimes this contribution is zero and sometimes it's not for a particular integrand.

A branch-point is a non-isolated singular point and so is not a pole which must be isolated by definition. An essential singularity, isolated or not, is one which has a power expansion with negative exponents which do not terminate. The power expansion for $\sqrt{z}$ is $\sqrt{z}$, i.e, it's finite.

Ok, what I would now like since we're having problems with this is for someone to post a complete, detailed solution to this problem including a nice illustration of a key-hole contour, color-coded preferably, and a nice explanation of the relationship between a particular determination of the square root function such as $\log(z)=\ln|r|+i\theta,\quad 0\leq \theta<2\pi$, and the residue calculations.

Last edited: Jul 12, 2013
18. Jul 12, 2013

### Millennial

Alright, here is a full solution to the problem: (No illustration, sorry :P)

Consider a keyhole contour that has the keyhole around the negative real axis, the branch cut for the complex logarithm. Start from the bottom left corner of the keyhole and traverse a big circle of radius $R$ counterclockwise; call this circle $C_1$. Now, go from $-R$ to $-\varepsilon$. Call this line segment $C_2$. Traverse a circle around the origin of radius $\varepsilon$ clockwise; call this circle $C_3$. Finally, draw a line underneath the negative real axis from $-\varepsilon$ to $-R$; call this line $C_4$. Call the entire contour $C$.

An illustration could save time, but meh.

Now, call $\displaystyle f(z)=\frac{\sqrt{z}}{z^3+1}$. We consider the contour integral $\displaystyle \int_{C} f(-z)\,dz$.

It is trivial to show that the integrals on $C_1$ and $C_3$ vanish. The poles of the integrand are all inside the contour, and their residues add up to $-\dfrac{i}{3}$, which gives us $\displaystyle \int_{C} f(-z)\,dz = \int^{-\varepsilon}_{-R} f(-z)\,dz + \int^{-R}_{-\varepsilon}f(-z)\,dz = \frac{2\pi}{3}$.

The traversion of $C_3$ gives us an argument bonus of $-2\pi$ when integrating over $C_4$; which expresses itself as an additional negative sign due to the square root. This, after rearranging and performing the variable transformation $z\to -z$, gives us the final result that $\displaystyle 2\int^{\infty}_{0}f(z)\,dz = \frac{2\pi}{3}$.

19. Jul 12, 2013

### jackmell

You're integrating over a pole that way. Remember $z=-1$ is a singular point of the function. You'd have to make accommodations for indenting around that pole.

Ok, that is way too complicated to follow. Why not just place the key-slot over the positive real axis instead and do away with that -z thing? The only concern is that when we do that, we're using the determination $\log(z)=\ln|r|+i\theta,\quad 0\leq \theta<2\pi$ so that the value of $\sqrt{e^{-\pi i/3}}=e^{5\pi i/6}$ when we compute the residue for that value.

20. Jul 12, 2013

### vanhees71

Ok, I hope that's allowed now. I was told that one should not post complete solutions in this section of the forum.

Solution 1
-----------

My solution, I suggested before, is to first substitute $u=x^{2/3}$. Then the integral goes over to
$$I=\frac{1}{3} \int_{-\infty}^{\infty} \mathrm{d} u \frac{1}{u^2+1}.$$
(a) The direct solution is to directly integrate this:
$$I=\left . \frac{1}{3} \arctan u \right |_{u \rightarrow -\infty}^{u \rightarrow \infty}=\frac{\pi}{3}.$$

(b) Alternatively you can use the theorem of residues by closing the contour with a semicircle in the upper complex u plane. The integrand has two simple poles at $u=\pm \mathrm{i}$. The one in the upper plane is $+\mathrm{i}$. The residuum is
$$\lim_{u \rightarrow \mathrm{i}} \frac{1}{3} \frac{u-\mathrm{i}}{u^2+1}=\frac{1}{6 \mathrm{i}},$$
and thus you find again
$$I=2 \pi \mathrm{i} \frac{1}{6 \mathrm{i}}=\frac{\pi}{3}.$$

Solution 2
-----------

Without doing the substitution in the real integral the problem is more complicated. The only way I can imagine is to define a contour $\mathcal{C}$ running parallel to the negative real axis somewhat above the real axis, then a small semicircle around the origin then parallel to the real axis back to $-\infty$. Then you can close the contour by a large circle (leaving out the infinitesimal gap along the negative real axis) at infinity. Then you have a closed path and you can evaluate the integral
$$I'=\int_{\mathcal{C}} \mathrm{d} z=\frac{\sqrt{z}}{z^3-1}.$$
For the square root we use the principal branch, i.e., $\sqrt{z}>0$ for real $z>0$ and the branch cut along the negative real axis.

Then on the one hand you can use the theorem of residues. All three poles 1, $\exp(\pm \mathrm{i}/3$ with residua +1/3, -1/3, -1/3 of the integrand are inside the contour. Thus you get
$$I'=-\frac{2 \pi \mathrm{i}}{3}.$$

On the other hand you can directly write down the integrals along the real axis. Take the parametrizations
$$\mathcal{C}_1: z=-\lambda + \mathrm{i} 0^+, \quad \mathcal{C}_2=-\lambda - \mathrm{i} 0^+.$$
Noting that for $\mathcal{C}_1$ $\lambda$ runs from $-\infty$ to 0 and for $\mathcal{C}_2$ from 0 to $-\infty$, this gives
$$-\frac{2 \pi \mathrm{i}}{3}=I'=-2 \mathrm{i}\int_0^{\infty} \frac{\sqrt{\lambda}}{\lambda^3+1}.$$
This gives again
$$I=\int_0^{\infty} \mathrm{d} \lambda \frac{\sqrt{\lambda}}{\lambda^3+1}=\frac{\pi}{3}.$$
This is a pretty inconvenient way compared to solution 1 ;-).