1. ## definite integral, evaluation

2. If you know the result of this famous integral :

$\displaystyle \int_0^{\frac{\pi}{2} } \ln[\sin(x)]~dx = -\frac{\pi}{2}\ln{2}$

what to do with your problem is changing$\displaystyle 1 + \cos(x)$ to $\displaystyle 2 \cos^2(\frac{x}{2})$ , and remind that

$\displaystyle \int_0^{\pi } \ln[\cos(\frac{x}{2})] ~dx = 2 \int_0^{\frac{\pi}{2} } \ln[\cos(x)]~dx = 2 \int_0^{\frac{\pi}{2} } \ln[\sin(x)]~dx = -\pi \ln{2}$

Or another way :

Consider

$\displaystyle \int_0^{\pi} = \int_0^{\frac{\pi}{2}} + \int_{\frac{\pi}{2}}^{\pi}$

$\displaystyle \int_0^{\pi} \ln[ 1 + \cos(x) ] ~dx = \int_0^{\frac{\pi}{2}} \ln[ 1 + \cos(x) ] ~dx + \int_{\frac{\pi}{2}}^{\pi} \ln[ 1 + \cos(x) ] ~dx$

for the second integral , sub . $\displaystyle t = \pi - x$ we obtain

$\displaystyle \int_0^{\frac{\pi}{2}} \left( \ln[ 1 + \cos(x) ] + \ln[ 1 - \cos(x) ] \right ) ~dx$

$\displaystyle = 2 \int_0^{\frac{\pi}{2}} \ln[\sin(x)]~dx = -\pi\ln{2}$

Edited :

I just find another solution by means of magic differentiation :

Let

$\displaystyle I(a) = \int_L \ln[ 1 + a \cos(x) ] ~dx$

for brevity , I replace $\displaystyle \int_0^{\frac{\pi}{2}}$ with $\displaystyle \int_L$

Take differentiation ,

$\displaystyle I'(a) = \int_L \frac{ \cos(x) }{1 + a \cos(x) } ~dx$

$\displaystyle I'(a) = \int_L [ \frac{1}{a} - \frac{1}{a} \cdot \frac{1}{1 + a \cos(x)}] ~dx$

$\displaystyle = \frac{\pi}{a} - \frac{\pi}{a} \cdot \frac{1}{\sqrt{1 - a^2}}$

Therefore ,

$\displaystyle I(a) = \pi \left ( \ln(a) - \int \frac{1}{a\sqrt{1 - a^2 }} ~da \right )$

Sub. $\displaystyle a = 1/t$

$\displaystyle I(a) = \pi \left ( \ln(a) - \ln( a + \sqrt{1 - a^2} ) + \ln(a)\right ) + K$

$\displaystyle = \pi \ln(a + \sqrt{1-a^2})+K$

we know $\displaystyle I = I(1) - I(0)$ so

$\displaystyle I = -\pi\ln{2}$

3. here's a completely different approach:

$\displaystyle \int_{0}^{\pi }{\ln (1+\cos x)\,dx}=\int_{0}^{\pi }{\int_{0}^{1}{\frac{\cos x}{1+t\cos x}\,dt}\,dx},$ reverse integration order and after some straightforward computations we get $\displaystyle \pi \int_{0}^{1}{\frac{\sqrt{1-t^{2}}-1}{t\sqrt{1-t^{2}}}\,dt}.$

substitution $\displaystyle u=\ln\big(1+\sqrt{1-t^2}\big)$ solves the integral achieving the value $\displaystyle -\ln2,$ thus the original integral equals $\displaystyle -\pi\ln2,$ as shown above.