<s>[INST] Evaluation of $ \int_{-k}^{k}\frac{1}{\sqrt{\cos x-\cos k}}dx$ Evaluation of $$\displaystyle \int_{-k}^{k}\frac{1}{\sqrt{\cos x-\cos k}}dx\;,$$ 
$\bf{My\; Try::}$ Let $$\displaystyle I = \int_{-k}^{k}\frac{1}{\sqrt{\cos x-\cos k}}dx = 2\int_{0}^{k}\frac{1}{\sqrt{\cos x-\cos k}}dx$$
Now Substiute $$\displaystyle \cos x = \frac{1-\tan^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}}\;,$$ So we get $$\displaystyle I = 2\int_{0}^{k}\frac{\sec \frac{x}{2}}{\sqrt{1-\tan^2 \frac{x}{2}-\cos k(1+\tan^2 \frac{x}{2})}}dx$$
So we get $$\displaystyle I = 2\int_{0}^{k}\frac{\sec \frac{x}{2}}{\sqrt{(1-\cos k)-(1+\cos k)\tan^2\frac{x}{2}}}dx = 2\int_{0}^{k}\frac{\sec \frac{x}{2}}{\sqrt{2\sin^2\frac{k}{2}-2\cos^2 \frac{k}{2}\tan^2 \frac{x}{2}}}dx$$
Now How can I solve after that, Help me
Thanks 
 [/INST] I am trying to continue from your method but before that let me post my method:
use substitution $$\sqrt{cosx-cosk}=t$$ so $$\frac{dx}{\sqrt{cosx-cosk}}=\frac{-2dt}{sinx}=\frac{-2dt}{\sqrt{1-(t^2+cosk)^2}}=\frac{-2dt}{\sqrt{1-(t^2+cosk)}\sqrt{1+(t^2+cosk)}}=\frac{-2dt}{\sqrt{2sin^2\frac{k}{2}-t^2}\sqrt{2cos^2\frac{k}{2}+t^2}}$$
if we let $a=\sqrt{2}sin\frac{k}{2}$ and $b=\sqrt{2}cos\frac{k}{2}$ we have
$$I=\int\frac{-2dt}{\sqrt{a^2-t^2}\sqrt{b^2+t^2}}$$ which wolfram gives as

</s>