A very basic question about integration

  • Context: MHB 
  • Thread starter Thread starter Saitama
  • Start date Start date
  • Tags Tags
    Integration
Click For Summary

Discussion Overview

The discussion revolves around the evaluation of the integral $$\int_0^{\infty} \frac{dx}{x^2+1}$$ using complex analysis techniques. Participants explore the implications of using different branches of the logarithm function in their calculations, particularly in relation to the complex logarithm and its multi-valued nature.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants assert that the integral evaluates to $\pi/2$, as the integrand is the derivative of $\arctan(x)$.
  • One participant questions the justification for writing $-1 = e^{-i\pi}$ instead of other values like $e^{-i3\pi}$ or $e^{-i5\pi}$, highlighting the ambiguity in the logarithm's branch choice.
  • Another participant emphasizes the importance of using the same branch of the logarithm function at both ends of the contour when evaluating integrals involving complex numbers.
  • Some participants discuss the implications of using different branches of the logarithm, suggesting that it could lead to incorrect results if not handled properly.
  • There is mention of the multi-valued nature of complex functions and the need for careful consideration of branch cuts, particularly in the context of logarithmic and square root functions.
  • A participant points out that the anti-derivative of $\frac{1}{x^2+1}$ is conventionally taken as $\arctan(x)$, but it can also include additional terms related to its multiple branches.

Areas of Agreement / Disagreement

The discussion reveals multiple competing views regarding the choice of branches in logarithmic functions and their effects on the evaluation of integrals. There is no consensus on the implications of using different branches, and participants express varying levels of understanding about the topic.

Contextual Notes

Participants note that the logarithm function is multi-valued and that different branches can lead to different results in integral evaluations. The discussion touches on the necessity of defining a single-valued function for proper integration in complex analysis.

Who May Find This Useful

This discussion may be of interest to those studying complex analysis, particularly in understanding the implications of branch cuts and multi-valued functions in integral evaluations.

Saitama
Messages
4,244
Reaction score
93
I encountered this when I tried to evaluate the following integral with help of complex numbers.
$$\int_0^{\infty} \frac{dx}{x^2+1}$$
The answer is obviously $\pi/2$ as the integrand is derivative of $\arctan(x)$.

