# Contour integration for inverse cosine

I wanna calculate the integral $$\int_0^\infty \mathrm d q \frac{1}{\cos ka -\cos qa}.$$ I think this problem can be solved by using the contour integration, but I don't really have a good idea on how to manipulate the integrand. Any comment would be appreciated!

• The integrand has infinitely many non-integrable singularities, and does not decay at all as $q \to \infty$ because it is periodic. The only sensible answer is "undefined". – Robert Israel Jul 6 '17 at 7:22
• What if I want to calculate the principal value of this integral? Can I obtain a finite value? – Ren-Bo Wang Jul 6 '17 at 12:41
• For any finite $R$, the principal value of the integral for $0$ to $R$ will exist. The limit of that as $R \to \infty$ will not exist. – Robert Israel Jul 6 '17 at 15:47