<s>[INST] How to solve $\int_{0}^{\frac{\pi}{2}} \frac{2304\cos x}{(\cos 4x-8\cos 2x+15)^2} \,dx$ 
\begin{equation}
\int_{0}^{\frac{\pi}{2}} \frac{2304\cos x}{(\cos 4x-8\cos 2x+15)^2} \,dx
\end{equation}

This is a MCQ question and there are 5 options to choose which are "A.$2\sqrt{3}\pi+9\ln 3$, B.$2\sqrt{7}\pi+8\ln 3$ , C.$2\sqrt{3}\pi+8\ln 3$ , D.$2\sqrt{2}\pi+2\ln 3$, E.Other solution."
How do you solve this integral?
This appears in MCQ test, so I think there should be a trick to solve this without using too much force. The test have 30 questions and 2 hours, so each question should be finished under 4mn ( I doubted it though). Here is my solution that I spend around 3h to solve it. ( Sorry for not using latex and sorry for the inconveniences )Photo
I appreciate any solution tricks. Thanks!
 [/INST] Here are a few shortcuts. With $t =\sin x$
\begin{equation}
I=\int_{0}^{\frac{\pi}{2}} \frac{2304\cos x}{(\cos 4x-8\cos 2x+15)^2} \,dx=36\int_0^1 \frac {1}{(t^4+t^2+1)^2}dt\tag1
\end{equation}
Note
$$\left(\frac{t-t^3}{t^4+t^2+1}\right)’
= \frac{t^6+5}{(t^4+t^2+1)^2}-\frac{4}{t^4+t^2+1}
$$
Integrate both sides over $(0,\infty)$
\begin{align}
\int_0^\infty \frac{4}{t^4+t^2+1}dt &= \int_0^\infty \overset{t\to 1/t} {\frac{t^6}{(t^4+t^2+1)^2} }dt
 + \int_0^\infty \frac{5}{(t^4+t^2+1)^2}dt\\
&= \int_0^1\frac{6}{(t^4+t^2+1)^2}dt +\int_1^\infty \frac{6}{(t^4+t^2+1)^2}dt\tag2
\end{align}
Similarly, integrate over $(0,1)$
\begin{align}
\int_0^1\frac{4}{t^4+t^2+1}dt=\int_0^1\frac{5}{(t^4+t^2+1)^2}dt +\int_1^\infty \frac{1}{(t^4+t^2+1)^2}dt \tag3
\end{align}
Combine (2) and (3) to obtain
\begin{align}
\int_0^1\frac{dt}{(t^4+t^2+1)^2}= \int_0^1\frac{dt}{t^4+t^2+1}
-\frac14 \int_0^\infty \frac{dt}{t^4+t^2+1}= \frac14\ln3+\frac{\pi}{6\sqrt3}
\end{align}
Plug into (1)
$$I= 9\ln3+ 2\sqrt3{\pi}$$

P.S. The last integral is carried out as follows
$$\int \frac{1}{t^4+t^2+1}dt= \frac12 \int\frac{1-t^2}{t^4+t^2+1}dt 
 + \frac12 \int\frac{1+t^2}{t^4+t^2+1}dt \\
= \frac12 \int\frac{d(t+\frac1t)}{(t+\frac1t)^2-1}
 + \frac12 \int\frac{d(t-\frac1t)}{(t-\frac1t)^2+3}
$$
</s>