<s>[INST] $\int_{0}^{\pi/2}\log(\sin^2\theta+k^2\cos^2\theta)d\theta=\pi\log\frac{1+k}{2},k\geq0$ Prove that $$\int_{0}^{\pi/2}\log(\sin^2\theta+k^2\cos^2\theta)d\theta=\pi\log\frac{1+k}{2},k\geq0$$
I tried but stuck in between.
Let $$I=\int_{0}^{\pi/2}\log(\sin^2\theta+k^2\cos^2\theta)d\theta...........(1)$$
$$I=\int_{0}^{\pi/2}\log(\cos^2\theta+k^2\sin^2\theta)d\theta............(2)$$
Adding $(1)$ and $(2),$ we get
$$2I=\int_{0}^{\pi/2}\log(\cos^2\theta+k^2\sin^2\theta)(\sin^2\theta+k^2\cos^2\theta)d\theta$$
$$2I=\int_{0}^{\pi/2}\log[(1+k^4)\cos^2\theta\sin^2\theta+k^2(\sin^4\theta+\cos^4\theta)]d\theta$$
But i am unable to solve further.Please help me.
 [/INST] Let $$\displaystyle I = \int_{0}^{\frac{\pi}{2}}\ln\left(\sin^2 \theta +k^2\cos^2 \theta\right)d\theta = \int_{0}^{\frac{\pi}{2}}\ln\left(\cos^2 \theta +k^2\sin^2 \theta\right)d\theta $$
above we used $$\displaystyle \int_{0}^{a}f(x)dx = \int_{0}^{a}f(a-x)dx$$
Now Using Differentiation under Integral Sign.
Now $$\displaystyle \frac{dI}{dk} = \int_{0}^{\frac{\pi}{2}}\frac{2k\sin^2 \theta}{\cos^2 \theta+k^2\sin^2 \theta}d\theta = 2k\int_{0}^{\frac{\pi}{2}}\frac{2k\tan^2 \theta\cdot \sec^2 \theta}{(1+ +k^2\tan^2 \theta)\cdot (1+\tan^2 \theta)}d\theta$$
Now Put $\tan \theta = t\;,$ Then $\sec^2 \theta d\theta = dt$ and changing limit, We get
$$\displaystyle \frac{dI}{dk} = 2k\int_{0}^{\infty}\frac{t^2}{(1+k^2t^2)\cdot (1+t^2)}dt = \frac{2k}{k^2-1}\int_{0}^{\infty}\frac{(1+k^2t^2)-(1+t^2)}{(1+k^2t^2)\cdot (1+t^2)}dt$$
So $$\displaystyle \frac{dI}{dk} = \frac{2k}{k^2-1}\int_{0}^{\infty}\left[\frac{1}{1+t^2}-\frac{1}{1+k^2t^2}\right]dt$$
So we get $$\displaystyle \frac{dI}{dk} = \frac{2k}{k^2-1}\int_{0}^{\infty}\left[\frac{\pi}{2}-\frac{1}{k}\cdot \left(\tan^{-1}(tk)\right)_{0}^{\infty}\right] = \frac{2k}{k^2-1}\left[\frac{\pi}{2}-\frac{\pi}{2k}\right]$$
So we get $$\displaystyle \frac{dI}{dk} =\frac{2k}{k^2-1}\cdot \frac{\pi}{2}\cdot \left(\frac{k-1}{k}\right) =\frac{\pi}{k+1}$$
Now $$\displaystyle \int \frac{dI}{dk}dk = \pi\int \frac{1}{k+1}dk$$
So $$\displaystyle I = \pi\cdot \ln(k+1)+\mathcal{C}...............(1)$$
Now If $k=1\;,$ Then $$\displaystyle I = \int_{0}^{\frac{\pi}{2}}\ln\left(\cos^2 \theta +\sin^2 \theta\right)d\theta = 0$$
Now put $k=1$ in equation...............$(1)$
So we get $$\displaystyle 0 = \frac{\pi}{2}+\mathcal{C}\Rightarrow \mathcal{C} = -\frac{\pi}{2}$$
So put $\displaystyle \mathcal{C} = -\frac{\pi}{2}$ in equation .. ...........$(1)$
So we get $$\displaystyle I = \pi\cdot \ln\left(\frac{1+k}{2}\right)\;,$$ Where $k\geq 0$
</s>