Evaluating two integrals having logarithmic and trig functions 
Evaluate
  $\displaystyle \int\limits_{0}^{\pi/2} \dfrac{\ln(1+\cos a\cos x)}{\cos x} dx$ where $0<a<\pi$.
$\displaystyle \int\limits_{0}^{\pi} \dfrac{\ln(1+x\cos y)}{\cos y}dy$ where $-1<x<1$.

One way is to use Leibniz's theorem for derivative under the integral sign for
$f:(0,\pi)\times [0,\frac{\pi}2]\to \mathbb{R},
\\ \displaystyle f(a,x) = \frac{\ln(1+\cos a \cos x)}{\cos x}$
and
$f:(-1,1)\times [0,\pi]\to \mathbb{R},
\\ \displaystyle f(x,y) = \frac{\ln(1+x\cos y)}{\cos y}$
but I'm looking for other methods, preferably more elementary.
 A: Using the substitutions
$$
z=\tan(x/2)\qquad\cos(x)=\dfrac{1-z^2}{1+z^2}\qquad\mathrm{d}x=\dfrac{2\mathrm{d}z}{1+z^2}
$$
and
$$
w=\sqrt{\frac{1-u}{1+u}}\ z
$$
we get
$$
\begin{align}
\frac{\mathrm{d}}{\mathrm{d}u}\int_0^{\pi/2}\frac{\log(1+u\cos(x))}{\cos(x)}\mathrm{d}x
&=\int_0^{\pi/2}\frac1{1+u\cos(x)}\mathrm{d}x\\
&=\int_0^1\frac{2\,\mathrm{d}z}{(1+z^2)+u(1-z^2)}\\
&=\int_0^1\frac{2\,\mathrm{d}z}{(1+u)+(1-u)z^2}\\
&=\frac1{\sqrt{1-u^2}}\int_0^{\sqrt{\frac{1-u}{1+u}}}\frac{2\,\mathrm{d}w}{1+w^2}\\
&=\frac2{\sqrt{1-u^2}}\tan^{-1}\left(\sqrt{\frac{1-u}{1+u}}\right)\\
&=\frac{\cos^{-1}(u)}{\sqrt{1-u^2}}
\end{align}
$$
Therefore,
$$
\begin{align}
\int_0^{\pi/2}\frac{\log(1+u\cos(x))}{\cos(x)}\mathrm{d}x
&=\int_0^u\frac{\cos^{-1}(t)}{\sqrt{1-t^2}}\mathrm{d}t\\
&=-\int_0^u\cos^{-1}(t)\,\mathrm{d}\cos^{-1}(t)\\
&=\frac{\pi^2}{8}-\frac12\left(\cos^{-1}(u)\right)^2
\end{align}
$$

Similarly,
$$
\begin{align}
\frac{\mathrm{d}}{\mathrm{d}u}\int_0^{\pi}\frac{\log(1+u\cos(x))}{\cos(x)}\mathrm{d}x
&=\int_0^{\pi}\frac1{1+u\cos(x)}\mathrm{d}x\\
&=\int_0^\infty\frac{2\,\mathrm{d}z}{(1+z^2)+u(1-z^2)}\\
&=\int_0^\infty\frac{2\,\mathrm{d}z}{(1+u)+(1-u)z^2}\\
&=\frac1{\sqrt{1-u^2}}\int_0^\infty\frac{2\,\mathrm{d}w}{1+w^2}\\
&=\frac\pi{\sqrt{1-u^2}}
\end{align}
$$
Therefore,
$$
\begin{align}
\int_0^\pi\frac{\log(1+u\cos(x))}{\cos(x)}\mathrm{d}x
&=\int_0^u\frac\pi{\sqrt{1-t^2}}\mathrm{d}t\\
&=-\int_0^u\pi\,\mathrm{d}\cos^{-1}(t)\\
&=\frac{\pi^2}{2}-\pi\cos^{-1}(u)
\end{align}
$$

Trying to get an answer for which you might be able to use other limits of integration might be extremely difficult. $\tan^{-1}\left(a\sqrt{\frac{1-u}{1+u}}\right)$ does not have a nice form in general. This makes it appear that a more "elementary" approach might not exist.
