Evaluating $\int_{0}^{\pi/2}\log\left(a^2\cos^2\left(x\right)+b^2\sin^2\left(x\right)\right)\,{\rm d}x$ I am trying to evaluate the integral below by differentiating through the integral. Let
$ F(a,b) :=\displaystyle\int_{0}^{\pi/2}\log\left(a^2\cos^2\left(x\right)+b^2\sin^2\left(x\right)\right)\,{\rm d}x$
For fixed $b$, and letting $g(t) = F(t,b)$ I am trying to justify
$g'(t) = \displaystyle\int_{0}^{\pi/2} \dfrac{2t\cos^2(x)}{t^2\cos^2\left(x\right)+b^2\sin^2\left(x\right)}\,{\rm d}x$
In order to justify this, I need to show


*

*$f(t,b) :=\log\left(t^2\cos^2\left(x\right)+b^2\sin^2\left(x\right)\right)\,{\rm d}x$ is integrable over $[0,\pi/2]$

*$\dfrac{\partial f}{\partial t}$ exists for all $t,x$

*There exists a dominating function such that $\dfrac{\partial f}{\partial t} \leq g$, a.e and $g \in L^1([0,\pi/2])$


I'm thinking 1) is straightforward since it's continuous, hence measurable, and since it's on a finite interval we can conclude that it is also integrable.
$\dfrac{\partial f}{\partial t} = \dfrac{2t\cos^2(x)}{a^2\cos^2\left(x\right)+b^2\sin^2\left(x\right)}$ so 2) is satisfied
In regards to finding a dominating function, can MVT be used here?
I'm also having some trouble evaluating the integral $g'(t)$, but $F(a,b) = \pi \log \left(\dfrac{a+b}{2}\right) \ \ (a,b>0)$ should be the solution.
 A: Note that:
$${a}^{2} \cos^{2} \left( x \right)  +{b}^{2}  \sin^{2}
 \left( x \right)  =\frac{1}{4} \left( 1+{\frac { \left( a-b
 \right) {{\rm e}^{-2\,ix}}}{a+b}} \right)  \left( {\frac {{{\rm e}^{2
\,ix}} \left( a-b \right) }{a+b}}+1 \right)  \left( a+b \right) ^{2}$$
$$\left|{\frac { \left( a-b\right)}{a+b}}\right|\le 1,\quad a,b>0$$
then from:
$$-\sum _{n=1}^{\infty }{\frac {{r}^{n}{{\rm e}^{inx}}}{n}}=\ln  \left( 
1-r{{\rm e}^{ix}} \right) $$
show that:
$$2\ln  \left(\frac{a+b}{2} \right) -2\sum _{n=1}^{\infty } \frac{\left( 
-{\frac {a-b}{a+b}} \right) ^{n}\cos \left( 2\,nx \right)}{n} =
\ln  \left({a}^{2} \cos^{2} \left( x \right)  +{b}^{2}  \sin^{2}
 \left( x \right)\right) $$
and note that:
$$\int _{0}^{1/2\,\pi }\!\cos \left( 2\,nx \right) {dx}=0,\quad n\ge 1$$
$$\int _{0}^{1/2\,\pi }\!2\ln  \left( \frac{a+b}{2}  \right) {dx}=\ln 
 \left(\frac{a+b}{2}  \right) \pi $$
and the integration result follows. Furthermore:
$${\frac {\partial }{\partial t}}\ln  \left({t}^{2} \cos^{2} \left( x \right)  +{b}^{2}  \sin^{2}
 \left( x \right)\right)  ={\frac {2t}{{t}^{2}+{b}^{2} \tan^{2} \left( x
 \right)}}<\frac{2}{t}$$
A: $$I(a)=\int_0^\frac\pi2\log\bigg(a^2\cos^2x+b^2\sin^2x\bigg)dx\quad=>\quad I'(a)=\int_0^\frac\pi2\frac{2a\cdot\cos^2x}{a^2\cos^2x+b^2\sin^2x}dx$$
$$J(b)=\int_0^\frac\pi2\log\bigg(a^2\cos^2x+b^2\sin^2x\bigg)dx\quad=>\quad J'(b)=\int_0^\frac\pi2\frac{2b\cdot\sin^2x}{a^2\cos^2x+b^2\sin^2x}dx$$

