TITLE: Evaluating $\int_1^2\frac{\arctan(x+1)}{x}\,dx$
QUESTION [14 upvotes]: Evaluate the following integral
  $$\int_1^2\frac{\arctan(x+1)}{x}\,dx$$
  with $0\leq\arctan(x)<\pi/2$ for $0\leq x<\infty.$

I proceeded the following way
$$\begin{aligned}
&\int_1^2\frac{\arctan(x+1)}{x}\,dx\to {\small{\begin{bmatrix}&u=x+1&\\&du=dx&\end{bmatrix}}}
\to\int_2^3\frac{\arctan(u)}{u-1}\,du=\\
&\ln(2)\arctan(3)-\int_2^3\frac{\ln(u-1)}{u^2+1}\,du\to {\small{\begin{bmatrix}&u=\tan(\theta)&\\&du=\sec^2(\theta)d\theta&\end{bmatrix}}}
\to\\
&\ln(2)\arctan(3)-\int_\alpha^\beta\ln\left(\tan(\theta)-1\right)\,d\theta=\ln(2)\arctan(3)-\int_\alpha^\beta\ln\left(\sin(\theta)-\cos(\theta)\right)\,d\theta+\\
&+\int_\alpha^\beta\ln\left(\cos(\theta)\right)\,d\theta.
\end{aligned}$$
But
$$\int_\alpha^\beta\ln\left(\sin(\theta)-\cos(\theta)\right)\,d\theta\to {\small{\begin{bmatrix}&\theta=s+3\pi/4&\\&d\theta=ds&\end{bmatrix}}}
\to\int_{\alpha-3\pi/4}^{\beta-3\pi/4}\ln\left(\sqrt2\cos(s)\right)\,ds$$
so
$$\begin{aligned}\int_1^2\frac{\arctan(x+1)}{x}\,dx&=\ln(2)\arctan(3)+\ln(\sqrt{2})(\alpha-\beta)\\
&\phantom{aaaaa}-\int_{\alpha-3\pi/4}^{\beta-3\pi/4}\ln\left(\cos(s)\right)\,ds+\int_\alpha^\beta\ln\left(\cos(s)\right)\,ds.
\end{aligned}$$
Here $\alpha=\arctan(2)$ and $\beta=\arctan(3)$.
The problem here is that I am not able to find a way to cancel the last two integrals on the RHS of the latter equality. 

ADDENDUM
Using Mathematica 11.3 I found that the answers is $\frac{3}{8} \pi  \ln(2)\approx0.81659478386385079894.$
In my equality, if we assume the integrals that involve cosines cancel, we have that the result of the integral is
$\frac{1}{2} \ln (2) \left(\arctan(2)-\arctan(3)\right)+\ln (2) \arctan(3)\approx 0.81659478386385079894$.
Which are exactly equal up to $20$ decimal places! How would I go about canceling the integrals involving cosines (if they actually do cancel)?

REPLY [9 votes]: Although I am late to the party, I hope this solution will be helpful.$$I=\int_1^2 \frac{\arctan(\color{blue}{1+x})}{x}dx\overset{x=\frac{2}{t}}=\int_1^2 \frac{\arctan\left(\color{red}{1+\frac{2 }{t}}\right) } {\frac{2} {t}} \frac{2} {t^2} dt=\int_1^2 \frac{\arctan\left(\color{red}{1+\frac{2 }{t}}\right) } {t}dt$$
$$2 I=\int_1^2 \frac{\arctan(\color{blue}{1+t})+\arctan\left(\color{red}{1+\frac{2 }{t}}\right) } {t }dt$$
$$\because \, \arctan(\color{blue}{1+t})+\arctan\left(\color{red}{1+\frac{2 }{t}}\right)=\pi - \arctan(1)=\frac{3 \pi} {4}$$
$$\Rightarrow I=\frac{3 \pi} {8}\int_1^2 \frac{dt} {t} =\frac38 \pi \ln 2$$
His brother might also be of one's interest.
Generalization:
By the same methods we have:
$$\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)$$
Which gives, for example:
$$\int_1^4 \frac{\arctan(\sqrt 3 + x)}{x}dx=\frac{5\pi}{6}\ln 2$$

Just for the beauty of it, here is a way to evaluate the last integral in Yuriy's answer, namely: $$J=\int_0^1 \frac{\color{blue}{\ln(1+x)}}{x^2+4x+5}dx $$
Substituting $\displaystyle{x=\frac{1-t}{1+t}\Rightarrow dx=-\frac{2}{(1+t)^2}dt},\,$ and simplifying we get:
$$J=\int_0^1 \frac{\color{red}{\ln\left(1+\frac{1-t}{1+t}\right)}}{\left(\frac{1-t}{1+t}\right)^2+4\left(\frac{1-t}{1+t}\right)+5}\frac{2}{(1+t)^2}dt=\int_0^1 \frac{\color{red}{\ln\left(\frac{2}{1+t}\right)}}{t^2+4t+5}dt$$
$$2J=\int_0^1 \frac{\color{red}{\ln 2 -\ln(1+x)}+\color{blue}{\ln(1+x)}}{x^2+4x+5}dx\Rightarrow J=\frac{\ln 2}{2}\int_0^1 \frac{dx}{x^2+4x+5}$$
$$J=\frac{\ln 2}{2} \arctan(x+2)\bigg|_0^1 =\frac{\ln2}{2} (\arctan 3 -\arctan 2)=\frac12 \ln 2 \operatorname{arccot}(7)$$
A more general form of this integral is found here.