Compute integral: $\int_{0}^{\pi/2}\log(a^2\sin^2 x+b^2\cos^2 x )dx$ This is a integral for a calculus exam, and I have no idea how to solve it.
$$\int_0^{\frac{\pi}{2}} \log \big( a^2 \sin^{2}(x)+b^2 \cos^{2}(x) \big) \, \mathrm{d}x$$

Without loss of generality, let $b>a>0$. Noting
$$ \sin^2x=\frac{1-\cos(2x)}{2}, \cos^2x=\frac{1+\cos(2x)}{2} $$
we have
\begin{eqnarray*}
I&=&\int_0^{\frac{\pi}{2}} \log \big(\frac{a^2+b^2}{2}+\frac{b^2-a^2}{2}\cos(2x)\big) \mathrm{d}x\\
&=&\frac{1}{2}\int_0^{\pi} \log \big(\frac{a^2+b^2}{2}+\frac{b^2-a^2}{2}\cos x\big) \mathrm{d}x\\
&=&\frac{1}{2}\int_0^{\pi} \log \left(\frac{a^2+b^2}{b^2-a^2}+\cos x\right) \mathrm{d}x+\frac{\pi}{2}\log\frac{b^2-a^2}{2}.
\end{eqnarray*}
Note, for $a>1$
$$\int_0^{\pi} \log \left(\alpha+\cos x\right) \mathrm{d}x=\pi\log\frac{a(a+\sqrt{a^2-1})}{2a} $$
and hence we have
\begin{eqnarray*}
I&=&\pi\log\frac{a+b}{2}
\end{eqnarray*}
