Why is $ \int \frac{\sin x (b-a\cos x)}{(b^2+a^2-2ab \cos x)^{3/2}}\,dx = \frac{a-b\cos x}{b^2 \sqrt{a^2-2ab\cos x + b^2}}$? Why is $$ \int \frac{\sin x (b-a\cos x)}{(b^2+a^2-2ab \cos x)^{3/2}}\,dx = \frac{a-b\cos x}{b^2 \sqrt{a^2-2ab\cos x + b^2}}\text{ ?}$$
Constant of integration omitted.

Hint: $~t=\cos x\iff dt=-\sin x,~$ or $~u=a^2+b^2-2ab\cos x\iff du=2ab\sin x$.
