# Evaluate $\int \frac{x\tan(x) \sec(x)}{(\tan(x)-x)^2}$

Find value of following integral $$\int \frac{x\tan(x) \sec(x)}{(\tan(x)-x)^2}\text{dx}$$

the numerator is $\text{d[sec(x)]}$ but that isnt work due to $x$ in denominator. First we can simplify as $$\int\frac{x\sin(x)}{(\sin(x)-x\cos(x))^2} \text{dx} = \int \frac{x}{(\sin(x)-x\cos(x))} \text{dx}+\int \frac{x^2 \cos(x)}{(\sin(x)-x\cos(x))^2} \text{dx}$$

but again its not manipulative. Suggest a useful substitution or method.

Thanks a lot!

Hint:

For $\displaystyle\int\frac{x\sin(x)dx}{(\sin(x)-x\cos(x))^2}$

$$\dfrac{d(\sin x-x\cos x)}{dx}=\cos x-(\cos x-x\sin x)=?$$

• Ok $u = \sin(x) - x\cos(x)$ should work – jeea Apr 13 '18 at 7:39

Consider the function $f(x) = \frac{1}{(\sin x - x\cos x)}$. Once differentiation gives:

$$f'(x) = \frac{-(\cos x +x\sin x-\cos x)}{(\sin x - x\cos x)^2} = \frac{-x \sin x}{(\sin x - x\cos x)^2}$$

$$\int \frac{x \sin x}{(\sin x - x\cos x)^2} dx = \frac{-1}{(\sin x - x \cos x)}$$