Evaluate the following integral: $\int_{0}^{\pi/4} \frac{\sin\left(x\right)+\cos\left(x\right)}{9+ 16\sin\left(2x\right)} \, dx$ This is a question for the 2006 MIT Integration Bee that went unanswered by the contestants. I am not sure how to solve it either. I was only able to use the double angle formula to simplify the integral: $\sin\left({2x}\right) = 2 \sin\left(x\right) \cos\left(x\right)$
The final answer given was: $\frac{1}{20} \ln \left({3}\right)$
$$\int_{0}^{\frac{\pi}{4}} \dfrac{\sin\left(x\right)+\cos\left(x\right)}{9+ 16\sin\left(2x\right)} \, dx = $$
$$\int_{0}^{\frac{\pi}{4}} \dfrac{\sin\left(x\right)+\cos\left(x\right)}{9+ 32 \sin\left(x\right) \cos\left(x\right)} \, dx $$
 A: $$I=\int_{0}^{\pi/4}\frac{\sin x +\cos x}{9+16 \sin 2x} dx.$$
Use $\sin 2x=1-(\sin x- \cos x)^2$ and re-write 
$$I=\int_{0}^{\pi/4} \frac{\sin x +\cos x}{25-16(\sin x -\cos x)^2} dx,$$
Now use $\sin x -\cos x=t \implies (\cos x+ \sin x ) dx=dt$, then
$$I=\frac{1}{16}\int_{-1}^{0} \frac{dt}{25/16-t^2}=\left .\frac{1}{16} \frac{4}{10}\log\frac{5/4+t}{5/4-t} \right|_{-1}^{0}= \frac{1}{40} \log 9=\frac{1}{20}\log3.$$
A: Note that \begin{align}
9+ 16\sin\left(2x\right)&=25+32\sin(x)\cos(x)-16\\
&=25-16\sin^2x-16\cos^2x+32\cos x\sin x\\
&=5^2-4^2(\sin x - \cos x)^2\\
&=(5-4\cos x+4\sin x)(5+4\cos x-4\sin x)
\end{align}
hence 
\begin{align}
\frac{\sin x+\cos x}{(5-4\cos x+4\sin x)(5+4\cos x-4\sin x)}&=-\frac{1}{40}\frac{-4\cos x-4\sin x}{(5+4\cos x-4\sin x)}\\
&+\frac{1}{40}\frac{4\cos x+4\sin x}{(5-4\cos x+4\sin x)}
\end{align}
... the rest is shall be manageable: for each fraction the numerator is the derivative of the denominator, hence you need to recall $\int du / u = \ln(u)+k$.
A: HINT
Apply a change of variables to get the interval $[0,2\pi]$ for integration and then 
put $z=e^{it}$ 
Thus $\cos{at}=\frac{z^a+\frac{1}{z^a}}{2}$ and $\sin{at}=\frac{z^a-\frac{1}{z^a}}{2i}$
$\frac{dz}{dt}=iz$
Then apply the Residue Theorem to the unit circle.
A: You have a rational function of trigonometric functions. Apply the Weierstrassian substitution. That is, let $$\sin x=\frac{2t}{1-t^2}$$ and $$\cos x=\frac{1-t^2}{1+t^2},$$ where $t=\tan(x/2).$
