Evaluating $\int_0^{\pi /2} \frac{ \log (1+\cos a \cos x)}{\cos x} dx$ The question is to evaluate $$\int_0^{\pi /2} \frac{ \log (1+\cos a \cos x)}{\cos x} dx$$
I tried using leibnitz rule
$$F'(a)=\int_0^{\pi /2} \frac{ -\sin a}{(1+\cos a \cos x)}dx$$ Now I used the substitution $\tan(x/2)=t$ to get $$-2 \sin a \int_0^1 \frac{ dt}{1+t^2 +\cos a (1-t^2)} $$ which can be rewritten as 
$$-2\frac{\sin a} {1- \cos a}\int_0^{1} \frac{ dt}{t^2 +\frac{1+ \cos a}{1-\cos a}} $$ which evaluates to $-a$.i am not sure where I went wrong.Any ideas?
 A: Hint: 
Put $b= \sqrt{\frac{1+ \cos a}{1-\cos a} }$
Then, 
$$\int_0^{1} \frac{ dt}{t^2 +\frac{1+ \cos a}{1-\cos a}}  =\int_0^{1} \frac{ dt}{t^2 +b^2} = \frac1b\arctan{\frac{t}{b}}\bigg|_{t=0}^{t=1}= \frac1b\arctan{\frac{1}{b}} $$
Therefore, $$ F'(a) =-2\frac{\sin a} {\sqrt{(1-\cos a)(1+ \cos a)}}  \arctan{\left(\sqrt{\frac{1- \cos a}{1+\cos a} }\right)} \\= -2\frac{\sin a} {|\sin a|}  \arctan{\left(\sqrt{\frac{1- \cos a}{1+\cos a} }\right)}$$
That is  $$ F'(a)= \color{blue}{ -2\frac{\sin a} {|\sin a|}  \arctan{\left(\sqrt{\frac{1- \cos a}{1+\cos a} }\right)}}$$
A: Well, as you did:
$$\mathscr{I}:=\int\frac{1}{1+\text{n}\cdot\cos\left(x\right)}\space\text{d}x\tag1$$
Substitute $\text{u}:=\tan\left(\frac{x}{2}\right)$:
$$\mathscr{I}=\frac{2}{1+\text{n}}\cdot\int\frac{1}{1+\frac{1-\text{n}}{1+\text{n}}\cdot\text{u}^2}\space\text{d}\text{u}\tag2$$
Substitute $\text{s}:=\text{u}\cdot\sqrt{\frac{1-\text{n}}{1+\text{n}}}$:
$$\mathscr{I}=\frac{2}{\sqrt{1-\text{n}}\cdot\sqrt{1+\text{n}}}\cdot\int\frac{1}{1+\text{s}^2}\space\text{d}\text{s}=\frac{2\cdot\arctan\left(\text{s}\right)}{\sqrt{1-\text{n}}\cdot\sqrt{1+\text{n}}}+\text{C}=$$
$$\frac{2\cdot\arctan\left(\tan\left(\frac{x}{2}\right)\cdot\sqrt{\frac{1-\text{n}}{1+\text{n}}}\right)}{\sqrt{1-\text{n}}\cdot\sqrt{1+\text{n}}}+\text{C}\tag3$$
So, for the definite integral:
$$\int_0^\frac{\pi}{2}\frac{1}{1+\text{n}\cdot\cos\left(x\right)}\space\text{d}x=\frac{2\cdot\arctan\left(\sqrt{\frac{2}{\text{n}^2}-1}\right)}{\sqrt{1-\text{n}^2}}\tag4$$
A: Using Feynman’s Technique Integration by differentiating w.r.t. $a$,
$$I(a)=\int_{0}^{\frac{\pi}{2}} \frac{\ln (1+\cos a \cos x)}{\cos x} d x,$$
we obtain $$
I^{\prime}(a)=\int_{0}^{\frac{\pi}{2}} \frac{-\sin a}{1+\cos a \cos x} d x
$$
Letting $t=\tan \dfrac{x}{2}$ yields $$
\begin{aligned}
I^{\prime}(a) &=-2 \sin a \int_{0}^{1} \frac{d t}{(1+\cos a)+(1-\cos a) t^{2}} \\
&=-2 \sin a \int_{0}^{1} \frac{d t}{2 \cos ^{2} \frac{a}{2}+2 t^{2} \sin ^{2} \frac{a}{2}} \\
&=-2 \cos \frac{a}{2} \int_{0}^{1} \frac{d\left(t \sin \frac{a}{2}\right)}{\left(t \sin \frac{a}{2}\right)^{2}+\cos ^{2} \frac{a}{2}} \\
&=-2\left[\tan ^{-1}\left(t \cdot \tan \frac{a}{2}\right)\right]_{0}^{1} \\
&=-2 \tan ^{-1}\left(\tan \frac{a}{2}\right) \\
&=-a
\end{aligned}
$$
Now we can get $I(a)$ by integrating $I^{\prime}(y)$ w.r.t $y$ from $\dfrac{\pi}{2} $ to $a$.
$$
I(a)=\int_{\frac{\pi}{2}}^{a} I^{\prime}(y) d y=\int_{\frac{\pi}{2}}^{a}-yd y=\boxed{\frac{\pi^{2}}{8}-\frac{a^{2}}{2}}
$$
For example, $$
\int_{0}^{\frac{\pi}{2}} \frac{\ln \left(1+\frac{1}{2} \cos x\right)}{\cos x} d x=\frac{5 \pi^{2}}{72}
$$
:|D Wish you enjoy my solution!
