# $\arctan(x) + \arctan(1/x)$ integration

How do I integrate $$\int_{1/b}^{b} \frac {\arctan(x)+ \arctan\left(\frac{1}{x}\right)}{x} dx \text{ ?}$$

• Hint : What is $arctan(1/x)$ in terms of $arccot$ – Mann Jun 14 '15 at 17:38
• Oh thanks, sorry, I see this is too easy, should I delete the question? – Stuart Miller Jun 14 '15 at 17:43
• No, don't delete it. Feel free to write out the answer below and maybe we can use this as a reference for the next time someone asks a version of this integral (which happens every couple of weeks). – Simon S Jun 14 '15 at 17:45
• Noo, do not delete. If you have got the answer, just answer your own question. It will help the community. – Mann Jun 14 '15 at 17:46

Deriving $\arctan$, you'll see that $\arctan x+\arctan\frac1x$ is constant. Passing to the limit for $x\to\pm\infty$ it's easy to see that $\arctan x+\arctan\frac1x=\operatorname{sgn}(x)\frac{\pi}2$. Thus, supposing $b>0$, you'll have $$\int_\frac1b^b\frac{\arctan x+\arctan\frac1x}x\,dx=\frac{\pi}2\int_{\frac1b}^b\frac1x\,dx$$ from this it should be easy, I guess.

• You can see $\arctan(x)+\arctan(1/x)$ is $\frac{\pi}{2}$ (for positive $x$) by drawing a right triangle with legs $1$ and $x$. Then $\arctan(x/1)$ and $\arctan(1/x)$ are the two non-right angles. – alex.jordan Jun 14 '15 at 18:44
• That sum is constant on the interval $(0,\infty)$ and is a different constant on the interval $(-\infty,0)$. There is a gap in the domain at $0$. However, one should not leave the impression that calculus is needed for that. Let $x$ and $1$ be the two legs of a right triangle. Then one of the acute angles is $\arctan x$ and the other is $\arctan(1/x)$, so of course those add up to $\pi/2$. ${}\qquad{}$ – Michael Hardy Jun 14 '15 at 18:49
• I'd thought to write "the derivative is $0$ so the function is constant on the connected components of its domain, which is $]-\infty,0[\cup]0,+\infty[$", but I thought that what I wrote was indeed clear enough. – Joe Jun 14 '15 at 20:16

HINT:

$\arctan(x)+\arctan(1/x)= \pi/2$ for $x>0$

$$\arctan \left( \frac{1}{x} \right)=\mathrm{arccot} \left( {x} \right)$$ so the numerator is $$\frac{\pi}{2}.$$

• See my comment above. – Bernard Jun 14 '15 at 17:57