Prove $$ \int_0^\theta\frac{\sin\theta\cos x}{(1-\cos\theta\cos x)^2}dx=\csc^2\theta+\frac{\pi}{2}\cot\theta\csc\theta $$
$$ \int_0^\theta\frac{\sin\theta\cos x}{(1-\cos\theta\cos x)^2}dx=-\frac{\sin\theta}{\cos\theta}\int_0^\theta\frac{-\cos\theta\cos x+1-1}{(1-\cos\theta\cos x)^2}dx\\ =-\tan\theta\int_0^\theta\bigg[\frac{1}{1-\cos\theta\cos x}-\frac{1}{(1-\cos\theta\cos x)^2}\bigg]dx\\ $$
How do I solve it ?. Can I use Leibniz rule here ?
Thanks @Peter Foreman
$$ \int_0^\theta\frac{\sin\theta\cos x}{(1-\cos\theta\cos x)^2}dx=-\tan\theta\int_0^\theta\Bigg[\frac{1}{1-\cos\theta.\dfrac{1-\tan^2\frac{x}{2}}{1+\tan^2\frac{x}{2}}}-\frac{1}{\bigg(1-\cos\theta.\dfrac{1-\tan^2\frac{x}{2}}{1+\tan^2\frac{x}{2}}\bigg)^2}\Bigg]dx\\ =-\tan\theta\int_0^\theta\Bigg[\frac{\sec^2\frac{x}{2}}{1-\cos\theta+\tan^2\frac{x}{2}[1+\cos\theta]}+\frac{(1+\tan^2\frac{x}{2})\sec^2\frac{x}{2}}{\bigg(1-\cos\theta+\tan^2\frac{x}{2}[1+\cos\theta]\bigg)^2}\Bigg]dx $$ Set $t=\tan\frac{x}{2}\implies dt=\frac{1}{2}\sec^2\frac{x}{2}dx$ $$ I_1=-\tan\theta\int_0^{\tan\frac{\theta}{2}}\frac{2dt}{1+t^2-\cos\theta[1-t^2]} $$