<s>[INST] Integral $\int^{\frac{\pi}{2}}_{-\frac{\pi}{2}} \ln(1+c\sin x) dx$, where $0I am trying to evaluate the following integral:
$$\int^{\frac{\pi}{2}}_{-\frac{\pi}{2}} \ln(1+c\sin x) dx,$$
where $0<c<1$.
I can't really think of a way to find it so please give me a hint.
 [/INST] Express the integrand as a series:
$$\begin{align}I(c) &= \int_{-\pi/2}^{\pi/2} dx \, \log{(1+c \sin{x})} \\ &= \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k} c^k \int_{-\pi/2}^{\pi/2} dx \, \sin^k{x} \\ &= - \frac{\pi}{2}\sum_{k=1}^{\infty} \frac{c^{2 k}}{k} \frac1{2^{2 k}} \binom{2 k}{k}   \end{align} $$
$$I'(c) = -\pi \sum_{k=1}^{\infty} \frac1{2^{2 k}} \binom{2 k}{k} c^{2 k-1} = -\frac{\pi}{c} \sum_{k=1}^{\infty} \frac1{2^{2 k}} \binom{2 k}{k} c^{2 k}= -\frac{\pi}{c} \left (\frac1{\sqrt{1-c^2}}-1\right )$$
$$\implies I(c) = -\pi \int dc \frac{1}{c} \left (\frac1{\sqrt{1-c^2}}-1\right ) = \pi \int dt \, (\sec{t}-\tan{t}) = \pi \log{(1+\sin{t})} + K$$
or
$$I(c) = K +\pi \log{\left ( 1+\sqrt{1-c^2} \right )} $$
$$I(0) = 0 \implies K=-\pi \log{2}$$
Therefore
$$I(c) = \pi \log{\left ( \frac{1+\sqrt{1-c^2}}{2}\right )} $$
</s>