Contour integration with a square root

Click For Summary

Homework Help Overview

The discussion revolves around evaluating the integral ## \int_0^\infty dx \frac{\sqrt{x}}{1+x^2} ## using contour integration techniques, particularly the calculus of residues. Participants are exploring the complexities introduced by the square root in the integrand and the implications of branch points.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Several participants attempt to apply the residue theorem, discussing the necessity of breaking up the denominator and the implications of the square root in the numerator. There are attempts to use different contour integration methods, including the keyhole contour and substitutions to simplify the integral.

Discussion Status

The discussion is ongoing, with participants providing various insights and suggestions for resolving the integral. Some participants express uncertainty about the application of the residue theorem due to the non-analytic nature of the square root function, while others propose alternative substitutions to facilitate the integration process.

Contextual Notes

Participants note the presence of branch points and the need to consider the behavior of the integrand at infinity. There are mentions of discrepancies between calculated results and those obtained from computational tools, prompting further investigation into the methods used.

ShayanJ
Science Advisor
Insights Author
Messages
2,802
Reaction score
605

Homework Statement


Find the value of the integral ## \int_0^\infty dx \frac{\sqrt{x}}{1+x^2} ## using calculus of residues!

Homework Equations

The Attempt at a Solution


This is how I did it:
##\int_0^\infty dx \frac{\sqrt{x}}{1+x^2}=\frac 1 2 \int_{-\infty}^\infty dx \frac{\sqrt{|x|}}{1+x^2} ##
##\displaystyle \lim_{R\to \infty} \int_{-R}^R dz \frac{\sqrt{|z|}}{1+z^2}=\lim_{R\to \infty}\oint_{semicircle^+_R} dz \frac{\sqrt{|z|}}{1+z^2}-\underbrace{\lim_{R\to \infty} \int_{C_R}dz \frac{\sqrt{|z|}}{1+z^2}}_{\to 0} \Rightarrow \int_{-\infty}^\infty dz \frac{\sqrt{|z|}}{1+z^2}=2\pi i \frac{\sqrt{|i|}}{2i}=-2\pi i \frac i 2=\pi##
So:
##\int_0^\infty dx \frac{\sqrt{x}}{1+x^2}=\frac \pi 2 ##
I also tried using the keyhole contour because of the branch point at z=0. But this time I got ## \frac{\pi}{1+i} ##.
The problem is, wolframalpha.com gives ## \frac \pi {\sqrt 2} ##.
What did I do wrong?
Thanks
 
Physics news on Phys.org
Shayan.J said:

Homework Statement


Find the value of the integral ## \int_0^\infty dx \frac{\sqrt{x}}{1+x^2} ## using calculus of residues!

Homework Equations

The Attempt at a Solution


This is how I did it:
##\int_0^\infty dx \frac{\sqrt{x}}{1+x^2}=\frac 1 2 \int_{-\infty}^\infty dx \frac{\sqrt{|x|}}{1+x^2} ##
##\displaystyle \lim_{R\to \infty} \int_{-R}^R dz \frac{\sqrt{|z|}}{1+z^2}=\lim_{R\to \infty}\oint_{semicircle^+_R} dz \frac{\sqrt{|z|}}{1+z^2}-\underbrace{\lim_{R\to \infty} \int_{C_R}dz \frac{\sqrt{|z|}}{1+z^2}}_{\to 0} \Rightarrow \int_{-\infty}^\infty dz \frac{\sqrt{|z|}}{1+z^2}=2\pi i \frac{\sqrt{|i|}}{2i}=-2\pi i \frac i 2=\pi##
So:
##\int_0^\infty dx \frac{\sqrt{x}}{1+x^2}=\frac \pi 2 ##
I also tried using the keyhole contour because of the branch point at z=0. But this time I got ## \frac{\pi}{1+i} ##.
The problem is, wolframalpha.com gives ## \frac \pi {\sqrt 2} ##.
What did I do wrong?
Thanks
I think you incorrectly used the residue theorem. You need to break up the denominator by partial fractions with ## 1+x^2 =(x+i)(x-i) ## and then get it in the form ## 1/(z-z_0) ## of which you will have two terms for which the residue theorem can be applied with the ## \sqrt{|z|} ## in the numerator.
 
