<s>[INST] How to solve this integral: $\int_0^\infty{\frac{ln x}{x^2+2x+4}}\cdot dx$ I have been trying to solve this integral:- $$\int_0^\infty{\frac{\ln x}{x^2+2x+4}}\cdot dx$$ But I have been unsuccessful so far. I have tried integration by parts ( taking $1/(x^2+2x+4)$ as the second function does not work because it ends of as tan-inverse function which is more compicated to integrate.)
taking $\ln x$ as the second function was interesting, I ended up in this dead end:-
$$\begin{align} I&=\int_0^\infty{\frac{\ln x}{x^2+2x+4}}\cdot dx \\ &= \left[ {\frac{x\ln x -x}{x^2+2x+4}}\right]_0^\infty + \int_0^\infty \frac{2(x+1)(x\ln x-x)}{(x^2+2x+4)^2}\cdot dx \\&= 2\int_0^\infty \frac{(x^2+2x+4-(x+4))(\ln x-1)}{(x^2+2x+4)^2}\cdot dx \\ &= 2\int_0^\infty\frac{\ln x}{x^2+2x+4}\cdot dx - 2\int_0^\infty\frac{1}{x^2+2x+4}\cdot dx -2\int_0^\infty \frac{(x+4)(\ln x-1)}{(x^2+2x+4)^2}\cdot dx \\&= 2I - \left[\frac{1}{\sqrt{3}} \tan^{-1}{\frac{x+1}{\sqrt{3}}} \right]_0^\infty - 2\int_0^\infty \frac{(x+4)(\ln x-1)}{(x^2+2x+4)^2}\cdot dx \end{align}$$
the function in the second step limits to $0$ so I didn't mention it in the third step. Now I have quartic polynomial at the bottom and don't know how to proceed. I have also tried trigonometric substitution ($ x=\tan\theta$)
If possible please try to end this process, I am a high school student so please keep that in mind if you show another method :)
 [/INST] $$I=\int_{0}^{\infty} \frac{\ln x}{x^2+2x+4} dx$$
Take $x=az$, then,
$$I=\int_{0}^{\infty} \frac{a( \ln a + \ln z)dz}{a^2z^2+2az+4}.$$
Choose $a=2$, then,
$$I=\frac{a}{4}\int_{0}^{\infty}\frac{\ln 2~ dz}{z^2+z+1}+\frac{a}{4}\int_{0}^{\infty} \frac{\ln z~ dz}{z^2+z+1}=I_1+I_2$$
Put $z=1/t$ and $a=2$ in $I_1$, to get $I_2=-I_2 \implies I_2=0$.
Noew you can take it from here as $I_1$ is standard.
</s>