Evaluate $$\int_0^{\pi/2} \ln \left(a^2\cos^2\theta +b^2\sin^2\theta\right) \,d\theta$$ where $a,b$ are finite natural numbers
I have spent about a day thinking over this problem. I tried integration by parts, differentiating under integral sign (Feynman's trick, with respect to $a, b$), using some trigonometric and logarithmic properties like changing $\cos^2\theta$ to $\cos2\theta$ and hereafter some logarithmic properties, etc., but failed miserably.
Also tried to use the property that $$\int_a^b f(x)\,dx=\int_a^b f(a+b-x)\,dx$$ in-between, but still to no avail. I also tried to find similar questions on MSE but did not get a related one.
Can someone please help me to solve this integral?
Edit
My try (Feynman's trick) :
Let $$I(a)=\int_0^{\pi/2} \ln \left(a^2\cos^2\theta +b^2\sin^2\theta\right) d\theta$$
Hence $$I'(a) =\frac 1a \int_0^{\pi/2} \frac {2a^2\cos^2\theta d\theta}{a^2\cos^2\theta +b^2\sin^2\theta}$$ $$=\frac 1a\left[ \frac {\pi}{2}+\int_0^{\pi/2} \frac {a^2\cos^2\theta -b^2\sin^2\theta}{a^2\cos^2\theta +b^2\sin^2\theta}\right]$$
Wherein between I broke $2a^2\cos^2\theta=a^2\cos^2\theta +b^2\sin^2\theta+a^2\cos^2\theta -b^2\sin^2\theta$
But now how do I continue further