How do I evaluate this : $\int_{0}^{\infty} \ln \left( 1 + \frac{a^{2}}{x^{2}}\right)\ dx $ for $a > 0$? How do I evaluate this integral if I suppose that $a > 0$  
$$\int_{0}^{\infty} \ln \left( 1 + \frac{a^{2}}{x^{2}}\right)\ \mathrm{d}x .$$
For $a=2$ I got $2\pi$ I think the result will be $a\pi$.
 A: $$\int_{0}^{+\infty}\log\left(1+\frac{a^2}{x^2}\right)\,dx = a\int_{0}^{+\infty}\log\left(1+\frac{1}{x^2}\right)\,dx $$
then by setting $x=\tan\theta$ we have:
$$ \int_{0}^{+\infty}\log\left(1+\frac{1}{x^2}\right)\,dx = -2\int_{0}^{\pi/2}\frac{\log\sin\theta}{\cos^2\theta}\,d\theta=2\int_{0}^{\pi/2}\cot(\theta)\tan(\theta)\,d\theta=\color{red}{\pi},$$
where the last step follows from integration by parts.
A: According to an answer by rae306 on Art of Problem Solving:

Using integration by parts:
  $$\int_0^\infty \ln\left(1+\frac{a^2}{x^2}\right)\,dx\,\,\begin{bmatrix}u=\ln\left(1+\frac{a^2}{x^2}\right)& du=\frac{\frac{-2a^2}{x}}{x^2+a^2}\,dx \\ dv=dx& v=x\end{bmatrix}\\=\underbrace{\left.x\cdot \ln\left(1+\frac{a^2}{x^2}\right)\right|_0^{\infty}}_{L}+\underbrace{\int_0^{\infty}\frac{2a^2}{x^2+a^2}\,dx}_{I}$$
  $$I=\int_0^{\infty}\frac{2a^2}{x^2+a^2}\,dx=\left.2a^2\cdot\frac{1}{a}\arctan\left(\frac{x}{a}\right)\right\vert_0^\infty=2a\cdot\frac{\pi}{2}=\pi a$$
  We now have to show that $L=0$:
  $$\lim_{x\to\infty}x\cdot\ln\left(1+\frac{a^2}{x^2}\right)=\lim_{x\to\infty}x\left(\frac{a^2}{x^2}-\frac{\left(\frac{a^2}{x^2}\right)^2}{2}+\frac{\left(\frac{a^2}{x^2}\right)^3}{3}-\frac{\left(\frac{a^2}{x^2}\right)^4}{4}+\ldots\right)\\=\lim_{x\to\infty}\frac{a^2}{x}-\frac{a^4}{2x^3}+\frac{a^6}{3x^5}-\frac{a^8}{4x^7}+\ldots=0$$ by using the series expansion.
  $$\lim_{x\to0}x\cdot\ln\left(1+\frac{a^2}{x^2}\right)=\lim_{x\to 0} \frac{\ln\left(1+\frac{a^2}{x^2}\right)}{\frac{1}{x}}=\lim_{x\to 0}\frac{\frac{\frac{2a^2}{x}}{x^2+a^2}}{\frac{1}{x^2}}=\lim_{x\to0}\frac{2a^2 x}{x^2+a^2}=0$$ using L'Hôpital's Rule.
  Therefore $$\int_0^\infty \ln\left(1+\frac{a^2}{x^2}\right)\,dx= a\pi$$
  $\square$

A: Let $I(a)$ be the integral
$$I(a)\equiv \int_0^{\infty}\log\left(1+\frac{a^2}{x^2}\right)dx$$
Taking a derivative with respect to $a$ reveals that
$$\begin{align}
I'(a)&=\frac{d}{da}\int_0^{\infty}\log\left(1+\frac{a^2}{x^2}\right)dx\\\\
&=2a\int_0^{\infty}\frac{dx}{x^2+a^2}\\\\
&=\pi
\end{align}$$
Integrating shows that $I(a)=\pi a +C$.  Now, inasmuch as $I(0)=0$, $C=0$ and we find 
$$\bbox[5px,border:2px solid #C0A000]{\int_0^{\infty}\log\left(1+\frac{a^2}{x^2}\right)dx=\pi a}$$