Last edited:
Charles Link said:
I think you incorrectly used the residue theorem. You need to break up the denominator by partial fractions with ## 1+x^2 =(x+i)(x-i) ## and then get it in the form ## 1/(z-z_0) ## of which you will have two terms for which the residue theorem can be applied with the ## \sqrt{z} ## in the numerator.
The denominator has two roots, i and -i. But because the contour is a semicircle in the upper half of the plane, only the residue at i contributes. So the residue theorem gives ## 2 \pi i \frac{\sqrt{|i|}}{i+i} ##. But ## |i|=1 ##, so the answer is ## 2 \pi i \frac{1}{2i}=\pi ##.
 
Shayan.J said:
The denominator has two roots, i and -i. But because the contour is a semicircle in the upper half of the plane, only the residue at i contributes. So the residue theorem gives ## 2 \pi i \frac{\sqrt{|i|}}{i+i} ##. But ## |i|=1 ##, so the answer is ## 2 \pi i \frac{1}{2i}=\pi ##.
With the residue theorem, the ## z-z_0 ## in the denominator is not part of the residue of the ## f(z) ## of the numerator. I've got one problem with this problem that I haven't resolved. The ## \sqrt{z} \, dz ## in the numerator (the arc length, etc.) is off sufficient magnitude that I don't think the semi-circle part of the contour can be said to be zero either in the upper half plane or lower half plane. I'm still at the drawing board.
 
Charles Link said:
With the residue theorem, the ## z-z_0 ## in the denominator is not part of the residue of the ## f(z) ## of the numerator. I've got one problem with this problem that I haven't resolved. The ## \sqrt{z} \, dz ## in the numerator (the arc length, etc.) is off sufficient magnitude that I don't think the semi-circle part of the contour can be said to be zero either in the upper half plane or lower half plane. I'm still at the drawing board.
Dude, you need help on this more than me!
The ##z-z_0## you're talking about is ## z-i ## in the case of my problem which is canceled when I calculate the residue using the formula ##\displaystyle Res[f(z),z_0]_{n=1}=\lim_{z\to z_0} (z-z_0)f(z) ##. So what I'm doing is ## \left. \frac{(z-i)\sqrt{|z|}}{(i-z)(i+z)}\right|_{z=i}=\left. -\frac{\sqrt{|z|}}{i+z}\right|_{z=i}=-\frac{\sqrt{|i|}}{2i}##.
And the condition for the Jordan's lemma to be applicable is that ## \displaystyle \lim_{R \to \infty} f(R e^{i\theta})=0 \ \ \ (0\leq \theta \leq \pi)## which the function in the OP clearly satisfies.
 
Careful with the square root and the absolute value. The residue theorem only applies to functions that are analytic away from the poles.
 
  • Like
Likes   Reactions: ShayanJ
Orodruin said:
Careful with the square root and the absolute value. The residue theorem only applies to functions that are analytic away from the poles.
So...what should I do?
 
I have something that I think works and makes it very straightforward. Use the substitution ## x=z^2 ##. You then get ## z^4+1=(z^2+i)(z^2-i) ## and the partial fractions gets rid of the resulting ## z^2 ## in the numerator from the sqrt and the dx. The ## z^2+i ## and ## z^2-i ## can subsequently be factored (and use partial fractions to separate the terms) and simple application of the residue theorem (4 terms) should get you the answer. editing... I thought I had it, but once again I'm stuck because the contour doesn't close properly, i.e. often times there is a ## e^{iz} ## term in these integrals so you can do the contour in the upper half plane and get zero for the semi-circle, but such a term is not present. I'm back to the drawing board !
 
Last edited:
Shayan.J said:

Homework Statement


Find the value of the integral ## \int_0^\infty dx \frac{\sqrt{x}}{1+x^2} ## using calculus of residues!

Homework Equations

The Attempt at a Solution


