Complex Integral : How can I evaluate $\int_{C_R} f(z) dz$? I have to calculate $I$ ,using complex integral.
\begin{equation}
I:=\displaystyle\int_{-\infty}^{\infty} \dfrac{\text{log}{\sqrt{x^2+a^2}}}{1+x^2}.(a>0)
\end{equation}
Let $f(z)=\dfrac{\text{log}(z+ia)}{1+z^2}$.
$
C_R : z=Re^{i\theta}, \theta : 0 \to \pi.$
$C_1 : z=t, t : -R \to R.$
From Residue Theorem,
\begin{equation}
\displaystyle\int_{C_1} f(z) dz + \displaystyle\int_{C_R} f(z) dz = 2\pi i \text{Res}(f, i).
\end{equation}
If $R \to \infty$, $\displaystyle\int_{C_1} f(z) dz  \to \displaystyle\int_{-\infty}^{\infty} f(x) dx. $
And my mathematics book says that if $R \to \infty$, $\displaystyle\int_{C_R} f(z) dz \to 0.$ I cannot understand why this holds.
My attempt is following :
\begin{align}
\Bigg|\displaystyle\int_{C_R} f(z) dz \Bigg|
&=\Bigg|\displaystyle\int_0^{\pi} f(Re^{i\theta}) i Re^{i\theta} d\theta \Bigg| \\
&\leqq \displaystyle\int_0^{\pi} \Bigg| R \dfrac{\text{log} (Re^{i\theta} + ia)}{1+R^2e^{2i\theta}} \Bigg| d\theta \\
&\leqq \displaystyle\int_0^{\pi} \dfrac{R}{R^2-1} \Bigg| \text{log} (Re^{i\theta}+ia) \Bigg| d\theta \\
&= \displaystyle\int_0^{\pi} \dfrac{R}{R^2-1} \Bigg| \text{log} (R\cos \theta+i(R\sin \theta +a)) \Bigg| d\theta
\end{align}
I expect that
$ \displaystyle\int_0^{\pi} \dfrac{R}{R^2-1} \Bigg| \text{log} (R\cos \theta+i(R\sin \theta +a)) \Bigg| d\theta \to 0$,
but I cannot prove this.
I would like to give me some ideas.

$$I(a):=\int_{-\infty}^{\infty} \frac{\ln\sqrt{x^2+a^2}}{1+x^2}dx=
\int_0^{\infty} \frac{\ln(x^2+a^2)}{1+x^2}dx$$
$$\frac{dI}{da}=\int_0^{\infty} \frac{2a}{(1+x^2)(x^2+a^2)}dx$$
$$\int \frac{2a}{(1+x^2)(x^2+a^2)}dx=\frac{2}{a^2-1}\tan^{-1}(\frac{x}{a})-\frac{2a}{a^2-1}\tan^{-1}(x)$$
$$\frac{dI}{da}=\frac{2}{a^2-1}\frac{\pi}{2}-\frac{2a}{a^2-1}\frac{\pi}{2}$$
After simplification :
$$\frac{dI}{da}=\frac{\pi}{a+1}$$
$$I(a)=\pi\ln(a+1)+C$$
In order to determine $C$ we compute the integral for a particular value of $a$, for example $a=0$ :
$$I(0)=\int_0^{\infty} \frac{\ln(x^2)}{1+x^2}dx$$
Change of variable $\quad x=\frac{1}{t}$ :
$$I(0)=\int_{\infty}^0 \frac{\ln(\frac{1}{t^2})}{1+\frac{1}{t^2}}(-\frac{dt}{t^2})=
-\int_0^{\infty} \frac{-\ln(t^2)}{t^2+1}(-dt)=-\int_0^{\infty} \frac{\ln(t^2)}{t^2+1}dt$$
This implies
$$\int_0^{\infty} \frac{\ln(x^2)}{1+x^2}dx=-\int_0^{\infty} \frac{\ln(t^2)}{1+t^2}dt=0\quad\text{thus}\quad I(0)=0.$$
$$I(0)=\pi\ln(0+1)+C\quad\implies\quad C=0$$
$$\boxed{I(a):=\int_{-\infty}^{\infty} \frac{\ln\sqrt{x^2+a^2}}{1+x^2}dx=\pi\ln(a+1)}$$
