An intriguing definite integral: $\int_{\pi/4}^{\pi/2} \frac{x^2+8}{(x^2-16)\sin (x) + 8 x \cos(x)} \ dx$ I need some hints, suggestions for the following integral
$$\int_{\pi/4}^{\pi/2} \frac{x^2+8}{(x^2-16)\sin (x) + 8 x \cos(x)} \ dx$$
Since it's a high school problem, I thought of some variable change, integration by parts, but I can't see yet how to make them work. I don't know where I should start from. Thanks!

Let $R\sin A=x^2-16$  and $R\cos A=8x\implies R=x^2+16$  and $\cos A=\frac{8x}{x^2+16}$
So, $(x^2-16)\sin x+8x\cos x$
$=(x^2+16)(\cos A \cos x+\sin A\sin x)$
$=(x^2+16)\cos (x-A)$
$=(x^2+16)\cos(x-\cos^{-1}(\frac{8x}{x^2+16}))$
Putting $y=x-\cos^{-1}(\frac{8x}{x^2+16})$, we get $\frac{dy}{dx}=\frac{x^2+8}{x^+16}$
$$\int\frac{x^2+8}{(x^2-16)\sin (x) + 8 x \cos(x)} \ dx$$
$$=\int\frac{x^2+8}{(x^2-16)\cos(x-\cos^{-1}(\frac{8x}{x^2+16}))} \ dx$$
$$=\int\frac{dy}{\mathrm{cos}y}=\int \sec ydy=\ln|\sec y+ \tan y|+C=\ln\tan (\frac{\pi}{4}+\frac{y}{2})+C$$  where C is  the indeterminate constant for indefinite integral.
Now if $2B=\cos^{-1}(\frac{8x}{x^2+16}),\frac{8x}{x^2+16}=\cos2B$
$=\frac{1-\tan^2B}{1+\tan^2B}\implies \tan^2B=(\frac{4+x}{4-x})^2$
$y=x-2\tan^{-1}(\frac{4+x}{4-x})=x-2(\frac{\pi}{4}+\tan^{-1}(\frac{x}{4})) $
When $x=\frac{\pi}{2}, y=-2\tan^{-1}\frac{\pi}{8}$
When $x=\frac{\pi}{4}, y=-\frac{\pi}{4}-2\tan^{-1}\frac{\pi}{16}$