Now, I tried it it using partial fraction decomposition:
$$\int_0^{\infty} \frac{dx}{x^2+1}=\frac{1}{2i}\left(\int_0^{\infty} \frac{dx}{x-i}-\int_0^{\infty} \frac{dx}{x+i}\right)$$
$$=\frac{1}{2i}\left(\ln\left(\frac{x-i}{x+i}\right)\right|_0^{\infty}=\frac{-1}{2i}\ln(-1)$$
If I write $-1=e^{-i\pi}$, I get the correct answer but how do I justify writing $-1=e^{-i\pi}$? I mean why not $e^{-i3\pi}$ or $e^{-i5\pi}$?

Any help is appreciated. Thanks!
 
Physics news on Phys.org
Pranav said:
I encountered this when I tried to evaluate the following integral with help of complex numbers.
$$\int_0^{\infty} \frac{dx}{x^2+1}$$
The answer is obviously $\pi/2$ as the integrand is derivative of $\arctan(x)$.

Now, I tried it it using partial fraction decomposition:
$$\int_0^{\infty} \frac{dx}{x^2+1}=\frac{1}{2i}\left(\int_0^{\infty} \frac{dx}{x-i}-\int_0^{\infty} \frac{dx}{x+i}\right)$$
$$=\frac{1}{2i}\left(\ln\left(\frac{x-i}{x+i}\right)\right|_0^{\infty}=\frac{-1}{2i}\ln(-1)$$
If I write $-1=e^{-i\pi}$, I get the correct answer but how do I justify writing $-1=e^{-i\pi}$? I mean why not $e^{-i3\pi}$ or $e^{-i5\pi}$?

Any help is appreciated. Thanks!

Taqe into account that is...

$\displaystyle \int_{0}^{\infty} \frac{d x}{1 + x^{2}} = \frac{1}{2\ i}\ \{\ln 1 - \ln (-1)\}\ (1)$

... and both logarithms in (1) are defined les a term $2\ k\ \pi\ i$...

Kind regards

$\chi$ $\sigma$
 
chisigma said:
Taqe into account that is...

$\displaystyle \int_{0}^{\infty} \frac{d x}{1 + x^{2}} = \frac{1}{2\ i}\ \{\ln 1 - \ln (-1)\}\ (1)$

... and both logarithms in (1) are defined les a term $2\ k\ \pi\ i$...

Kind regards

$\chi$ $\sigma$

Okay, more stupid questions. Why is it invalid to take different values of $k$? I mean, why is it wrong to write $\ln 1=i2\pi$ and $\ln(-1)=-i3\pi$?
 
Last edited:
Pranav said:
Okay, more stupid questions. Why is it invalid to take different values of $k$? I mean, why is it wrong to write $\ln 1=i2\pi$ and $\ln(-1)=-i3\pi$?

... because all definite integrals are a difference ...

$\displaystyle \int_{a}^{b} f(x)\ dx = F(b) - F(a)\ (1)$

... and of course F(*) is the same function computed in b and a...

Kind regards

$\chi$ $\sigma$
 
chisigma said:
... because all definite integrals are a difference ...

$\displaystyle \int_{a}^{b} f(x)\ dx = F(b) - F(a)\ (1)$

... and of course F(*) is the same function computed in b and a...

Kind regards

$\chi$ $\sigma$

But how does that answer my question? :confused:

$\ln(1)=i2\pi$ and $\ln(-1)=-i3\pi$, hence
$$\frac{1}{2i}\left(\ln(1)-\ln(-1)\right)=\frac{1}{2i}\left(i2\pi+i3\pi\right)=\frac{5\pi}{2}$$
Looks perfectly fine to me but it is definitely wrong.
 
Pranav said:
But how does that answer my question? :confused:

$\ln(1)=i2\pi$ and $\ln(-1)=-i3\pi$, hence
$$\frac{1}{2i}\left(\ln(1)-\ln(-1)\right)=\frac{1}{2i}\left(i2\pi+i3\pi\right)=\frac{5\pi}{2}$$
Looks perfectly fine to me but it is definitely wrong.
You have to make sure that you use the same branch of the logarithm function at both ends of the contour. In other words, given the integral $\left.\ln\left(\frac{x-i}{x+i}\right)\right|_0^{\infty}$, you can choose which value of $\ln 1$ that you want to use at the $x=\infty$ end of the contour. But you must then trace the value of $\ln\left(\frac{x-i}{x+i}\right)$ so that it varies continuously as $x$ goes from $\infty$ down to $0$. Then you are forced to use that value of $\ln(-1)$ when $x$ reaches $0$.
 
Opalg said:
You have to make sure that you use the same branch of the logarithm function at both ends of the contour. In other words, given the integral $\left.\ln\left(\frac{x-i}{x+i}\right)\right|_0^{\infty}$, you can choose which value of $\ln 1$ that you want to use at the $x=\infty$ end of the contour. But you must then trace the value of $\ln\left(\frac{x-i}{x+i}\right)$ so that it varies continuously as $x$ goes from $\infty$ down to $0$. Then you are forced to use that value of $\ln(-1)$ when $x$ reaches $0$.

Thanks Opalg! That looks like a valid explanation but I am currently unable to understand it. I don't know what you mean by "same branch of the logarithm function at both ends of the contour", probably something related to contour integration? If so, I guess I should leave it then. :o
 
Pranav said:
Thanks Opalg! That looks like a valid explanation but I am currently unable to understand it. I don't know what you mean by "same branch of the logarithm function at both ends of the contour", probably something related to contour integration? If so, I guess I should leave it then. :o

Hey Pranav!

The same thing happens in the real domain.

You said that the anti-derivative of $\frac 1{x^2+1}$ is $\arctan x$.
However, the inverse of $\tan x$ actually has multiple branches.
Properly it should be $\arctan x + k\pi$.
It is just conventional to always pick $\arctan x$, which is the principle branch.
This is similar to how $\text{Ln }z$ is the principle branch of $\ln z$ when using complex numbers.

If you would calculate the integral with different branches of the inverse of $\tan x$, you'd also get an extra $k\pi$.
This $k\pi$ corresponds to a series of full periods of $\tan x$.
 
Generally abvoid using complex numbers when evaluating real integrals unless you are integrating in the complex plain because you are assuming many things like the function has an anti-derivative. The prediocity of the complex exponential makes the logarithm a multi-valued function and to define it as a differentiable function we have first to make it single-valued and this is done by choosing an appropriate branch. This branch has to define an analtic function in the interval of integration. You have to have a knowledge of complex analysis in order to work comfortably with complex valued functions.
 
  • #10
Pranav said:
Thanks Opalg! That looks like a valid explanation but I am currently unable to understand it. I don't know what you mean by "same branch of the logarithm function at both ends of the contour", probably something related to contour integration? If so, I guess I should leave it then. :o

Complex functions can have multiple "branches". Take the square root function, for example. Why is the "proof"
$$-1=\sqrt{(-1)(-1)}=\sqrt{1\cdot 1}=1$$
wrong? Because the step $\sqrt{(-1)(-1)}=\sqrt{1\cdot 1}$ assumes you can just cross the negative real axis without any trouble. But the square root function has what we call a "branch cut discontinuity" on the negative real axis, that prevents you from doing just this kind of traversing. Here's a visualization of this idea applied to the logarithm function. To keep traversing these functions without incurring the wrath of complex analysts (and getting the wrong answer), you need to specify where you are on the spiral, in this case.
 
  • #11
Ackbach said:
Complex functions can have multiple "branches". Take the square root function, for example. Why is the "proof"
$$-1=\sqrt{(-1)(-1)}=\sqrt{1\cdot 1}=1$$
wrong? Because the step $\sqrt{(-1)(-1)}=\sqrt{1\cdot 1}$ assumes you can just cross the negative real axis without any trouble. But the square root function has what we call a "branch cut discontinuity" on the negative real axis, that prevents you from doing just this kind of traversing. Here's a visualization of this idea applied to the logarithm function. To keep traversing these functions without incurring the wrath of complex analysts (and getting the wrong answer), you need to specify where you are on the spiral, in this case.

I like Serena said:
Hey Pranav!

The same thing happens in the real domain.

You said that the anti-derivative of $\frac 1{x^2+1}$ is $\arctan x$.
However, the inverse of $\tan x$ actually has multiple branches.
Properly it should be $\arctan x + k\pi$.
It is just conventional to always pick $\arctan x$, which is the principle branch.
This is similar to how $\text{Ln }z$ is the principle branch of $\ln z$ when using complex numbers.

If you would calculate the integral with different branches of the inverse of $\tan x$, you'd also get an extra $k\pi$.
This $k\pi$ corresponds to a series of full periods of $\tan x$.

Both of these are wonderful explanations. Thanks a lot ILS and Ackbach! :)

ZaidAlyafey said:
...You have to have a knowledge of complex analysis in order to work comfortably with complex valued functions.

I guess I should start with it. :p
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K