<s>[INST] 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)$$
 [/INST] 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}
$$
</s>