# Problem computing $\int_{-\infty}^\infty \frac{\tan^{-1}(x)}{x}dx$ using contour integral.

I am trying to solve $$\int_{-\infty}^\infty \frac{\tan^{-1}x}{x}\ dx$$ using a contour integral.

My Work:

Define a contour $C$ such that: Now we have $$\int_{C}\frac{\tan^{-1}x}{x}\ dx=\int_{-\infty}^\infty \frac{\tan^{-1}x}{x}\ dx+\int_{\text{Arc}}\frac{\tan^{-1}x}{x}\ dx$$ Now parametizing the integral over the arc: $$\int_{\text{Arc}}\frac{\tan^{-1}x}{x}\ dx=\lim_{R\to \infty}\int_{0}^\pi \frac{\tan^{-1}(Re^{i\theta})}{Re^{i\theta}}iRe^{i\theta}\ d\theta=\lim_{R\to \infty} i\int_{0}^\pi \tan^{-1}(Re^{i\theta})\ d\theta=\frac{i\pi^2}{2}$$ We also note that the entire contour integral does not contain any poles, so it is $0$.

However this is where I run into a problem because that implies:$$\int_{-\infty}^\infty \frac{\tan^{-1}x}{x}\ dx=-\frac{i\pi^2}{2}$$ Which is obviously not true. If anyone can point out why my approach does not work or where I went wrong that would be great. Any help is appreciated.

• Since $\tan^{-1}x = \frac{1}{2i}\log\frac{1+ix}{1-ix}$, it has two branch cuts ending at $x = \pm i$. – achille hui Nov 8 '17 at 22:09
• I see, but I'm not quite familiar with branch cuts. Would that fact be what is causing me to get the wrong answer? – aleden Nov 8 '17 at 22:13
• It should be. In any event, the integral diverges logarithmically because $\frac{\tan^{-1}x}{x} \approx \frac{\pi}{2|x|}$ as $|x| \to \infty$ along the real line. – achille hui Nov 8 '17 at 22:17
• @achillehui I see, thank you I just wanted to know if I was doing anything wrong with my contour integral. – aleden Nov 8 '17 at 22:23
• @achillehui Isn't it technically a single branch cut that connects $i$ with $-i$ through the point at infinity? – Random Variable Nov 8 '17 at 22:28

$$f(z) = \frac{\arctan z}{z} = \frac{1}{2iz}\ln\frac{1+iz}{1-iz}$$
has two branch points on $z=\pm i$ and a principal branch cut on $(-i\infty,-i)\cup (i,i\infty)$
Since your contour intersects the branch cut, the function is no loner analytic and the closed-loop integral does not equal $0$
• It's one representation, yes. Branch cuts are needed because many complex functions (like $\arg z$ or $\log z$) tend to be multi-valued, so in order to make them one-to-one, you'll have to define a "cut" on the complex plane to separate one "branch" from another. A real-function analogy would be something like $\arcsin x$, which only is defined only for outputs in $[-\pi/2, \pi/2]$ and "cuts off" everything else – Dylan Nov 10 '17 at 3:28