<s>[INST] How to evaluate $\int_{0}^{\infty} \frac{\ln \left(a x^{2}+c\right)}{1+x^{2}} d x$ for positive constants $a$ and $c$? First of all, we deal with the simple case.
$$
\begin{aligned}
 \int_{0}^{\infty} \frac{\ln \left(ax^{2}+1\right)}{1+x^{2}} d x \stackrel{x=\tan \theta}{=}  & \int_{0}^{\frac{\pi}{2}} \ln \left(1+a \tan ^{2} \theta\right) d \theta \\
=& \int_{0}^{\frac{\pi}{2}} \ln \left(\frac{\cos ^{2} \theta+a \sin ^{2} \theta}{\cos ^{2} \theta}\right) d \theta \\
=& \int_{0}^{\frac{\pi}{2}} \ln \left(\cos ^{2} \theta+a \sin ^{2} \theta\right) d \theta-2 \int_{0}^{\frac{\pi}{2}} \ln (\cos \theta) d \theta \\
\end{aligned}
$$
Using the result in my post and $2 \int_{0}^{\frac{\pi}{2}} \ln (\cos \theta) d \theta =-\pi \ln 2$ yields
$$
\begin{aligned}
\int_{0}^{\infty} \frac{\ln \left(1+ax^{2}\right)}{1+x^{2}} d x &=\pi \ln \left(\frac{1+\sqrt{a}}{2}\right)+\pi \ln 2 =\pi \ln (1+\sqrt{a})
\end{aligned} \tag*{(*)}
$$
\begin{aligned}
& \int_{0}^{\infty} \frac{\ln \left(a x^{2}+c\right)}{1+x^{2}}d x \\
=& \int_{0}^{\infty} \frac{\left.\ln \left[c(\frac{a}{c} x^{2}+1\right)\right]}{1+x^{2}} d x \\
=& \int_{0}^{\infty} \frac{\ln c}{1+x^{2}} d x+\int_{0}^{\infty} \frac{\ln \left(\frac{a}{c} x^{2}+1\right)}{1+x^{2}}
\end{aligned}
Replacing $a$ by $\frac{a}{c}$ in $(*)$ yields
$$ \boxed{\int_{0}^{\infty} \frac{\ln \left(a x^{2}+c\right)}{1+x^{2}}d x =\pi \ln (\sqrt{a}+\sqrt{c})}$$
My question: Can we go further to evaluate a more general integral
$$\int_{0}^{\infty} \frac{\ln \left(ax^{2}+bx+1\right)}{1+x^{2}} d x?$$
 [/INST] As suggested by @Ali Shadhar, we can use Feynman's technique to evaluate the integral.
$$I(b)=\int_0^\infty\frac{\ln(ax^2+bx+1)}{x^2+1}\,dx$$
For now, fix $a\gt0$ and $b\ge0$. We will make further assumptions, if required, throughout the solution.
Differentiating w.r.t. $b$,
$$\begin{align}I'(b)&=\int_0^\infty\frac x{(x^2+1)(ax^2+bx+1)}\,\mathrm dx\\&=\frac1{(a-1)^2+b^2}\int_0^\infty\frac{(1-a)x+b}{x^2+1}-\frac{a(1-a)x+b}{ax^2+bx+1}\,\mathrm dx\\&=\frac{(1-a)}{(a-1)^2+b^2}\underbrace{\int_0^\infty\frac x{x^2+1}-\frac{2ax+b}{2(ax^2+bx+1)}\,\mathrm dx}_{=-\ln(a)/2}+\frac b{(a-1)^2+b^2}\int_0^\infty\frac1{x^2+1}-\frac{1+a}{2(ax^2+bx+1)}\,\mathrm dx\end{align}$$
First integral follows directly using the antiderivative.
For absolute convergence of the second integral, we make the assumption that the denominators have no real roots. Thus $b^2\lt4a$.
Now taking the antiderivative, it follows that
$$I'(b)=\frac{(a-1)\ln a}{2((a-1)^2+b^2)}+\frac{\pi b}{2((a-1)^2+b^2)}-\frac{b(1+a)}{\sqrt{4a-b^2}((a-1)^2+b^2)}\arccos\frac b{2\sqrt a}$$
Integrating from $0$ to $b$,
$$I(b)=I(0)+\frac{\ln a}2\arctan\frac b{a-1}+\frac\pi4\ln\Big(\frac{b^2+(a-1)^2}{(a-1)^2}\Big)-\int_0^b\frac{x(1+a)}{\sqrt{4a-x^2}(x^2+(a-1)^2)}\arccos\frac x{2\sqrt a}\,\mathrm dx$$
$I(0)$ follows from the OP. I'm not quite sure how to evaluate the last integral. Some help regarding that would be appreciated. Note that the integrals are problematic if we directly put $a=1$. In that case, we will need to first take limits and then do the final integrals.
Comment if any errors and I'll fix them.
</s>