<s>[INST] Find the value of the integral $\int_0^{2\pi}\ln|a+b\sin x|dx$ where $0\lt a\lt b$ Find the value of the integral $$\int_0^{2\pi}\ln|a+b\sin x|dx$$ where $0\lt a\lt b$. What is the use of this inequality. I tried to integrate the integral by parts, but the integral of the 2nd term was quite messy.Please help. 
 [/INST] This is just for $0<b < a $
\begin{align*}
I &= \int_0^{2\pi}\log(a+\sqrt{a^2 - b^2}+be^{i\theta})d\theta +  \int_0^{2\pi}\log(a+\sqrt{a^2 - b^2}+be^{-i\theta})d\theta\\ 
 &= \int_0^{2\pi} \log \left(2a^2 +2a\sqrt{a^2 - b^2} + (a + \sqrt {a^2 - b^2}) b (e^{i\theta} + e^{-i\theta}) \right )d\theta\\ 
 &= \int_0^{2\pi} \log (2 (a + \sqrt{a^2 - b^2}))d\theta + \int_0^{2\pi }\log(a + b \cos\theta)d\theta\\
\end{align*}
By Gauss MVT, the value of top two integral is 
$$4\pi\log(a + \sqrt{a^2 -b^2})$$
Hence the for $0<b<a$ is 
$$\int_0^{2\pi} \log(a+ b\cos\theta)d\theta = 2 \pi \log \left(a + \sqrt{a^2 - b^2}\over 2\right)$$
EDIT:: The integral for $\log (a + b \sin \theta )$ is equal to that of $\log (a + b \cos \theta )$ as $\theta$ goes around $2 \pi$. It can also be done by changing $be^{-i\theta}$ to $-b e^{-i\theta}$ is above derivation.
For $0<a < b$, the integral is equal to real part of the above solution as mentioned by @Lucian in comments.
</s>