Contour Integration: Solving Homework Statement

  • Thread starter Thread starter Random Variable
  • Start date Start date
  • Tags Tags
    Integration
Click For Summary
The discussion focuses on solving the integral ∫(√x)/(1+x²) dx from 0 to ∞ using contour integration techniques. Participants highlight the importance of correctly defining the branch cuts for the square root function, which can lead to discrepancies in the final answer, particularly when calculating residues at poles. The choice of contour, such as the keyhole contour, is emphasized to ensure continuity of the square root function along the integration path. A specific error in calculating residues at the poles is identified, with suggestions to use different arguments for the square roots to achieve the correct result. Ultimately, the conversation underscores the critical role of branch cuts and contour selection in complex analysis.
Random Variable
Messages
114
Reaction score
0

Homework Statement



\int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx

Homework Equations





The Attempt at a Solution



f(z) = \frac {\sqrt{z}}{1+z^{2}} = \frac {\sqrt{z}}{(z-i)(z+i)}

Res[f,i] = \lim_{z \to i} \frac {\sqrt {z}}{z+i}} = \frac {\sqrt {i}}{2i} = \frac {1}{2i} (\frac {\sqrt {2}}{2}} + i \frac {\sqrt {2}}{2}}) = \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4}

Res[f,-i] = \lim_{z \to -i} \frac {\sqrt {z}}{z-i}} = \frac {\sqrt {-i}}{-2i} = \frac {1}{-2i} (\frac {\sqrt {2}}{2}} - i \frac {\sqrt {2}}{2}}) = \frac {\sqrt {2}}{4} + i \frac {\sqrt {2}}{4}

\int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx = \frac {2 \pi i}{1-e^{i \pi}} [ \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4} + \frac {\sqrt {2}}{4} + i \frac {\sqrt {2}}{4}] = \frac {2 \pi i}{2}( \frac {\sqrt {2}}{2}) = i \frac {\sqrt {2}}{2} \pi


I've done this problem over and over again and I can't figure out where I made a mistake. The answer obviously can't be imaginary.
 
Physics news on Phys.org
What contour have you used?
Could it have something to with the choice of brance of the square root function?
 
What contour are you using, and how does it relate to the interval for your desired integral (positive real axis)?
 
Be careful when you apply square roots to complex numbers. There is always some ambiguity present. In this case you have:

\sqrt{i} = \pm \frac{2}{\sqrt{2}}\left(1+i\right)
\sqrt{-i} = \pm \frac{2}{\sqrt{2}}\left(1-i\right)

A different sign choice leads to the correct answer. My guess is that if you carefully define the square root as the exponential of a logarithm, with a proper condition on the branch cut of the logarithm, you can avoid this ambiguity. But I haven't checked this.

EDIT:
Yes, you first use:
\sqrt{i} = \frac{2}{\sqrt{2}}\left(1+i\right)
With this choice you have implicitly defined your choice for the square root function. For the second square root you must apply \sqrt{-1} = i or else you run into inconsistencies (as you noticed). So:
\sqrt{-i} = \sqrt{-1}\sqrt{i} = i \sqrt{i} = -\frac{2}{\sqrt{2}}\left(1-i\right)

In that case you get the correct answer.
 
Last edited:
Big-T said:
What contour have you used?
Could it have something to with the choice of brance of the square root function?

keyhole contour

http://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Keyhole_contour.svg/180px-Keyhole_contour.svg.png"
 
Last edited by a moderator:
Random Variable said:
keyhole contour

http://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Keyhole_contour.svg/180px-Keyhole_contour.svg.png"

Check out Example IV - Branch Cuts on this page:

http://en.wikipedia.org/wiki/Methods_of_contour_integration

in particular the non-standard branch cut they choose so that the square root is continuous on and inside the keyhole contour.
 
Last edited by a moderator:
Because the imaginary unit i is familiar number we can easily make mistakes with the branch cuts. Try to compute the more general integral using the same contour:

\int_{0}^{\infty}\frac{x^{-p}}{1+x}dx=\frac{\pi}{\sin(\pi p)}

Your integral can transformed into this one by substituting x = sqrt(y).


You can also substitute x = y^2 and then consider the contour from y= 0 to R, a quarter circle to i R and then from i R back to zero.
 
xepma said:
Be careful when you apply square roots to complex numbers. There is always some ambiguity present. In this case you have:

\sqrt{i} = \pm \frac{2}{\sqrt{2}}\left(1+i\right)
\sqrt{-i} = \pm \frac{2}{\sqrt{2}}\left(1-i\right)

A different sign choice leads to the correct answer. My guess is that if you carefully define the square root as the exponential of a logarithm, with a proper condition on the branch cut of the logarithm, you can avoid this ambiguity. But I haven't checked this.

EDIT:
Yes, you first use:
\sqrt{i} = \frac{2}{\sqrt{2}}\left(1+i\right)
With this choice you have implicitly defined your choice for the square root function. For the second square root you must apply \sqrt{-1} = i or else you run into inconsistencies (as you noticed). So:
\sqrt{-i} = \sqrt{-1}\sqrt{i} = i \sqrt{i} = -\frac{2}{\sqrt{2}}\left(1-i\right)

In that case you get the correct answer.

Does it matter which root you pick for \sqrt {i}? And could you pick the root for \sqrt {-i} first?
 
Random Variable said:
Does it matter which root you pick for \sqrt {i}? And could you pick the root for \sqrt {-i} first?

If you write a complex number z in the form r exp(i theta), then you define sqrt(z) as sqrt(r) exp(i theta/2). So, the only thing there is to choose is what interval for the angle theta to use. You can choose the interval from zero to 2 pi or minus pi to plus pi. But it must be the case that any complex number has a unique value for the polar angle theta for the square root to be defined.

