How many methods to tackle the integral $\int_{0}^{\frac{\pi}{4}} \frac{\sin x+\cos x}{9+16 \sin 2 x} d x ?$ $ \text{We are going to evaluate the integral}$
$\displaystyle \int_{0}^{\frac{\pi}{4}} \frac{\sin x+\cos x}{9+16 \sin 2 x} d x \tag*{} \\$
by letting $ y=\frac{\pi}{4}-x. $ Then
$$\begin{aligned} \displaystyle \int_{0}^{\frac{\pi}{4}} \frac{\sin x+\cos x}{9+16 \sin 2 x} d x \displaystyle &=\int_{\frac{\pi}{4}}^{0} \frac{\sin \left(\frac{\pi}{4}-y\right)+\cos \left(\frac{\pi}{4}-y\right)}{9+16 \sin 2\left[(\frac{\pi}{4}-y)\right]}(-d y) \\
\displaystyle &=\int_{0}^{\frac{\pi}{4}} \frac{\frac{1}{\sqrt{2}}(\cos y-\sin y)+\frac{1}{\sqrt{2}}(\cos y+\sin y)}{9+16 \cos 2 y} d y \\
\displaystyle &=\sqrt{2} \int_{0}^{\frac{\pi}{4}} \frac{\cos y}{9+16\left(1-2 \sin ^{2} y\right)} d y \\
\displaystyle &=\sqrt{2} \int_{0}^{\frac{1}{\sqrt 2} } \frac{d z}{25-32 z^{2}} \text { , where } z=\sin y\\
\displaystyle &=\frac{\sqrt{2}}{10} \int_{0}^{\frac{1}{\sqrt 2} }\left(\frac{1}{5-4 \sqrt{2}z}+\frac{1}{5+4 \sqrt{2} z}\right) d z \\
\displaystyle &=\frac{\sqrt{2}}{10(4 \sqrt{2})}\left[\ln \left|\frac{5+4 \sqrt{2} z}{5-4 \sqrt{2} z}\right|\right]_{0}^{\frac{1}{\sqrt 2} } \\
\displaystyle &=\frac{1}{40}\ln 9 \end{aligned}$$

Using the famous tangent half-angle substitution,
$$I=\int \frac{\sin (x)+\cos (x)}{9+16 \sin (2 x)}\,dx=\int \frac{-2 t^2+4 t+2}{9 t^4-64 t^3+18 t^2+64 t+9}\,dt$$
$$\frac{-2 t^2+4 t+2}{9 t^4-64 t^3+18 t^2+64 t+9}=\frac{-2 t^2+4 t+2}{\left(t^2-8 t+9\right) \left(9 t^2+8 t+1\right)}=$$
$$\frac{4-t}{20 \left(t^2-8 t+9\right)}+\frac{9 t+4}{20 \left(9 t^2+8 t+1\right)}$$
$$I=\frac{1}{40} \log \left(\left|\frac{9 t^2+8 t+1}{t^2-8 t+9}\right|\right)=\frac{1}{40} \log \left(\left|\frac{5-4 \cos (x)+4 \sin (x)}{5+4 \cos (x)-4 \sin
   (x)}\right|\right)$$  Plug your numbers.
