Integral: $\int^\infty_{-\infty}\frac{\ln(t+1)}{t^2+1}\mathrm{d}t$ How to prove the following:
$$\int^\infty_{-\infty}\frac{\ln(t+1)}{t^2+1}\mathrm{d}t=\frac{\pi}{2}\left(\ln(2)+\frac{\pi}{2} i\right)$$
 A: Deform the contour to pick up the residue at $t=i$, 
$$\begin{eqnarray*}
\int^\infty_{-\infty}\frac{\ln(t+1)}{t^2+1}\mathrm{d}t
&=& 2\pi i\, \mathrm{Res}_{t=i} \frac{\ln(t+1)}{t^2+1} \\
&=& 2\pi i \frac{\ln(1+i)}{2i} \\
&=& \frac{\pi}{2}\left(\ln 2+\frac{\pi}{2} i\right).
\end{eqnarray*}$$
Here we have assumed the cut starting at $t=-1$ is slightly below the original contour.
This appears to be the intended assumption.
(If we instead assume the cut is slightly above the original contour we pick up the residue at $t=-i$ and get the complex conjugate of the quoted result.)
Note that the contribution at infinity vanishes since it goes like  $\ln(R)/R\,(R\to\infty)$.
A: Let's evaluate the real and imaginary parts of the integral separately. Using $\Re(\ln(t+1)) = \ln(|t+1|)$ and $\Im(\ln(t+1)) = \pi [t < -1]$, where $[t<1]$ is the Iverson bracket:
$$ \begin{eqnarray}
  \Re \int_{-\infty}^\infty \frac{\ln(t+1)}{t^2+1} \mathrm{d} t &=& \int_{-\infty}^\infty \frac{\ln(|t+1|)}{t^2+1} \mathrm{d} t = \frac{1}{2} \int_{-\infty}^\infty \frac{\ln((t+1)^2 )}{t^2+1} \mathrm{d} t\\
   \Im \int_{-\infty}^\infty \frac{\ln(t+1)}{t^2+1} \mathrm{d} t &=& \int_{-\infty}^{-1} \frac{\pi}{t^2+1} \mathrm{d} t
\end{eqnarray}
$$
The integral for the imaginary part is easy, since $\int \frac{\mathrm{d} t}{t^2+1} = \arctan(t) + C$:
$$
   \int_{-\infty}^{-1} \frac{1}{t^2+1} \mathrm{d} t = \left.\arctan(t)\right|_{-\infty}^{-1} = \arctan(-1) - \lim_{t\to -\infty} \arctan(t) = -\frac{\pi}{4} - \left(-\frac{\pi}{2}\right) = \frac{\pi}{4}
$$
Now to the real part:
$$
   \int_{-\infty}^\infty \frac{\frac{1}{2} \log((t+1)^2)}{t^2+1} \mathrm{d} t = 
   \int_{-\infty}^\infty \frac{\frac{1}{2} \log(t^2)}{t^2-2t +2} \mathrm{d} t = 
   \int_0^\infty \log(t^2) \frac{1}{2} \left( \frac{1}{(t-1)^2+1}+\frac{1}{(t+1)^2 + 1} \right)  \mathrm{d} t = \int_0^\infty \log(t^2) \frac{t^2+2}{t^4+4} \mathrm{d} t \stackrel{u=t^2}{=} \int_0^\infty \frac{\log(u)}{2} \frac{u+2}{u^2+4} \frac{\mathrm{d} u}{\sqrt{u}} = \frac{1}{2} \left.\frac{\mathrm{d} }{\mathrm{d} s} \int_0^\infty u^{s-1} \frac{u+2}{u^2 + 4} \mathrm{d} u \right|_{s=\frac{1}{2}}
$$
The latter integral is a sum of Mellin-Barnes transforms of $\frac{1}{u^2+4}$:
$$
  \int_0^\infty u^{s-1} \frac{u+2}{u^2 + 4} \mathrm{d} u = 2 \int_0^\infty u^{s-1} \frac{1}{u^2 + 4} \mathrm{d} u + \int_0^\infty u^{s} \frac{1}{u^2 + 4} \mathrm{d} u = 
  \frac{2^{s-2} \pi}{\sin\left(\frac{\pi s}{2}\right)} + \frac{2^{s-2} \pi}{\cos\left(\frac{\pi s}{2}\right)}
