How do i evaluate the following integral? Hi I was wondering if someone can help me evaluate the following integral.
Show that if $-1 < x < 1$, then
$$\int_{0}^{\pi} \frac{\log{(1+x\cos{y})}}{\cos{y}}dy= \pi \arcsin{x} $$
thank you in advance.

Setting
$$
f(x)=\int_0^\pi\frac{\log(1+x\cos y)}{\cos y}\,dy, \quad x\in (-1,1),
$$
we have $f(0)=0$, and 
$$
f'(x)=\int_0^\pi\frac{\cos y}{(1+x\cos y)\cos y}\,dy=\int_0^\pi\frac{1}{1+x\cos y}\,dy\quad \forall x\in (-1,1)
$$
Setting
$$
t=\tan\frac{y}{2},
$$
we have
$$
y=2\arctan t,\, \frac{1}{1+x\cos y}=\frac{1}{1+x\frac{1-t^2}{1+t^2}}=\frac{1+t^2}{1+x+(1-x)t^2} \,\mbox{ and } \, dy=2\frac{dt}{1+t^2}.
$$
Now, for every $x\in (-1,1)$ we get:
\begin{eqnarray}
f'(x)&=&\int_0^\infty\frac{1+t^2}{1+x+(1-x)t^2}\cdot\frac{2}{1+t^2}\,dt=\frac{2}{1-x}\int_0^\infty\frac{1}{(1+x)(1-x)^{-1}+t^2}\,dt\\
&=&\frac{2}{\sqrt{1-x^2}}\arctan\left(\frac{t}{\sqrt{(1+x)(1-x)^{-1}}}\right)\Big|_0^\infty=\frac{2}{\sqrt{1-x^2}}\cdot\frac\pi2=\frac{\pi}{\sqrt{1-x^2}}.
\end{eqnarray}
Since $f(0)=0$, we deduce that
$$
\int_0^\pi\frac{\log(1+x\cos y)}{\cos y}\,dy=f(x)=f(0)+\int_0^xf'(\xi)\,d\xi=\int_0^x\frac{\pi}{\sqrt{1-\xi^2}}\,d\xi=\pi\arcsin x.
$$
