Contour Integration: Solving Homework Statement

  • Thread starter Random Variable
  • Start date
  • Tags
    Integration
In summary: Hint: \tan x = 0 at what points of [0,2\pi)? )In summary, when calculating the residue at -i for the given integral, the branch of the square root function used must be redefined in order to get the correct answer. The argument of -i must be \pi, and the branch must be defined as \sqrt{z} = r^{1/2}e^{i/2(\arg(z))}, \pi \leq \arg(z) < 3\pi.
  • #1
Random Variable
116
0

Homework Statement



[tex] \int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx [/tex]

Homework Equations





The Attempt at a Solution



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

[tex] 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} [/tex]

[tex] 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} [/tex]

[tex] \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 [/tex]


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
  • #2
What contour have you used?
Could it have something to with the choice of brance of the square root function?
 
  • #3
What contour are you using, and how does it relate to the interval for your desired integral (positive real axis)?
 
  • #4
Be careful when you apply square roots to complex numbers. There is always some ambiguity present. In this case you have:

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

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:
[tex]\sqrt{i} = \frac{2}{\sqrt{2}}\left(1+i\right)[/tex]
With this choice you have implicitly defined your choice for the square root function. For the second square root you must apply [tex]\sqrt{-1} = i[/tex] or else you run into inconsistencies (as you noticed). So:
[tex]\sqrt{-i} = \sqrt{-1}\sqrt{i} = i \sqrt{i} = -\frac{2}{\sqrt{2}}\left(1-i\right)[/tex]

In that case you get the correct answer.
 
Last edited:
  • #5
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:
  • #6
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:
  • #7
Because the imaginary unit [itex]i[/itex] is familiar number we can easily make mistakes with the branch cuts. Try to compute the more general integral using the same contour:

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

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.
 
  • #8
xepma said:
Be careful when you apply square roots to complex numbers. There is always some ambiguity present. In this case you have:

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

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:
[tex]\sqrt{i} = \frac{2}{\sqrt{2}}\left(1+i\right)[/tex]
With this choice you have implicitly defined your choice for the square root function. For the second square root you must apply [tex]\sqrt{-1} = i[/tex] or else you run into inconsistencies (as you noticed). So:
[tex]\sqrt{-i} = \sqrt{-1}\sqrt{i} = i \sqrt{i} = -\frac{2}{\sqrt{2}}\left(1-i\right)[/tex]

In that case you get the correct answer.

Does it matter which root you pick for [tex] \sqrt {i} [/tex]? And could you pick the root for [tex] \sqrt {-i} [/tex] first?
 
  • #9
Random Variable said:
Does it matter which root you pick for [tex] \sqrt {i} [/tex]? And could you pick the root for [tex] \sqrt {-i} [/tex] 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



[tex] \int^{\infty}_{0} \frac {\sqrt{x}}{1+x^{2}} dx [/tex]

Homework Equations





The Attempt at a Solution



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

[tex] 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} [/tex]

[tex] 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} [/tex]

[tex] \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 [/tex]


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:

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

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:

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

then the argument of -i is what?

[tex] \frac {3}{2} \pi [/tex]
 
  • #12
Ok then:

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

and then calculate [tex]\sqrt{-i}[/tex] using that argument.
 
  • #13
Or, if you are lazy, change the contour into a half circle.
 
  • #14
[tex] 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} [/tex]

then [tex] \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 [/tex]


Thanks. I was using [tex] -\frac {\pi}{2} [/tex] 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 [tex] \sqrt {z} [/tex] ?
 
  • #16
Random Variable said:
What branch would be used for [tex] \sqrt {z} [/tex] ?

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:
[tex] 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} [/tex]

then [tex] \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 [/tex]


Thanks. I was using [tex] -\frac {\pi}{2} [/tex] 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.
 

1. What is contour integration?

Contour integration is a mathematical technique used to evaluate integrals along a specific path, or contour, in the complex plane. It is based on the fundamental theorem of calculus, where the integral of a function is equal to the difference between its values at the endpoints of the integration path.

2. How is contour integration used in solving homework statements?

Contour integration is used to simplify complex integrals by choosing a suitable contour that allows for easier evaluation. This is particularly useful in solving homework statements involving complex functions, as it reduces the problem to a simpler integral that can be solved using traditional methods.

3. What are the key steps in solving a homework statement using contour integration?

The key steps in solving a homework statement using contour integration are: 1) Choosing a suitable contour; 2) Evaluating the integral using the chosen contour; 3) Applying the fundamental theorem of calculus to the resulting integral; 4) Simplifying the integral using algebraic manipulation; 5) Evaluating the integral at the endpoints of the contour.

4. Can contour integration be used to solve any type of integral?

No, contour integration is only applicable to integrals involving complex functions. It cannot be used to solve integrals involving real-valued functions.

5. Are there any limitations to using contour integration in solving homework statements?

Yes, there are some limitations to using contour integration. It is not always possible to find a suitable contour for a given integral, and even when a contour can be found, the resulting integral may still be difficult to solve. In addition, contour integration is not applicable to integrals with singularities on the chosen contour.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
757
  • Calculus and Beyond Homework Help
Replies
3
Views
580
  • Calculus and Beyond Homework Help
Replies
4
Views
688
  • Calculus and Beyond Homework Help
Replies
21
Views
836
  • Calculus and Beyond Homework Help
Replies
4
Views
130
  • Calculus and Beyond Homework Help
Replies
5
Views
760
  • Calculus and Beyond Homework Help
Replies
1
Views
844
  • Calculus and Beyond Homework Help
Replies
34
Views
2K
  • Calculus and Beyond Homework Help
2
Replies
47
Views
2K
  • Calculus and Beyond Homework Help
Replies
20
Views
453
Back
Top