I first encountered this integral
$$ I=\int_{0}^{\pi} \ln (\sin x+2) d x $$
several months ago without any idea and had tried many methods such as integration by parts, substitution and Fourier series etc. but all are in vain. Today, I tried the tangent substitution and succeeded. Now I want to share with you and seek any other alternatives.
For simplicity, I convert, by symmetry, the integral into
$$ I=2 \int_{0}^{\frac{\pi}{2}} \ln (\sin 2 x+2) d x $$ and substitute $t=\tan x$, and get $$ \begin{aligned} I &=2 \int_{0}^{\frac{\pi}{2}} \ln (\sin 2 x+2) d x \\ &=2 \int_{0}^{\infty} \ln \left(\frac{2 t}{1+t^{2}}+2\right) \frac{d t}{1+t^{2}} \\ &=2 \int_{0}^{\infty} \frac{\ln 2+\ln \left(t^{2}+t+1\right)-\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\ &=\pi \ln 2+2 \int_{0}^{\infty} \frac{\ln \left(t^{2}+t+1\right)}{1+t^{2}}-2 \int_{0}^{\infty} \frac{\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\ &=\pi \ln 2+2 \underbrace{ \left[\frac{\pi}{3} \ln (2+\sqrt{3})+\frac{4}{3} G\right]}_{(*)} -2 \underbrace{\pi \ln 2}_{(**)} \\ &=-\pi \ln 2+\frac{2 \pi}{3} \ln (2+\sqrt{3})+\frac{8}{3} G \end{aligned} $$ Note: (*): post 1, (**):post 2
For the second integral, we use the similar technique and arrive at
\begin{aligned} J&=2 \int_{0}^{\infty} \frac{\ln 2+\ln \left(1-t+t^{2}\right)-\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\ &=2 \int_{0}^{\infty} \frac{\ln 2}{1+t^{2}} d t+2 \int_{0}^{\infty} \frac{\ln \left(1-t+t^{2}\right)}{1+t^{2}} d t-2 \int \frac{\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\ &=\pi \ln 2+2 \underbrace{\left(\frac{2 \pi}{3} \ln (2+\sqrt{3})-\frac{4}{3} G\right)}_{(***)}-2 \pi \ln 2 \\ &=-\pi \ln 2+\frac{4 \pi}{3} \ln (2+\sqrt{3})-\frac{8}{3} G \end{aligned}
Note:(***) post 3
Eager to know whether there are any alternatives!
Comments and alternative solutions are highly appreciated.