Integrate : $\int \frac{x^2}{(x\cos x -\sin x)(x\sin x +\cos x)}dx$ 
$$\int \frac{x^2}{(x\cos x -\sin x)(x\sin x +\cos x)}\ dx$$

My approach : 
Dividing the denominator by $\cos^2x$ we get $\dfrac{x^2\sec^2x }{(x -\tan x)(x\tan x +1)}$ then
$$\int \frac{x^2\sec^2x}{x^2\tan x -x\tan^2x+x-\tan x}\ dx=\int \frac{x^2(1+\tan^2x)}{x^2\tan x -x\tan^2x+x-\tan x}dx$$
But I am not getting any relation between numerator and denominator so that I will take any substitution and solve further please suggest whether it is correct and how to proceed in this. Thanks.

$\bf{My\; Solution::\; }$Let $\displaystyle I = \int\frac{x^2}{(x\sin x+\cos x)\cdot (x\cos x-\sin x)}dx$
Let $x=\tan \theta\;,$ Then $dx = \sec^2 \theta d\theta.\;\; $ Then  $$I = \displaystyle \int \frac{\tan^2 \theta\cdot \sec^2 \theta }{(\tan \theta\cdot \sin(\tan \theta)+\cos(\tan \theta) )\times (\tan \theta\cdot \cos(\tan \theta)-\sin(\tan \theta) )}d\theta$$
So $$\displaystyle I = \int\frac{\tan^2 \theta\cdot \sec^2 \theta\cdot \cos^2 \theta  }{(\sin  \theta\cdot \sin(\tan \theta)+\cos(\tan \theta)\cdot \cos \theta )\times (\sin \theta\cdot \cos(\tan \theta)-\sin(\tan \theta)\cdot \cos \theta )}d\theta$$
So $$\displaystyle I = \int\frac{2\tan^2 \theta}{2\cos(\theta-\tan \theta)\cdot \sin(\theta-\tan \theta)}d\theta = \int\frac{2\tan^2 \theta}{\sin (2\theta-2\tan \theta)}d\theta$$
Now Let $\displaystyle (2\theta-2\tan \theta) = u\;\;,$ Then $(2-2\sec^2 \theta)d\theta = du\Rightarrow 2\tan^2\theta d\theta = -du$
So $$\displaystyle I = -\int\frac{1}{\sin u}du = -\int \csc u du = -\ln \tan \left(\frac{u}{2}\right)+\mathbb{C}=-\ln \tan \left(\theta -\tan \theta\right)+\mathbb{C}$$
So $$\displaystyle I = \ln\left|\frac{\cos (\theta-\tan \theta)}{\sin (\theta-\tan \theta)}\right|+\mathbb{C} = \ln\left|\frac{\cos \theta \cdot \cos (\tan \theta)+\sin \theta \cdot \sin(\tan \theta)}{\sin \theta \cdot \cos (\tan \theta)-\cos \theta \cdot \sin(\tan \theta)}\right|+\mathbb{C}$$
So $$\displaystyle I = \ln\left|\frac{\sin (\tan \theta)\cdot \tan \theta+\cos(\tan \theta)}{\cos (\tan \theta)\cdot \tan \theta-\sin (\tan \theta)}\right|+\mathbb{C} = \ln \left|\frac{x\sin x+\cos x}{x\cos x-\sin x}\right|+\mathbb{C}$$
So $$\int\frac{x^2}{(x\sin x+\cos x)\cdot (x\cos x-\sin x)}dx=\ln \left|\frac{x\sin x+\cos x}{x\cos x-\sin x}\right|+\mathbb{C}$$
