<s>[INST] Find $\int \frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)}dx $ Find $$\int \frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)}dx $$
Any hints please?
Could'nt think of any approach till now...
 [/INST] $$ \frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)} = \frac{x \cos x}{ x \sin x  + \cos x } + \frac{x \sin x}{x \ cos x - \sin x} $$
Why I get this:
$$\frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)}  = \frac{A(x)}{ x \sin x  + \cos x } + \frac{B(x)}{x \ cos x - \sin x} \\\ \implies A(x)( x \cos(x)- \sin(x))+ B(x) (x \sin x + \cos x) = x^2$$
So $ A(x) = ax+b, B(x) = cx + d$.
$(ax+b)(x \cos(x) - \sin(x)) + (cx+d) ( x \sin x + \cos x) = x^2\\\ \implies ax^2 \cos(x) - ax \sin(x) -b\sin(x) + bx \cos(x) + cx ^2 \sin(x) +\\ cx \cos(x) + dx \sin(x) +d \cos(x) = x^2 \implies$
$$ a\cos(x) +c\sin(x) = 1 \tag{1}$$ 
$$d \cos(x) - b\sin(x) = 0 \tag{2}$$
$$ -a\sin(x)+b\cos(x)+c \cos(x)+ d \sin(x) = 0 \tag{3}$$ 
$\forall x \in R$
By $(2)$, $d = b = 0$,By $(1)$ and (3), $\cos(x) = a, c = \sin(x)$ 
</s>