# Integration of $\frac{1}{1-\cos(\alpha)\cos x }$

Integration of $$\dfrac{1}{1-\cos(\alpha)\cos x }$$ w.r.t $$x$$

How to do this problem? I was trying to reduce it $$\dfrac{1}{1-\cos(\alpha)\cos (x) }=\dfrac{\sec (\alpha)}{\sec (\alpha)-\cos (x) }$$. But I can't put it in shape.

$$\dfrac{1}{1-\cos(\alpha)\cos (x) }=\dfrac{1}{1-\cos (\alpha)\frac{1-\tan^2 (x/2)}{1+tan^2(x/2)}}=\dfrac{\sec^2(x/2)}{1+\tan^2(x/2)-\cos(\alpha)+\cos(\alpha)\tan^2(x/2) }$$. Now taking $$\tan(x/2)=z$$ we are done.
Hint: Substitute $$u=\tan\left(\frac{u}{2}\right)$$ then you will have $$du=\frac{1}{2}\sec^2\left(\frac{x}{2}\right)dx$$ For your work: A possible result should be $$2 \csc (\alpha ) \tan ^{-1}\left(\sin \left(\frac{x}{2}-\frac{\alpha }{2}\right) \csc \left(\frac{\alpha }{2}+\frac{x}{2}\right)\right)+C$$