<s>[INST] 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?
 [/INST] 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}$$
</s>