$$I'(a)=2a\underbrace{\int_0^\frac\pi2\frac{dx}{a^2+b^2\tan^2x}dx}_{t=\tan x}=2a\,\bigg[~\frac{x-\dfrac ba\arctan\bigg(\dfrac ba\tan x\bigg)}{a^2-b^2}~\bigg]_0^\frac\pi2=\frac\pi{a+b}$$
$$J'(b)=2b\underbrace{\int_0^\frac\pi2\frac{dx}{a^2\cot^2x+b^2}dx}_{t=\cot x}=2b\,\bigg[~\frac{\dfrac\pi2-x-\dfrac ab\arctan\bigg(\dfrac ab\cot x\bigg)}{a^2-b^2}~\bigg]_0^\frac\pi2=\frac\pi{a+b}$$

$\begin{align}F(a,b)=I(a)=\pi\ln(a+b)+C_b\\\\F(a,b)=J(b)=\pi\ln(a+b)+C_a\end{align}=>$ $F(1,1)=0=>C_a=C_b=-\pi\ln2=>F=\pi\,\ln\dfrac{a+b}2$
A: $\newcommand{\Log}{\operatorname{Log}}$To change the game a bit. First set $x=\arctan(t)$ then we get:
\begin{align}
F(a,b)&=\int^\infty_0 \frac{\ln\left(\frac{1}{1+t^2}a^2+\frac{t^2}{1+t^2}b^2\right)}{1+t^2}\,dt\\
&=\int^\infty_0 \frac{\ln\left(a^2+b^2t^2\right)}{1+t^2}\,dt-\int^\infty_0 \frac{\ln\left(1+t^2\right)}{1+t^2}\,dt\\
&=\frac{1}{2}\int^\infty_{-\infty} \frac{\ln\left(a^2+b^2t^2\right)}{1+t^2}\,dt-\frac{1}{2}\int^\infty_{-\infty} \frac{\ln\left(1+t^2\right)}{1+t^2}\,dt
\end{align}
So it is enough to find $I(a,b)$ defined by:
\begin{align}
I(a,b):=\frac{1}{2}\int^\infty_{-\infty} \frac{\ln\left(a^2+b^2t^2\right)}{1+t^2}\,dt
\end{align}
for $a,b>0$. 
We use a complex analysis method and  consider an integral that will be strange in the first place but later it will become clear. So consider
\begin{align}\tag{1}
\oint_C \frac{\Log(ia+bz)}{1+z^2}\,dz =\int_{C_R}\frac{\Log(ia+bz)}{1+z^2}\,dz+ \int^R_{-R}\frac{\Log(ai+bz)}{1+z^2}\,dz
\end{align} 
where $C$ is a semi circle contour in the upper half plane; $C_R$ is the circle part and the other one is obvious. Moreover $\Log(\cdot)$ is the Principal Log (with this choice we don't have to deal with the branch cut). The only residue inclosed is $z=i$ and therefore by the Residue Theorem we get:
\begin{align}
\int_{C_R}\frac{\Log(ia+bz)}{1+z^2}\,dz+ \int^R_{-R}\frac{\Log(ai+bz)}{1+z^2}\,dz=2\pi i \text{Res}_{z=i} \frac{\Log(ia+zb)}{1+z^2}
\end{align}
The integral on $C_R$ vanshies when $R\to\infty$. Now lets have a look at the real part of the one on $[-R,R]$:
\begin{align}
\Re\left(\int^R_{-R}\frac{\Log(ia+bz)}{1+z^2}\,dz\right) &= \frac{1}{2}\int^R_{-R} \frac{\ln(a^2+b^2t^2)}{1+t^2}\,dt
\end{align}
Now the choice of $(1)$ becomes clear. Let $R\to \infty$ and we get:
\begin{align}
I(a,b) = \Re\left(2\pi i \text{Res}_{z=i} \frac{\Log(ia+bz)}{1+z^2}\right)
\end{align}
Doing the residue yields:
\begin{align}
I(a,b)=\pi\ln(a+b)
\end{align}
We also know that $F(a,b)=I(a,b)-I(1,1)=\pi\ln(a+b)-\pi\ln(2)$ so finally we conclude:

$$F(a,b)=\int^{\pi/2}_0\ln(a^2\cos^2(x)+b^2\sin^2(x))\,dx=\pi\ln\left(\frac{a+b}{2}\right)$$
  with $a,b>0$.