This is how I did it:
##\int_0^\infty dx \frac{\sqrt{x}}{1+x^2}=\frac 1 2 \int_{-\infty}^\infty dx \frac{\sqrt{|x|}}{1+x^2} ##
##\displaystyle \lim_{R\to \infty} \int_{-R}^R dz \frac{\sqrt{|z|}}{1+z^2}=\lim_{R\to \infty}\oint_{semicircle^+_R} dz \frac{\sqrt{|z|}}{1+z^2}-\underbrace{\lim_{R\to \infty} \int_{C_R}dz \frac{\sqrt{|z|}}{1+z^2}}_{\to 0} \Rightarrow \int_{-\infty}^\infty dz \frac{\sqrt{|z|}}{1+z^2}=2\pi i \frac{\sqrt{|i|}}{2i}=-2\pi i \frac i 2=\pi##
So:
##\int_0^\infty dx \frac{\sqrt{x}}{1+x^2}=\frac \pi 2 ##
I also tried using the keyhole contour because of the branch point at z=0. But this time I got ## \frac{\pi}{1+i} ##.
The problem is, wolframalpha.com gives ## \frac \pi {\sqrt 2} ##.
What did I do wrong?
Thanks

You CANNOT use contour integration the way you have done, because ##|z|## and ##\sqrt{|z|}## are not analytic (or even holomorphic) functions in the complex plane. The contour integration theorems will simply not apply to your integral as you have written it.

However, you can change variables to ##t =\sqrt{x}## and get an integral of the form
$$I = \int_0^{\infty} \frac{2 t^2}{1+t^4} \, dt$$
Now you CAN write
$$I = \int_{-\infty}^{\infty} \frac{t^2}{1+t^4} \, dt $$
and apply contour integration to that.

Note added in edit: for some reason, Orodruin's post did not appear on my screen until after I pressed the enter key to submit this material.
 
  • Like
Likes   Reactions: Charles Link and ShayanJ
  • #10
I applied the suggested substitution, but I got an extra i!
This is how I did it:
## \int_0^\infty \frac{\sqrt x}{1+x^2} dx \xrightarrow{b=\sqrt x} 2\int_0^\infty \frac{b^2}{1+b^4}db=\int_0^\infty \left( \frac{1}{b^2+i}+\frac{1}{b^2-i} \right) db=\frac 1 2 \int_{-\infty}^\infty \left( \frac{1}{b^2+i}+\frac{1}{b^2-i} \right) db##.

## \int_{-\infty}^\infty \frac{db}{b^2-i}=\oint_{semicircle^+} \frac{dz}{z^2-i}=2\pi i \left. \frac{1}{z+e^{i\frac \pi 4}} \right|_{z=e^{i\frac \pi 4}}=\pi i e^{-i\frac \pi 4}##

## \int_{-\infty}^\infty \frac{db}{b^2+i}=-\oint_{semicircle^-} \frac{dz}{z^2+i}=-2\pi i \left. \frac{1}{z+e^{i\frac {3\pi} 4}} \right|_{z=e^{i\frac {3\pi} 4}}=-\pi i e^{-i\frac {3\pi} 4}##

## \int_0^\infty \frac{\sqrt x}{1+x^2} dx= \frac{\pi i}{2}(e^{-i\frac \pi 4}-e^{-i\frac {3\pi} 4})=\frac{\pi}{\sqrt 2}i##

EDIT: I noticed that if I don't put that minus sign in the calculation of the integral on the semicricle-, the extra i won't happen. But I think that minus sign should be there because going from ##-\infty ## to ##\infty## and also having a semicircle in the the lower half of the plane, means the contour is being traversed clockwise, so the direction should be reversed and there should be a minus sign. Is this wrong?
 
Last edited:
  • #11
Shayan.J said:
I applied the suggested substitution, but I got an extra i!
This is how I did it:
## \int_0^\infty \frac{\sqrt x}{1+x^2} dx \xrightarrow{b=\sqrt x} 2\int_0^\infty \frac{b^2}{1+b^4}db=\int_0^\infty \left( \frac{1}{b^2+i}+\frac{1}{b^2-i} \right) db=\frac 1 2 \int_{-\infty}^\infty \left( \frac{1}{b^2+i}+\frac{1}{b^2-i} \right) db##.

