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.
$$I(a)=\int_{0}^{\pi} \log (a\sin (x)+2)\, dx$$ $$I'(a)=\int_{0}^{\pi} \frac{\sin (x)}{a \sin (x)+2}\, dx=\frac \pi a-\frac{2 \pi }{a \sqrt{4-a^2}}+\frac{4 \tan ^{-1}\left(\frac{a}{\sqrt{4-a^2}}\right)}{a \sqrt{4-a^2}}$$ $$\int_0^1 \Bigg[\frac \pi a-\frac{2 \pi }{a \sqrt{4-a^2}}\Bigg]\,da=\pi \log \left(\frac{2+\sqrt{3}}{4} \right)$$ $$\frac{4 \tan ^{-1}\left(\frac{a}{\sqrt{4-a^2}}\right)}{a \sqrt{4-a^2}}=\sum_{n=0}^\infty \frac{(n!)^2}{(2 n+1)!} a^{2n}$$ $$\int_0^1 \frac{4 \tan ^{-1}\left(\frac{a}{\sqrt{4-a^2}}\right)}{a \sqrt{4-a^2}}\, da=\sum_{n=0}^\infty \frac{(n!)^2}{(2 n+1) (2 n+1)!}=\frac{1}{3} \left(8 C-\pi \log \left(2+\sqrt{3}\right)\right)$$
Edit
Trying to generalize
$$I(a,b)=\int_{0}^{\pi} \log (a\sin (x)+b)\, dx$$ $$I'(a,b)=\int_{0}^{\pi} \frac{\sin (x)}{a \sin (x)+b}\, dx=\frac{\pi }{a}-\frac{\pi b}{a \sqrt{b^2-a^2}}+\frac{2 b}{a \sqrt{b^2-a^2}}\tan ^{-1}\left(\frac{a}{\sqrt{b^2-a^2}}\right)$$ $$\int_0^1 \Bigg[\frac{\pi }{a}-\frac{\pi b}{a \sqrt{b^2-a^2}}\Bigg]\,da=\pi \log \left(\frac{b+\sqrt{b^2-1}}{2 b}\right)$$
Using series expansion again
$$\int_0^1\frac{2 b}{a \sqrt{b^2-a^2}}\tan ^{-1}\left(\frac{a}{\sqrt{b^2-a^2}}\right)\,da=\sum_{n=0}^\infty \frac {\alpha_n}{\beta_n}\, b^{-(2n+1)}$$ the $\alpha_n$ and $\beta_n$ corresponding respectively to sequences $A101926$ and $A321234$ in $OEIS$.