# Integration Query

• Nov 16th 2010, 11:28 AM
TheCoffeeMachine
Integration Query
Say we want to find $\displaystyle \int \frac{1}{x^2+1}\;{dx}$. Normally, we let $\displaystyle x = \tan{t}$, or realise that the integrand is the derivative of $\displaystyle \tan^{-1}{x}$, or do something along similar lines, but suppose we ignore those. Instead, we do the following:

Write $\displaystyle \int\frac{1}{x^2+1}\;{dx} = \int\frac{1}{(x-i)(x+i)}\;{dx}$ and let:

$\displaystyle t = \frac{x-i}{x+i} \Rightarrow \frac{dt}{dx} = \frac{2i}{(x+i)^2} \Rightarrow dx = \frac{(x+i)^2}{2i}\;{dt}$

$\displaystyle \therefore ~ \int\frac{1}{x^2+1}\;{dx} = \int\frac{1}{(x-i)(x+i)}\;{dx} = \int\frac{(x+i)^2}{2i(x+i)(x-i)}\;{dt}$

$\displaystyle = \frac{1}{2i}\int\frac{x+i}{x-i}\;{dt} = \frac{1}{2i}\int\frac{1}{t}\;{dt} = \frac{1}{2i}\ln{t}+k = \frac{1}{2i}\ln\left(\frac{x-i}{x+i} \right)+k$.

More generally, letting $\displaystyle t = \frac{x-ai}{x+ai}$ gives:

$\displaystyle \int\frac{1}{x^2+a^2}\;{dx} = \int\frac{1}{(x-ai)(x+ai)}\;{dx} = \int\frac{(x+ai)^2}{2ai(x+ai)(x-ai)}\;{dt}$

$\displaystyle = \frac{1}{2ai}\int\frac{x+ai}{x-ai}\;{dt} = \frac{1}{2i}\int\frac{1}{t}\;{dt} = \frac{1}{2i}\ln{t}+k = \frac{1}{2ai}\ln\left(\frac{x-ai}{x+ai} \right)+k$.

My Question (1): why are these identities not used and instead the arctangent ones are? I even suspected that I was missing something, but differentiating quickly confirmed that they are indeed correct.

We know that $\displaystyle \int_{0}^{\infty}\frac{1}{x^2+1}\;{dx} = \frac{\pi}{2}$

But using the relation found above gives:

$\displaystyle \int_{0}^{\infty}\frac{1}{x^2+1}\;{dx} = \frac{1}{2i}\int_{-1}^{1}\frac{1}{t}\;{dt}$, which doesn't converge, since the logarithmic function is not defined on $[-1, 1]$.

Question (2): why is this? I probably need to pick up a complex analysis book!
• Nov 16th 2010, 01:14 PM
Opalg
Quote:

Originally Posted by TheCoffeeMachine
My Question (1): why are these identities not used and instead the arctangent ones are?

The obvious answer is that this approach takes a nice simple trigonometric integral and replaces it by something involving complex logarithms, which are difficult beasts to tame.

Quote:

Originally Posted by TheCoffeeMachine
But using the relation found above gives:

$\displaystyle \int_{0}^{\infty}\frac{1}{x^2+1}\;{dx} = \frac{1}{2i}\int_{-1}^{1}\frac{1}{t}\;{dt}$, which doesn't converge, since the logarithmic function is not defined on $[-1, 1]$.

Question (2): why is this? I probably need to pick up a complex analysis book!

A complex analysis book would be a good investment. (Happy)

The reason things look wrong here is that when you make the substitution $t = \frac{x-i}{x+i}$, as x goes from 0 to ∞, t goes from –1 to 1. But it does not go from –1 to 1 along the real axis, it goes (anticlockwise) round the unit circle in the complex plane. The integral of 1/t is log(t), and the values of log(t) at –1 and 1 are $\pi i$ and $2\pi i$. Taking the integral along that contour, you get the result $\displaystyle\frac1{2i}\int_{-1}^1\frac1t\,dt = \frac\pi2$, which is what you would expect from $\displaystyle\int_0^\infty\!\!\!\frac1{x^2+1}\,dx$.
• Nov 16th 2010, 01:52 PM
TheCoffeeMachine
Thank you, Opalg.
Quote:

Originally Posted by Opalg
The obvious answer is that this approach takes a nice simple trigonometric integral and replaces it by something involving complex logarithms, which are difficult beasts to tame.

Well understood!
Quote:

A complex analysis book would be a good investment. (Happy)
Feel free to recommend one, please.
Quote:

The reason things look wrong here is that when you make the substitution $t = \frac{x-i}{x+i}$, as x goes from 0 to ∞, t goes from –1 to 1. But it does not go from –1 to 1 along the real axis, it goes (anticlockwise) round the unit circle in the complex plane. The integral of 1/t is log(t), and the values of log(t) at –1 and 1 are $\pi i$ and $2\pi i$. Taking the integral along that contour, you get the result $\displaystyle\frac1{2i}\int_{-1}^1\frac1t\,dt = \frac\pi2$, which is what you would expect from $\displaystyle\int_0^\infty\!\!\!\frac1{x^2+1}\,dx$.
That's really amazing!