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?


Solution 1:

$\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}$$

Solution 2:

\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}