<s>[INST] Is there any method other than Feynman’s Integration Technique to find $ \int_{0}^{\frac{\pi}{2}} \ln \left(a \cos ^{2} x+b \sin ^{2} x+c\right) d x?$ We are going to find the formula, by Feynman’s Integration Technique, for
$$\int_{0}^{\frac{\pi}{2}} \ln \left(a \cos ^{2} x+b \sin ^{2} x+c\right) d x,$$
where $a+c$ $\textrm{ and }$ $b+c$ are positive real numbers.
First of all, let’s ‘kill’ the term $\sin x$ and the square of $\cos x$ by identity and double angle formula.
$\displaystyle \begin{aligned}\int_{0}^{\frac{\pi}{2}} \ln \left(a \cos ^{2} x+b \sin ^{2} x+c\right) d x =& \int_{0}^{\frac{\pi}{2}} \ln \left[(a-b) \cos ^{2} x+(b+c)\right] d x \\=& \int_{0}^{\frac{\pi}{2}} \ln \left[(a-b)\left(\frac{1+\cos 2 x}{2}\right)+(b+c)\right] d x \\=& \int_{0}^{\frac{\pi}{2}} \ln \left[\frac{a-b}{2} \cos 2 x+\left(b+c+\frac{a-b}{2}\right)\right] d x \\\stackrel{2x\mapsto x}{=}  & \frac{1}{2} \int_{0}^{\pi} \ln \left[\frac{a-b}{2} \cos x+\left(\frac{a+b+2 c}{2}\right)\right] d x\end{aligned}\tag*{} $
By my post, I found, by Feynman’s Integration Technique, that
$\displaystyle \int_{0}^{\pi} \ln (b \cos x+c)=\pi \ln \left(\frac{c+\sqrt{c^{2}-b^{2}}}{2}\right),\tag*{} $
where $\left|\frac{c}{b}\right|\geq 1$.
$\displaystyle I=\frac{\pi}{2} \ln \left[\frac{\frac{a+b+2 c}{2}+\sqrt{\left(\frac{a+b+2 c}{2}\right)^{2}-\left(\frac{a-b}{2}\right)^{2}}}{2}\right]\tag*{} $
Simplifying gives the result
$\displaystyle \begin{aligned}I&=\frac{\pi}{2} \ln \left[\frac{a+b+2 c+2 \sqrt{(a+c)(b+c)}]}{4}\right] \\&=\frac{\pi}{2} \ln \left(\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\right)^{2} \\&=\pi \ln \left(\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\right)\end{aligned}\tag*{} $
 [/INST] We can write the initial integral in the form
$\displaystyle I=\int_0^\frac{\pi}{2}\ln(a\cos^2x+b\sin^2x+c)dx=\int_0^\frac{\pi}{2}\ln\big((a-b)\cos^2x+b+c\big)dx\tag*{}$
Using $1+\tan^2x=\frac{1}{\cos^2x}$
$\displaystyle I=\int_0^\frac{\pi}{2}\ln\Big((a-b)+(b+c)(1+\tan^2x)\Big)dx+\int_0^\frac{\pi}{2}\ln(\cos^2x)dx\tag*{}$
$\displaystyle =\int_0^\frac{\pi}{2}\ln\Big((a+c)+(b+c)\tan^2x\Big)dx+2\int_0^\frac{\pi}{2}\ln(\cos x)dx\tag*{}$
Using for the first integral the substitution $\displaystyle x=\arctan t\,$ and the well-known value of the second integral $\displaystyle \int_0^\frac{\pi}{2}\ln(\cos x)dx=-\frac{\pi}{2}\ln2$
$\displaystyle I=\frac{1}{2}\int_{-\infty}^\infty\frac{\ln\Big((a+c)+(b+c)t^2\Big)}{1+t^2}dt-\pi\ln2\tag*{}$
Now we use $\displaystyle\,\ln(p+q\,t^2)=2\,\Re\ln(\sqrt p-i\sqrt q\, t)$ and close the contour in the upper-half of the complex plane, integrating along a big half-circle (radius $R$), counter-clockwise. It is easy to show that the integral along this half-circle $\to0$ at $R\to\infty$.
The function is single-valued in the upper half-plane (the only branch point of the logarithm is $z=-i$). Therefore, using the Cauchy's residue theorem
$\displaystyle I=\Re\,2\pi i\operatorname{Res}_{z=i}\frac{\ln\Big(\sqrt{a+c}-i\sqrt{b+c}\,z\Big)}{1+z^2}-\pi\ln 2\tag*{}$
$\displaystyle =\pi\ln\big(\sqrt{a+c}+\sqrt{b+c}\big)-\pi\ln2\tag*{}$
$\displaystyle \boxed{\,\,I=\pi\ln\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\,\,}\tag*{}$
</s>