TITLE: Value of this definite integral $\int_{0}^{\infty} \frac{ \ln(x)}{x^2+2x+4} dx $
QUESTION [9 upvotes]: So I came across this question on brilliant.org and didn't know how to go about it:
$$\int_{0}^{\infty} \frac{ \ln(x)}{x^2+2x+4} dx $$
I tried to complete the squares in the denominator and then use a trigonometric substitution (with tan) but I didn't get anything beyond that. 
How do I do it? Do we need to differentiate under the integral sign here?

REPLY [4 votes]: \begin{align}I=\int_{0}^{\infty} \frac{\ln(x)}{x^2+2x+4} dx\end{align}
Perform the change of variable $x=2t$,
\begin{align}I&=\frac{1}{2}\int_{0}^{\infty} \frac{\ln\left(2t\right)}{t^2+t+1}\,dt\\ 
&=\frac{1}{2}\int_{0}^{\infty} \frac{\ln t}{t^2+t+1}\,dt+\frac{\ln 2}{2}\int_{0}^{\infty} \frac{1}{t^2+t+1}\,dt
\end{align}
The first integral is $0$ (perform the change of variable $y=\dfrac{1}{t}$)
\begin{align}I&=\frac{\ln 2}{2}\int_{0}^{\infty} \frac{1}{t^2+t+1}\,dt\\
&=\frac{\ln 2}{2}\int_{0}^{\infty} \frac{1}{\left(t+\frac{1}{2}\right)^2+\frac{3}{4}}\,dt\\
&=\frac{2\ln 2}{3}\int_{0}^{\infty} \frac{1}{\left(\frac{2t+1}{\sqrt{3}}\right)^2+1}\,dt\\
\end{align}
Perform the change of variable $u=\dfrac{2t+1}{\sqrt{3}}$
\begin{align}I&=\frac{2\ln 2}{3}\times \frac{\sqrt{3}}{2}\int_{\frac{1}{\sqrt{3}}}^{\infty} \frac{1}{1+u^2}\,du\\
&=\frac{\ln 2}{\sqrt{3}}\left(\arctan(\infty)-\arctan\left(\frac{1}{\sqrt{3}}\right)\right)\\
&=\frac{\ln 2}{\sqrt{3}}\left(\frac{\pi}{2}-\frac{\pi}{6}\right)\\
&=\frac{\pi\ln 2}{3\sqrt{3}}
\end{align}