TITLE: Computing $\int_{-π/2}^{π/2} \frac{28\cos^2(θ)+10\cos(θ)\sin(θ)-28\sin^2(θ)}{2\cos^4(θ)+3\cos^2(θ)\sin^2(θ)+m\sin^4(θ)}\ dθ$
QUESTION [5 upvotes]: I am studying the integral 
$$I=\int_{-\pi/2}^{\pi/2}
\frac{28\cos^2(\theta)+10\cos(\theta)\sin(\theta)-28\sin^2(\theta)}{2\cos^4(\theta)+3\cos^2(\theta)\sin^2(\theta)+m\sin^4(\theta)}d\theta,$$
where $m>0$. In the problem I am working, it is very important to know what value of $m$ makes this integral positive, negative or equal to zero. I found that if $m=2$, then the integral is zero (introducing it in Wolfram Alpha). However, I don't know how to prove it formally. 
On the other hand, I tried some values of $m$ in Wolfram and it seems that if $m<2$, then the integral is negative, and if $m>2$, the integral is positive. But again, I have no proof of this. 
Any ideas of how to approach this problem?
Just in case, I found this alternative representation of the integral 
$$I=\int_{-\pi/2}^{\pi/2}
\frac{8[5\sin(2\theta)+28\cos(2\theta)]}{\cos(4\theta)+15+8(m-2)\sin^4(\theta)}d\theta.$$
Any help would be appreciated.

REPLY [9 votes]: Define the function $\mathcal{I}:\mathbb{R}_{>0}\rightarrow\mathbb{R}$ via the trigonometric integral
$$\begin{align}
\mathcal{I}{\left(\mu\right)}
&:=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{28\cos^{2}{\left(\theta\right)}+10\cos{\left(\theta\right)}\sin{\left(\theta\right)}-28\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}.\\
\end{align}$$