## \int_{-\infty}^\infty \frac{db}{b^2-i}=\oint_{semicircle^+} \frac{dz}{z^2-i}=2\pi i \left. \frac{1}{z+e^{i\frac \pi 4}} \right|_{z=e^{i\frac \pi 4}}=\pi i e^{-i\frac \pi 4}##

## \int_{-\infty}^\infty \frac{db}{b^2+i}=-\oint_{semicircle^-} \frac{dz}{z^2+i}=-2\pi i \left. \frac{1}{z+e^{i\frac {3\pi} 4}} \right|_{z=e^{i\frac {3\pi} 4}}=-\pi i e^{-i\frac {3\pi} 4}##

## \int_0^\infty \frac{\sqrt x}{1+x^2} dx= \frac{\pi i}{2}(e^{-i\frac \pi 4}-e^{-i\frac {3\pi} 4})=\frac{\pi}{\sqrt 2}i##

EDIT: I noticed that if I don't put that minus sign in the calculation of the integral on the semicricle-, the extra i won't happen. But I think that minus sign should be there because going from ##-\infty ## to ##\infty## and also having a semicircle in the the lower half of the plane, means the contour is being traversed clockwise, so the direction should be reversed and there should be a minus sign. Is this wrong?

If you close the second integral using a lower semi-circle you will pick up the pole at ##b = e^{-i\pi/4}##, not the pole at ##b = e^{3i\pi/4}##.
 
  • Like
Likes   Reactions: ShayanJ
  • #12
Shayan.J said:
I applied the suggested substitution, but I got an extra i!
This is how I did it:
## \int_0^\infty \frac{\sqrt x}{1+x^2} dx \xrightarrow{b=\sqrt x} 2\int_0^\infty \frac{b^2}{1+b^4}db=\int_0^\infty \left( \frac{1}{b^2+i}+\frac{1}{b^2-i} \right) db=\frac 1 2 \int_{-\infty}^\infty \left( \frac{1}{b^2+i}+\frac{1}{b^2-i} \right) db##.

## \int_{-\infty}^\infty \frac{db}{b^2-i}=\oint_{semicircle^+} \frac{dz}{z^2-i}=2\pi i \left. \frac{1}{z+e^{i\frac \pi 4}} \right|_{z=e^{i\frac \pi 4}}=\pi i e^{-i\frac \pi 4}##

## \int_{-\infty}^\infty \frac{db}{b^2+i}=-\oint_{semicircle^-} \frac{dz}{z^2+i}=-2\pi i \left. \frac{1}{z+e^{i\frac {3\pi} 4}} \right|_{z=e^{i\frac {3\pi} 4}}=-\pi i e^{-i\frac {3\pi} 4}##

## \int_0^\infty \frac{\sqrt x}{1+x^2} dx= \frac{\pi i}{2}(e^{-i\frac \pi 4}-e^{-i\frac {3\pi} 4})=\frac{\pi}{\sqrt 2}i##

EDIT: I noticed that if I don't put that minus sign in the calculation of the integral on the semicricle-, the extra i won't happen. But I think that minus sign should be there because going from ##-\infty ## to ##\infty## and also having a semicircle in the the lower half of the plane, means the contour is being traversed clockwise, so the direction should be reversed and there should be a minus sign. Is this wrong?

If you complete in the upper half-plane the contour is counter-clockwise and you need the residues at ##r_1 = e^{i\pi/4}## and ##r_2 =e^{3 i \pi/4}##; if you complete in the lower half-plane your contour is clockwise and you need the residues at ##r_3= e^{5 i \pi/4} = e^{-3 i \pi/4}## and ##r_4 =e^{7 i \pi/4} = e^{-i \pi/4}##.

Completing in the upper half-plane gives
$$I = 2 \pi i \left( \frac{r_1^2}{(r_1-r_2)(r_1-r_3)(r_1-r_4)} + \frac{r_2^2}{(r_2-r_1)(r_2-r_3)(r_2-r_4)} \right) $$
That simplifies to ##I = \pi/\sqrt{2}##, as it should.
 
Last edited:
  • Like
Likes   Reactions: Charles Link and ShayanJ

Similar threads

  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
4
Views
3K