$$
Differentiating, and setting $s=\frac{1}{2}$ yields the result:
$$
 \int_{-\infty}^\infty \frac{\frac{1}{2} \log((t+1)^2)}{t^2+1} \mathrm{d} t = \pi \log(2)
$$
Recombining the real and imaginary parts:
$$
   \int_{-\infty}^\infty \frac{\ln(t+1)}{t^2+1} \mathrm{d} t = \pi \log(2) + i \frac{\pi^2}{4}
$$
A: It would be easier if you define
$$I(\alpha)=\int_{-\infty}^\infty\frac{\ln(\alpha t+1)}{t^2+1}dt.$$
Then
\begin{eqnarray*}
I'(\alpha)&=&\int_{-\infty}^\infty\frac{t}{(\alpha t+1)(t^2+1)}dt\\
&=&\frac{1}{\alpha^2+1}\int_{-\infty}^\infty\left(-\frac{1}{t+\frac{1}{\alpha}}+\frac{t}{t^2+1}+\frac{\alpha}{t^2+1}\right)dt\\
&=&\frac{1}{\alpha^2+1}\left(-\ln\frac{t+\frac{1}{\alpha}}{\sqrt{t^2+1}}+\alpha\arctan t\right)\big|_{-\infty}^\infty\\
&=&\frac{1}{\alpha^2+1}\left[\ln(-1)+\alpha\pi\right]\\
&=&\frac{\pi}{\alpha^2+1}(i+\alpha),
\end{eqnarray*}
and hence $I(\alpha)=\pi i\arctan\alpha+\frac{\pi}{2}\ln(\alpha^2+1)+C$. But $I(0)=0$  implies $C=0$. Thus
$$I(1)=\pi i\frac{\pi}{4}+\frac{\pi}{2}\ln 2=\frac{\pi}{2}\left(\ln 2+i\frac{\pi}{2}\right).$$
A: A related problem. Making the change of variables $t=u-1$ yields,
$$  \int^\infty_{-\infty}\frac{\ln(t+1)}{t^2+1}\mathrm{d}t  = \int _{-\infty }^{0 }\!{\frac {\ln  \left( u \right) }{2+{u}^{2}-
2\,u}}{du} + \int _{0 }^{\infty }\!{\frac {\ln  \left( u \right) }{2+{u}^{2}-
2\,u}}{du} $$
The last integral has no problem, since $\ln(u)$ is real. For the other integral, we use the substitution $u=-z$,
$$ \int _{-\infty }^{0 }\!{\frac {\ln  \left( u \right) }{2+{u}^{2}-
2\,u}}{du} = \int _{0}^{\infty }\!{\frac {\ln  \left( z \right)+\ln(-1) }{2+{z}^{2}+2\,z}}dz
 $$
That implies that 
$$ \int _{-\infty }^{\infty }\!{\frac {\ln  \left( u \right) }{2+{u}^{2}-
2\,u}}{du}  =  \int _{0 }^{\infty }\!{\frac {\ln  \left( u \right) }{2+{u}^{2}-
2\,u}}{du} + \int _{0}^{\infty }\!{\frac {\ln  \left( z \right) }{2+{z}^{2}+2\,z}}dz +\int _{0}^{\infty }\!{\frac {\ln(-1) }{2+{z}^{2}+2\,z}}dz$$
$$ = \frac{3\pi\ln(2)}{8} + \frac{\pi\ln(2)}{8}+\ln(-1)\,\frac{\pi}{4} $$
Now using $ \ln(-1)=i\pi $ the result follow 
$$ \frac{\pi \ln(2)}{2} + \frac{i\pi^2}{4} = \frac{\pi}{2}\left(\ln(2)+\frac{\pi}{2} i\right) $$
