<s>[INST] 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?
 [/INST] 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!
</s>