Our integral is:
$$\int \frac{x^2 +n(n-1)}{(x \sin x + n\cos x)^2} dx$$
I considered that this can be turned into some sort of quotient differential:
$$ d \frac{u}{v} = \frac{ v du - u dv}{v^2}$$
Now, comparing this with our integral:
$$ v = x \sin x + \cos x$$
And,
$$ dv = \sin x + x \cos x - n \sin x = (1-n) \sin x + x \cos x$$
Now the problem is I can't figure out $u$ / make the numerator of the form $ vdu - u dv$... what do I do next?