TITLE: Prove that $\int_{0}^{2\pi}\ln \left(\frac{(1+\sin x)^{1+\cos x}}{1+\cos x}\right)dx = 0$
QUESTION [8 upvotes]: Prove that
$$
I=\int_{0}^{2\pi}\ln \left(\frac{(1+\sin x)^{1+\cos x}}{1+\cos x}\right)\;dx = 0
$$

My Attempt:
$$
\begin{align}
I &= \int_{0}^{2\pi}\ln(1+\sin x)^{1+\cos x}\;dx-\int_{0}^{2\pi}\ln(1+\cos x)\;dx\\
&=\int_{0}^{2\pi}(1+\cos x)\cdot \ln(1+\sin x)\;dx-\int_{0}^{2\pi}\ln(1+\cos x)\;dx\\
&= \int_{0}^{2\pi}(1+\cos x)\cdot \ln(1+\sin x)\;dx - 2\int_{0}^{\pi}\ln(1+\cos x)\;dx
\end{align}
$$
How can I complete the solution from this point?

REPLY [5 votes]: Let's make use of the general fact that, when integrating over an entire period, the sine and cosine functions are interchangeable, as are their signs, i.e., for any function of two variables, we have
$$\int_0^{2\pi}f(\cos\theta,\sin\theta)d\theta = \int_0^{2\pi}f(\sin\theta,\cos\theta)d\theta$$
and
$$\int_0^{2\pi}f(\cos\theta,\sin\theta)d\theta = \int_0^{2\pi}f(-\cos\theta,\sin\theta)d\theta=\int_0^{2\pi}f(\cos\theta,-\sin\theta)d\theta$$
Thus
$$I=\int_0^{2\pi}\log\left({(1+\sin\theta)^{1+\cos\theta}\over1+\cos\theta} \right)d\theta$$
implies
$$\begin{align}
2I&=\int_0^{2\pi}\left[\log\left({(1+\sin\theta)^{1+\cos\theta}\over1+\cos\theta} \right)+\log\left({(1+\sin\theta)^{1-\cos\theta}\over1-\cos\theta} \right)\right]d\theta\\
&=\int_0^{2\pi}\log\left({(1+\sin\theta)^2\over(1+\cos\theta)(1-\cos\theta)} \right)d\theta\\
&=2\int_0^{2\pi}\log(1+\sin\theta)d\theta-\int_0^{2\pi}\log(1+\cos\theta)d\theta-\int_0^{2\pi}\log(1-\cos\theta)d\theta\\
&=2\int_0^{2\pi}\log(1+\cos\theta)d\theta-\int_0^{2\pi}\log(1+\cos\theta)d\theta-\int_0^{2\pi}\log(1+\cos\theta)d\theta\\
&=0
\end{align}$$