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)?
My attempt at another way of evaluating the integral:
$$\int_1^2\frac{\arctan(x+1)}{x}\,dx=\int_2^3 \frac{\arctan x}{x-1}dx=\int_2^3 \frac{dx}{x-1} \int_0^1 \frac{xdy}{1+x^2 y^2}=$$
$$ = \int_2^3 \int_0^1 \frac{xdydx}{(x-1)(1+x^2 y^2)}=$$
$$t=\frac{y}{1-y}$$
$$y=\frac{t}{1+t}$$
$$dy=\left(\frac{1}{1+t}-\frac{t}{(1+t)^2} \right) dt=\frac{dt}{(1+t)^2}$$
$$\\ = \int_2^3 \int_0^\infty \frac{xdtdx}{(x-1)((1+t)^2+x^2 t^2)}=\int_2^3 \int_0^\infty \frac{xdtdx}{(x-1)(1+2t+(1+x^2) t^2)}$$
$$1+2t+(1+x^2) t^2=(1+x^2) \left(t^2+\frac{2}{1+x^2} t+\frac{1}{1+x^2} \right)= \\ = (1+x^2) \left(t+\frac{1}{1+x^2}\right)^2 +\frac{x^2}{1+x^2} $$
$$\int_0^\infty \frac{dt}{1+2t+(1+x^2) t^2}=\int_0^\infty \frac{dt}{(1+x^2) \left(t+\frac{1}{1+x^2}\right)^2 +\frac{x^2}{1+x^2}}= \\ =\frac{1+x^2}{x^2} \int_0^\infty \frac{dt}{\frac{(1+x^2)^2}{x^2} \left(t+\frac{1}{1+x^2}\right)^2 +1}=\frac{1}{x} \int_{1/x}^\infty \frac{dz}{z^2 +1}=\frac{1}{x} \left(\frac{\pi}{2}-\arctan \frac{1}{x} \right)$$
$$\int_2^3 \int_0^\infty \frac{xdtdx}{(x-1)(1+2t+(1+x^2) t^2)}=\frac{\pi}{2} \int_2^3 \frac{dx}{x-1}-\int_2^3 \frac{\arctan \frac{1}{x} dx}{x-1}=$$
$$=\frac{\pi}{2} \ln 2-\int_2^3 \frac{\arctan \frac{1}{x} dx}{x-1}$$
For $x>1$ we can use the series expansion:
$$\arctan \frac{1}{x}=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)x^{2n+1}}$$
So we need to evaluate:
$$\int_2^3 \frac{dx}{x^{2n+1}(x-1)}=\int_{1/3}^{1/2} \frac{u^{2n}du}{(1-u)}= \sum_{k=0}^\infty \int_{1/3}^{1/2} u^{2n+k} du=\sum_{k=0}^\infty \frac{1}{2n+k+1} \left(\frac{1}{2^{2n+k+1}}-\frac{1}{3^{2n+k+1}} \right)$$
Kind of complicated, I don't see any simple way to prove:
$$\int_2^3 \frac{\arctan \frac{1}{x} dx}{x-1}=\sum_{k,n=0}^\infty \frac{(-1)^n}{(2n+1)(2n+k+1)}\left(\frac{1}{2^{2n+k+1}}-\frac{1}{3^{2n+k+1}} \right)=\frac{\pi}{8} \ln 2$$
Using integration by parts, we can transform the integral to: $$\arctan \frac{1}{3} \ln 2+\int_2^3 \frac{\ln (x-1)~dx}{1+x^2}$$
The latter integral can be transformed to:
$$\int_0^1 \frac{\ln(1+x) dx}{5+4x+x^2}=\int_0^1 \frac{\ln(1+x) dx}{(x+2+i)(x+2-i)} $$