Then, for this contour integration, there is another thing to consider. The square root function must be continuous along the contour. So, you are then forced to choose theta between zero and 2 pi and let the so-called branch cut be along the positive x-axis.
 
  • #10
Random Variable said:

Homework Statement



\int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx

Homework Equations





The Attempt at a Solution



f(z) = \frac {\sqrt{z}}{1+z^{2}} = \frac {\sqrt{z}}{(z-i)(z+i)}

Res[f,i] = \lim_{z \to i} \frac {\sqrt {z}}{z+i}} = \frac {\sqrt {i}}{2i} = \frac {1}{2i} (\frac {\sqrt {2}}{2}} + i \frac {\sqrt {2}}{2}}) = \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4}

Res[f,-i] = \lim_{z \to -i} \frac {\sqrt {z}}{z-i}} = \frac {\sqrt {-i}}{-2i} = \frac {1}{-2i} (\frac {\sqrt {2}}{2}} - i \frac {\sqrt {2}}{2}}) = \frac {\sqrt {2}}{4} + i \frac {\sqrt {2}}{4}

\int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx = \frac {2 \pi i}{1-e^{i \pi}} [ \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4} + \frac {\sqrt {2}}{4} + i \frac {\sqrt {2}}{4}] = \frac {2 \pi i}{2}( \frac {\sqrt {2}}{2}) = i \frac {\sqrt {2}}{2} \pi


I've done this problem over and over again and I can't figure out where I made a mistake. The answer obviously can't be imaginary.

You're calculating the residue at -i incorrectly for the branch you're using. Your branch is defined as:

\sqrt{z}=r^{1/2}e^{i/2(\arg(z))},\quad 0\leq arg(z)<2\pi

then the argument of -i is what?
 
  • #11
squidsoft said:
You're calculating the residue at -i incorrectly for the branch you're using. Your branch is defined as:

\sqrt{z}=r^{1/2}e^{i/2(\arg(z))},\quad 0\leq arg(z)<2\pi

then the argument of -i is what?

\frac {3}{2} \pi
 
  • #12
Ok then:

\mathop\text{Res}_{z=-i} \frac{\sqrt{z}}{(z+i)(z-i)}=\frac{\sqrt{-i}}{-2i}

and then calculate \sqrt{-i} using that argument.
 
  • #13
Or, if you are lazy, change the contour into a half circle.
 
  • #14
Res[f,-i] = \lim_{z \to -i} \frac {\sqrt {z}}{z-i}} = \frac {\sqrt {-i}}{-2i} = \frac {1}{-2i}(cos (\frac {3 \pi}{4}) + i sin (\frac {3 \pi}{4}) ) = \frac {1}{-2i} ( \frac {-\sqrt {2}}{2}} + i \frac {\sqrt {2}}{2}}) = \frac {-\sqrt {2}}{4} - i \frac {\sqrt {2}}{4}

then \int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx = \frac {2 \pi i}{1-e^{i \pi}} [ \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4} - \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4}] = \frac {2 \pi i}{2}( -i \frac {\sqrt {2}}{2}) = \frac {\sqrt {2}}{2} \pi


Thanks. I was using -\frac {\pi}{2} for the argument.
 
  • #15
Count Iblis said:
Or, if you are lazy, change the contour into a half circle.

What branch would be used for \sqrt {z} ?
 
  • #16
Random Variable said:
What branch would be used for \sqrt {z} ?

Take the contour from z = epsilon to R, then a half circle in the upper half plane to minus R, then to minus epsilon, and then half a circle in the upper half plane to plus epsilon.
You can then put the branch cut anywhere in the lower half of the complex plane. If I is the integral from epsilon to R, then the integral from minus R to minus epsilon is i I. The Contour integral in the limit epsilon to zero and R to infinite becomes:

(1+i) I

Residue theorem gives the contour integral as

2 pi i *exp(pi i/4)/(2i) = pi/sqrt(2) (1+i)

So, it follows that I = pi/sqrt(2).

This is then easier as there is only one pole in the contour. Also, the choice of te branch cut is less critical. The integral from minus R to minus epsilon is i I, essentially because -1 = exp(pi i) and not e.g. exp(- pi i), but in this case it is hard to get this wrong.
 
  • #17
Random Variable said:
Res[f,-i] = \lim_{z \to -i} \frac {\sqrt {z}}{z-i}} = \frac {\sqrt {-i}}{-2i} = \frac {1}{-2i}(cos (\frac {3 \pi}{4}) + i sin (\frac {3 \pi}{4}) ) = \frac {1}{-2i} ( \frac {-\sqrt {2}}{2}} + i \frac {\sqrt {2}}{2}}) = \frac {-\sqrt {2}}{4} - i \frac {\sqrt {2}}{4}

then \int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx = \frac {2 \pi i}{1-e^{i \pi}} [ \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4} - \frac {\sqrt {2}}{4} - i \frac {\sqrt {2}}{4}] = \frac {2 \pi i}{2}( -i \frac {\sqrt {2}}{2}) = \frac {\sqrt {2}}{2} \pi


Thanks. I was using -\frac {\pi}{2} for the argument.

One more thing Random: If you really want to get good at these, learn to draw them. It then becomes crystal clear what's going on with the branches and also, it's quite a programming challenge to draw the complicated ones.
 

Similar threads

  • · Replies 105 ·
4
Replies
105
Views
6K
Replies
6
Views
2K
Replies
4
Views
2K
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 47 ·
2
Replies
47
Views
4K
Replies
3
Views
1K
  • · Replies 34 ·
2
Replies
34
Views
3K
  • · Replies 21 ·
Replies
21
Views
2K