Integration of $\int \frac{x^2+20}{(x \sin x+5 \cos x)^2}dx$ How do we integrate
$$\int \frac{x^2+20}{(x \sin x+5 \cos x)^2}dx$$
Could someone give me some hint for this question?
 A: $\bf{Solution:}$ Using $$\displaystyle (x\cdot \sin x+5\cdot \cos x) = \sqrt{x^2+5^2}\left\{\frac{x}{\sqrt{x^2+5^2}}\cdot \sin x+\frac{5}{\sqrt{x^2+5^2}}\cdot \cos x\right\}$$
$\displaystyle = \sqrt{x^2+25}\cdot \cos\left(x-\phi\right)\;,$ where 
$\displaystyle \sin \phi = \frac{x}{\sqrt{x^2+25}}$ and $\displaystyle \cos \phi = \frac{5}{\sqrt{x^2+25}}$ and $\displaystyle \tan \phi = \frac{x}{5}\Rightarrow \phi = \tan^{-1}\left(\frac{x}{5}\right)$
So Integral is $$\displaystyle = \int \sec^2(x-\phi)\cdot \left(\frac{x^2+20}{x^2+25}\right)dx$$
Now Let $$\displaystyle (x-\phi) = y\Rightarrow \left(x-\tan^{-1}\left(\frac{x}{5}\right)\right)=y\;,$$ Then $\displaystyle \left(\frac{x^2+20}{x^2+5^2}\right)dx = dy$
So Integral is $$\displaystyle \int \sec^2(y)dy = \tan y +\mathcal{C} = \tan\left(x-\tan^{-1}\left(\frac{x}{5}\right)\right)+\mathcal{C}$$
So $$\displaystyle \int \frac{x^2+20}{(x\cdot \sin x+5\cdot \cos x)^2}dx = \frac{5\cdot \tan x-x}{5+x\cdot \tan x}+\mathcal{C} = \frac{5\sin x-x\cos x}{5\cos x+x\sin x}+\mathcal{C}$$
A: \begin{align}
I=\int\frac{x^2+20}{(x\sin x+5\cos x)^2}dx&=\int\frac{x^2+20}{(x^2+5^2)(\frac{x}{\sqrt{x^2+5^2}}\sin x+\frac{5}{\sqrt{x^2+5^2}}\cos x)^2}dx\\
&=\int\frac{\left(1-\frac{5}{x^2+5^2}\right)dx}{\cos ^2\left(x-\arctan (\frac{x}{5})\right)}\\
&=\int\frac{d\left(x-\arctan\left(\frac{x}{5}\right)\right)}{\cos ^2\left(x-\arctan (\frac{x}{5})\right)}\\
&=\tan \left(x-\arctan (\frac{x}{5})\right)+C
\end{align}
A: Let $$I = \int\frac{x^2+20}{(x\sin x+5 \cos x)^2}dx$$
Divide both $\bf{N_{r}}$ and $\bf{D_{r}}$ by $x^{2\times 5-2} = x^8$
So $$I = \int\frac{x^8(x^2+20)}{x^8(x\sin x+5\cos x)^2}dx = \int\frac{x^8(x^2+20)}{(x^5\sin x+5x^4\cos x)^2}dx$$
Now put $x^5\sin x+5x^4 \cos x=t\;,$ Then $x^3\cos x(x^2+20)dx=dt$
So $$I = \int x^5 \sec x \cdot \frac{x^2+20}{(x\sin x+5\cos x)^2}dx$$ (Using Integration by parts )
So $$I = -\frac{x^5\sec x}{x^5\sin x+5x^4\cos x}+\int \frac{x^5 \sec x\tan x+5x^4\sec x}{x^5\sin x+5x^4\cos x}dx$$
So $$I = -\frac{x^5\sec x}{x^5\sin x+5x^4\cos x}+\int \sec^2 x \cdot \frac{x^5\sin x+5x^4\cos x}{x^5\sin x+5x^4\cos x}dx$$
So $$I = -\frac{x^5\sec x}{x^5\sin x+5x^4\cos x}+\tan x+\mathcal{C}=\frac{5\sin x-x\cos x}{x\sin x+5\cos x}+\mathcal{C}$$
