A very basic question about integration

  • MHB
  • Thread starter Saitama
  • Start date
  • Tags
    Integration
In summary, when evaluating real integrals, it is best to avoid using complex numbers unless integrating in the complex plane. This is because the periodicity of the complex exponential makes the logarithm a multi-valued function, and in order to define it as a differentiable function, an appropriate branch must be chosen. This branch must define an analytic function in the interval of integration. Therefore, it is important to have a knowledge of complex analysis when working with complex-valued functions.
  • #1
Saitama
4,243
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
  • #2
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$
 
  • #3
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:
  • #4
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$
 
  • #5
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.
 
  • #6
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$.
 
  • #7
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. :eek:
 
  • #8
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. :eek:

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$.
 
  • #9
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. :eek:

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
 

FAQ: A very basic question about integration

What is integration?

Integration is a mathematical process of finding the area under a curve. It is used to solve problems related to motion, volume, and many other real-world applications.

How is integration different from differentiation?

Integration and differentiation are two inverse operations in calculus. While differentiation finds the rate of change of a function, integration finds the accumulated change or the area under the curve of the function.

What are the different methods of integration?

The most commonly used methods of integration are substitution, integration by parts, trigonometric substitution, and partial fractions. These methods are used to simplify and solve complex integrals.

What are the applications of integration in science?

Integration is widely used in physics, engineering, and other scientific fields to solve problems involving motion, force, work, and energy. It is also used in economics, biology, and other disciplines to model and analyze real-world phenomena.

Can integration be used to find the volume of irregular shapes?

Yes, integration can be used to find the volume of any irregular shape as long as its boundaries can be defined by a mathematical function. By using integration, we can break down the irregular shape into smaller, simpler shapes and calculate their volumes to find the total volume of the irregular shape.

Similar threads

Back
Top