Integrals depending on a parameter: $\int_{0}^{\pi/2} \ln(a^2\sin^2{x} + \cos^2{x})dx $ I'm trying to calculate this integral:
$$ \int_{0}^{\pi/2} \ln(a^2\sin^2{x} + \cos^2{x})dx $$
For $a > 0$.
This is what I did:
$$ I(a) = \int_{0}^{\pi/2} \ln(a^2\sin^2{x} + \cos^2{x})dx \\\
I'(a) = \int_{0}^{\pi/2} \frac{2a\sin^2{x}}{(a^2\sin^2{x} + \cos^2{x})} dx \\\  
I'(a) = \int_{0}^{\pi/2} \frac{2a}{(a^2 + \frac{\cos^2{x}}{\sin^2{x}})} dx  \\\
I'(a) = 2a \int_{0}^{\pi/2} \frac{1}{a^2 + \cot^2{x}}dx  \\\
I'(a) = \frac{2}{a} \int_{0}^{\pi/2} \frac{1}{1 + \frac{\cot^2{x}}{a^2}}dx $$
Here I tried to substitude $\frac{\cot^2{x}}{a^2} = t$. This should lead me to $\arctan(something)$ (I write $\arctan{x} = \tan^{-1}{x}$.)
But I got stuck.   
After I get the derivative I should integrate it back to get $I(a)$. Also there are steps that need some prepositions to be checked. Could one help me with this integral and also to clarify the steps that need special attention; such as the second step, where I can get the derivative $I'(a)$ only if the function under the integral can be differentiated? It must be possible to find its derivative.

you can also use the series of $\ln x$ to find it
$$\begin{aligned}
\int_{0}^{\pi/2} \ln(a^2\sin^2{x} + \cos^2{x}) \mathrm{d}x
& = \int_{0}^{\pi/2} \ln(1+(a^2-1)\sin^2{x}) \mathrm{d}x\\
& = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \int_{0}^{\pi/2}(a^2-1)^n\sin^{2n}{x} \mathrm{d}x\\
& = \pi \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{2n} \frac{(2n-1)!!}{(2n)!!} (a^2-1)^n 
\end{aligned}$$
where you need wallis' integral here, then using this identity
$$\operatorname{arsinh} x = \ln(2x) + \sum\limits_{n = 1}^\infty  {\left( { - 1} \right)^{n - 1} \frac{{\left( {2n - 1} \right)!!}}{{2n\left( {2n} \right)!!}}} \frac{1}{{x^{2n} }}$$
let $x=1/\sqrt{a^2-1}$ and you will find the answer
$$\int_{0}^{\pi/2} \ln(a^2\sin^2{x} + \cos^2{x}) \mathrm{d}x = \pi\left( \operatorname{arsinh} \frac1{\sqrt{a^2-1}} - \ln\frac2{\sqrt{a^2-1}} \right) = \pi\ln\frac{a+1}{2}$$
