How to approach solving $\int_0^{\pi/2} \ln(a^2 \cos^2 x +b^2 \sin^2 x ) dx$ I have been attempting to solve this integral for several days in preparation for an exam and keep reaching dead ends.
I(a,b) = $\int_0^{\pi/2} \ln(a^{2}\cos^2(x)+b^{2}\sin^2(x)) dx$, where $a,b>0$
My best approach so far is defining:
$F(x) = I(x, b)$
Then, I know:
$F(b) = I(b, b) = \pi/2 * \ln(b^2)$
Then I am now attempting to find $F'(x)$ using differentiation under the integral sign, and integrating from b to a.
This is where I am stuck - no matter what I do, I cannot solve the integral.
Am I in the right direction or should this be solved in a different manner?
I also considered something elliptical due to the acos, bsin in the original integral, yet it has also reached a dead end.
 A: Maybe someone is interested in a more "outside the box approach"
Let us define 

$$F(a,b)=\int_0^{\pi/2}\log(a^2\cos(x)^2+b^2\sin(x)^2)dx$$

Now
$$
\partial_aF(a,b)=2a\int_0^{\pi/2}\frac{\cos(x)^2}{a^2\cos(x)^2+b^2\sin(x)^2}dx
$$
$$
\partial_bF(a,b)=2b\int_0^{\pi/2}\frac{\sin(x)^2}{a^2\cos(x)^2+b^2\sin(x)^2}dx
$$
which leads immediatly to the follwoing partial differential equation

$$
a \partial_aF(a,b)+b\partial_bF(a,b)=\pi
$$

by seperation of variables the homogenous solution to the above problem is given by $F_h(a,b)=C\frac{b}{a}$ where $C$ is some constant. 
By inspection it is also straightforward to see that the particular solution with the required symmetry $a \leftrightarrow b$ is given by $F_p(a,b)=\pi \log(D(a+b))$. Here $D$ is another free parameter which appears through the invariance under scaling of our DE. 
The constants of integration might be fixed by the requirement $F(a,a)=\pi \log(a)$ which induces $C=0$ and $D=1/2$. It follows that

$$
F(a,b)=F_h(a,b)+F_p(a,b)=\pi\log\left(\frac{a+b}{2}\right)
$$

Edit: I'm totally aware that (also on this site) there are much simpler approaches to such integrals, i was just in the mood to try something different
A: The integral can be deduced from the Bronstein integral
\begin{equation*}
\int_{0}^{\pi}\ln(a^{2}+b^{2}-2ab\cos x)\, dx = 2\pi\ln(\max\{a,b\})
\end{equation*}
where $0<a,b \in\mathbb{R}$.
See
Bronstein Integral 21.42
Assume that $b>a$ (otherwise change $x$ to $\dfrac{\pi}{2}-x$). Then we get
\begin{gather*}
\int_{0}^{\pi/2}\ln(a^{2}\cos^{2}x+b^{2}\sin^{2}x)\, dx = \int_{0}^{\pi/2}\ln\left(\dfrac{b^{2}+a^{2}}{2}-\dfrac{b^{2}-a^{2}}{2}\cos(2x)\right)\, dx =\\[2ex]
\dfrac{1}{2}\int_{0}^{\pi}\ln\left(\left(\dfrac{b+a}{2}\right)^{2}+\left(\dfrac{b-a}{2}\right)^{2}-2\dfrac{b+a}{2}\dfrac{b-a}{2}\cos x\right)\, dx = \pi\ln\left(\max\left\{\dfrac{b+a}{2},\dfrac{b-a}{2}\right\}\right) = \\[2ex]\pi\ln\left(\dfrac{a+b}{2}\right).
\end{gather*}
A: Through the substitutions $x=\arctan(t)$ and $t\leftrightarrow\frac{1}{t}$we have
$$\begin{eqnarray*} I(a,b) &=& \int_{0}^{+\infty}\frac{\log(b^2+a^2 t^2)-\log(1+t^2)}{1+t^2}\,dt\\ &=&\int_{0}^{+\infty}\frac{\log(a^2+b^2 t^2)-\log(1+t^2)}{1+t^2}\,dt=I(b,a)\end{eqnarray*}$$
where
$$ \frac{\partial}{\partial b} I(a,b) = \int_{0}^{+\infty}\frac{2 b}{\left(1+t^2\right) \left(b^2+a^2 t^2\right)}\,dt =\frac{\pi}{a+b}=\frac{\partial}{\partial a} I(a,b). $$
It follows that $I(a,b) = C+\pi\log(a+b) $, and by setting $a=b=1$ it is trivial that such a constant $C$ has to be $-\pi\log(2)$, since $I(1,1)=0$.
A: I would use the substitution $\sin(x)=u$. Then we get
$$I(a,b) = \int_0^{\pi/2} \ln(a^2 \, \cos^2(x)+b^2 \, \sin^2(x)) dx = \int_0^{1} \frac{\ln(a^2 \, (1-u^2)+b^2 \, u^2)}{\sqrt{1-u^2}} \, du$$
Then using integration by parts with
$$\frac{d}{dx}(\ln(a^2 \, (1-u^2)+b^2 \, u^2))= \frac{2\,(a^2-b^2)\,u}{b^2+(a^2-b^2)\,u^2}$$
$$\int\frac{1}{\sqrt{1-u^2}}\,du=\arcsin(u)$$
$$I(a,b) = \frac{1}{2}\pi\ln(b^2) -  \int_0^{1} \frac{2\,(a^2-b^2)\,u}{b^2+(a^2-b^2)\,u^2} \, \arcsin(u)  \, du = \\ \frac{1}{2}\pi\ln(b^2) -  \int_0^{1} \frac{2\,\arcsin(u)}{u}\,du + \int_0^{1} \frac{2\,b^2}{u\,(b^2+(a^2-b^2)\,u^2)} \, \arcsin(u)  \, du$$
According to Mathematica, the first integral gives
$$\int_0^{1} \frac{2\,\arcsin(u)}{u}\,du = \pi \ln(2)$$
The second integral can also be evaluated with Mathematica, but it gives me quite the cumbersome result. Maybe there is a simpler way to do this.