Let $\mu\in\mathbb{R}_{>0}$. Since the integral $\mathcal{I}$ has a symmetric interval of integration, the integral of the odd component of the integrand vanishes identically:
$$\begin{align}
\mathcal{I}{\left(\mu\right)}
&=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{28\cos^{2}{\left(\theta\right)}+10\cos{\left(\theta\right)}\sin{\left(\theta\right)}-28\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&=\int_{-\frac{\pi}{2}}^{0}\mathrm{d}\theta\,\frac{28\cos^{2}{\left(\theta\right)}+10\cos{\left(\theta\right)}\sin{\left(\theta\right)}-28\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&~~~~~+\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{28\cos^{2}{\left(\theta\right)}+10\cos{\left(\theta\right)}\sin{\left(\theta\right)}-28\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&=\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{28\cos^{2}{\left(\theta\right)}-10\cos{\left(\theta\right)}\sin{\left(\theta\right)}-28\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}};~~~\small{\left[\theta\mapsto-\theta\right]}\\
&~~~~~+\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{28\cos^{2}{\left(\theta\right)}+10\cos{\left(\theta\right)}\sin{\left(\theta\right)}-28\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&=\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{56\cos^{2}{\left(\theta\right)}-56\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&=56\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{\cos^{2}{\left(\theta\right)}-\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}.\\
\end{align}$$

Using the double-angle formulas for sine and cosine,
$$\begin{align}
\sin{\left(2\theta\right)}
&=2\sin{\left(\theta\right)}\cos{\left(\theta\right)},\\
\cos{\left(2\theta\right)}
&=\cos^{2}{\left(\theta\right)}-\sin^{2}{\left(\theta\right)}\\
&=2\cos^{2}{\left(\theta\right)}-1\\
&=1-2\sin^{2}{\left(\theta\right)},\\
\end{align}$$
we can rewrite the integral as
$$\begin{align}
\mathcal{I}{\left(\mu\right)}
&=56\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{\cos^{2}{\left(\theta\right)}-\sin^{2}{\left(\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&=56\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{\cos{\left(2\theta\right)}}{2\cos^{4}{\left(\theta\right)}+3\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+\mu\sin^{4}{\left(\theta\right)}}\\
&=56\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{4\cos{\left(2\theta\right)}}{8\cos^{4}{\left(\theta\right)}+12\cos^{2}{\left(\theta\right)}\sin^{2}{\left(\theta\right)}+4\mu\sin^{4}{\left(\theta\right)}}\\
&=56\int_{0}^{\frac{\pi}{2}}\mathrm{d}\theta\,\frac{4\cos{\left(2\theta\right)}}{2\left[1+\cos{\left(2\theta\right)}\right]^{2}+3\sin^{2}{\left(2\theta\right)}+\mu\left[1-\cos{\left(2\theta\right)}\right]^{2}}\\
&=56\int_{0}^{\pi}\mathrm{d}\theta\,\frac{2\cos{\left(\theta\right)}}{2\left[1+\cos{\left(\theta\right)}\right]^{2}+3\sin^{2}{\left(\theta\right)}+\mu\left[1-\cos{\left(\theta\right)}\right]^{2}};~~~\small{\left[\theta\mapsto\frac12\theta\right]}\\
&=112\int_{0}^{\pi}\mathrm{d}\theta\,\frac{\cos{\left(\theta\right)}}{2\left[1+\cos{\left(\theta\right)}\right]^{2}+3\sin^{2}{\left(\theta\right)}+\mu\left[1-\cos{\left(\theta\right)}\right]^{2}}.\\
\end{align}$$
Using the tangent half-angle substitution, the trigonometric integral transforms as
$$\begin{align}
\mathcal{I}{\left(\mu\right)}
&=112\int_{0}^{\pi}\mathrm{d}\theta\,\frac{\cos{\left(\theta\right)}}{2\left[1+\cos{\left(\theta\right)}\right]^{2}+3\sin^{2}{\left(\theta\right)}+\mu\left[1-\cos{\left(\theta\right)}\right]^{2}}\\
&=112\int_{0}^{\infty}\mathrm{d}t\,\frac{2}{1+t^{2}}\cdot\frac{\left(\frac{1-t^{2}}{1+t^{2}}\right)}{2\left(1+\frac{1-t^{2}}{1+t^{2}}\right)^{2}+3\left(\frac{2t}{1+t^{2}}\right)^{2}+\mu\left(1-\frac{1-t^{2}}{1+t^{2}}\right)^{2}};~~~\small{\left[\theta=2\arctan{\left(t\right)}\right]}\\
&=\int_{0}^{\infty}\mathrm{d}t\,\frac{56\left(1-t^{2}\right)}{2+3t^{2}+\mu\,t^{4}}.\\
\end{align}$$
Setting $\sqrt{\frac{2}{\mu}}=:a\in\mathbb{R}_{>0}$ and $\frac34a=:b\in\mathbb{R}_{>0}$, we then have
$$\begin{align}
\mathcal{I}{\left(\mu\right)}
&=\mathcal{I}{\left(\frac{2}{a^{2}}\right)}\\
&=\int_{0}^{\infty}\mathrm{d}t\,\frac{56\left(1-t^{2}\right)}{2+3t^{2}+2a^{-2}t^{4}}\\
&=\sqrt{a}\int_{0}^{\infty}\mathrm{d}u\,\frac{56\left(1-au^{2}\right)}{2+3au^{2}+2u^{4}};~~~\small{\left[t=u\sqrt{a}\right]}\\
&=\frac13\sqrt{a}\int_{0}^{\infty}\mathrm{d}u\,\frac{28\left(3-4bu^{2}\right)}{1+2bu^{2}+u^{4}}\\
&=\frac{28}{3}\sqrt[4]{\frac{2}{\mu}}\int_{0}^{\infty}\mathrm{d}u\,\frac{\left(3-4bu^{2}\right)}{1+2bu^{2}+u^{4}}\\
&=\frac{28}{3}\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{\left(3-4bu^{2}\right)}{1+2bu^{2}+u^{4}}\\
&~~~~~+\frac{28}{3}\sqrt[4]{\frac{2}{\mu}}\int_{1}^{\infty}\mathrm{d}u\,\frac{\left(3-4bu^{2}\right)}{1+2bu^{2}+u^{4}}\\
&=\frac{28}{3}\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{\left(3-4bu^{2}\right)}{1+2bu^{2}+u^{4}}\\
&~~~~~+\frac{28}{3}\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{\left(3u^{2}-4b\right)}{1+2bu^{2}+u^{4}};~~~\small{\left[u\mapsto\frac{1}{u}\right]}\\
&=\frac{28}{3}\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{\left(3-4b\right)\left(1+u^{2}\right)}{1+2bu^{2}+u^{4}}\\
&=28\left(1-\frac43b\right)\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{1+u^{2}}{1+2bu^{2}+u^{4}}\\
&=28\left(1-a\right)\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{1+u^{2}}{1+2bu^{2}+u^{4}}\\
&=28\left(1-\sqrt{\frac{2}{\mu}}\right)\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{1+u^{2}}{1+2bu^{2}+u^{4}}\\
&=\frac{28\left(\mu-2\right)}{\left(\sqrt{\mu}+\sqrt{2}\right)\sqrt{\mu}}\sqrt[4]{\frac{2}{\mu}}\int_{0}^{1}\mathrm{d}u\,\frac{1+u^{2}}{1+2bu^{2}+u^{4}}.\\
\end{align}$$
Since the integral factor in the last line above is a positive quantity, we don't need to actually solve the integral to determine the sign of $\mathcal{I}$. We have
$$\operatorname{sgn}{\left(\mathcal{I}{\left(\mu\right)}\right)}=\operatorname{sgn}{\left(\mu-2\right)},$$
as you originally conjectured.