As the title says, how do I evaluate

$$\int_{-2}^{-1} \frac{\arctan(1-x)}{x}\mathrm dx$$

I tried u-sub, integration by parts and Feynman's trick, but they just not get me anywhere. This is a 12th grade olympiad practice problem and because of the fact that the integral is not elementary. I assume there should be some "smart trick" that I can't think of.

Also, after integration by parts - by integrating $\frac{1}{x}$ and differentiating $\arctan(1-x)$ - it looks pretty similar to Serret’s integral. The value of the integral looks similar to the value of Serret’s integral too, so I wonder if there something to do with Serret’s integral.

  • $\begingroup$ Maple evaluates this in terms of dilogarithms of complex numbers. $\endgroup$
    – GEdgar
    Feb 8 at 2:02
  • 2
    $\begingroup$ @GEdgar Wolfram Alpha returns $-\frac{3}{8} \pi \ln{2}$ $\endgroup$
    – dgeyfman
    Feb 8 at 2:10
  • 1
    $\begingroup$ Note that the integral can be further generalized as mentioned in the linked duplicate: $$\int_1^{1+a^2} \frac{\arctan(a+x)}{x}dx=\frac12 \left(\pi-\arctan\left(\frac{1}{a}\right)\right)\ln(1+a^2)$$ $\endgroup$
    – Zacky
    Feb 8 at 12:18

2 Answers 2


Let $\mathcal{I}$ be the integral of interest. Using the substitution $\displaystyle x = \frac{2}{u}$, we get

$$ \begin{align} \mathcal{I}&= \int_{-2}^{-1}\frac{\arctan\left(1-x\right)}{x}dx \\ &\overset{x\,=\,2/u}= \int_{-2}^{-1}\frac{\arctan\left(1-\frac{2}{u}\right)}{u}du\,. \\ \end{align} $$

Then using the fact that $\arctan\left(1-x\right)+\arctan\left(1-\frac{2}{x}\right) = \frac{3\pi}{4}$ for negative $x$, we get

$$ \begin{align} \mathcal{I}+\mathcal{I} &= \int_{-2}^{-1}\frac{\arctan\left(1-x\right)}{x}dx + \int_{-2}^{-1}\frac{\arctan\left(1-\frac{2}{u}\right)}{u}du \\ 2\mathcal{I} &= \int_{-2}^{-1}\frac{\arctan\left(1-x\right)+\arctan\left(1-\frac{2}{x}\right)}{x}dx \\ &= \int_{-2}^{-1}\frac{\frac{3\pi}{4}}{x}dx \\ &= -\frac{3\pi}{4}\ln2\,. \end{align} $$


$$ \bbox[15px,#FFFAFD,border:6px groove#60007C]{\int_{-2}^{-1}\frac{\arctan\left(1-x\right)}{x}dx = -\frac{3\pi}{8}\ln2} $$

and we're done! :)

  • 3
    $\begingroup$ the purple box at the end looks really nice lmao $\endgroup$
    – Max0815
    Feb 8 at 6:57
  • 1
    $\begingroup$ Very nice solution!+1) $\endgroup$
    – xpaul
    Feb 8 at 16:56

It is actually related, yes!

First, do Integration by parts to get

$$\int_{-2}^{-1}\frac{\arctan(1-x)}{x}dx = \left.\arctan(1-x) \ln(-x) \right|_{-2}^{-1} + \int_{-2}^{-1}\frac{1}{1+(1-x)^2}\ln(-x)dx,$$

Then you do substitution $u=\arctan(1-x)-\arctan(2)$. Remember that $\tan(a+b)=\frac{\tan(a)+\tan(b)}{1-\tan(a) \tan(b)}$ which means,

$$-x = \tan(u+\arctan(2))-1=\frac{\tan(u) + 2}{1-2 \tan(u)}-1 = \frac{1+3\tan(u)}{1-2\tan(u)}.$$

Let us then calculate the integral

$$I = \int_{-2}^{-1}\frac{1}{1+(1-x)^2}\ln(-x)dx = \int_0^{\arctan(3)-\arctan(2)}\ln\left(\frac{1+3\tan(u)}{1-2\tan(u)}\right)du.$$

Using the identity $\int_0^a f(x) dx = \int_0^a f(a-x) dx$, and noting that $\tan(\arctan(3)-\arctan(2)) = \frac{3-2}{1+3\cdot 2} = \frac{1}{7}$, writing $\alpha = \arctan(3)-\arctan(2)$, $\tan(\alpha)=1/7$,

$$\int_0^\alpha \ln\left(\frac{1+3\tan(u)}{1-2\tan(u)}\right)du = \int_0^\alpha \ln\left(\frac{1+3\tan(\alpha-u)}{1-2\tan(\alpha-u)}\right)du = \int_0^\alpha \ln\left(\frac{1+3\frac{\frac{1}{7}-\tan(u)}{1+\frac{\tan(u)}{7}}}{1-2\frac{\frac{1}{7}-\tan(u)}{1+\frac{\tan(u)}{7}}}\right)du = \int_0^\alpha \ln\left(\frac{10-20\tan(u)}{5+15 \tan(u)}\right)du. $$

We notice that

$$2I = I + I = \int_0^\alpha \ln\left(\frac{1+3\tan(u)}{1-2\tan(u)}\right)du + \int_0^\alpha \ln\left(\frac{10-20\tan(u)}{5+15 \tan(u)}\right)du = \int_0^\alpha \ln\left(\frac{1+3\tan(u)}{1-2\tan(u)}\cdot \frac{10-20\tan(u)}{5+15 \tan(u)}\right)du = \int_0^\alpha \ln\left(\frac{10}{5}\right)du = \alpha \ln(2).$$

The result for the initial integral is

$$\int_{-2}^{-1}\frac{\arctan(1-x)}{x}dx = - \arctan(3) \ln(2) + \frac{\alpha}{2} \ln(2) = -\frac{\arctan(3)+\arctan(2)}{2} \ln(2).$$


Not the answer you're looking for? Browse other questions tagged .