# Cauchy principal value integral

Doing numerical integration I encountered the following calculation of the Cauchy principal value of the following integral:

$$\int_0^{\pi/2}d\varphi\frac{1}{\cos(\varphi)-c},$$

with $0<c<1$.

What is the strategy to solve it?

-
You should try $\psi = \tan(\varphi/2)$. See here for related formulas. –  vanna Aug 1 '12 at 18:26

The indefinite integral is elementary, can be found using half-angle substitution: $$\int \frac{\mathrm{d} \varphi}{\cos(\varphi)-c} = \frac{2}{\sqrt{1-c^2}} \operatorname{arctanh}\left(\frac{1+c}{\sqrt{1-c^2}} \tan\frac{\varphi}{2} \right)+C =: F(\varphi)$$ The Cauchy principal value is found as a symmetric limit: $$\operatorname{P.V.} \int_0^\frac{\pi}{2} \frac{\mathrm{d} \varphi}{\cos(\varphi)-c} = \lim_{\epsilon\to 0} \left(F\left(\frac{\pi}{2}\right) - F\left( \arccos(c)+\epsilon\right) + F\left( \arccos(c)-\epsilon\right) - F(0)\right)$$ Easily $$F\left(\frac{\pi}{2}\right) - F(0) = \frac{2}{\sqrt{1-c^2}} \operatorname{arctanh}\left(\sqrt{\frac{1+c}{1-c}}\right) = \frac{2}{\sqrt{1-c^2}} \operatorname{arctanh}\left(\sqrt{\frac{1-c}{1+c}}\right) - \frac{i \pi}{\sqrt{1-c^2}}$$ and, using $\tan\left(\frac{1}{2} \arccos(c)\right) = \sqrt{\frac{1-c}{1+c}}$ $$\lim_{\epsilon\to 0} \left( F\left( \arccos(c)-\epsilon\right) - F\left( \arccos(c)+\epsilon\right) \right) = \frac{2}{\sqrt{1-c^2}} \lim_{\epsilon \to 0} \left( \operatorname{arctanh}\left(1+\frac{\epsilon}{\sqrt{1-c^2}}\right) - \operatorname{arctanh}\left(1-\frac{\epsilon}{\sqrt{1-c^2}}\right) \right) = \frac{i \pi}{\sqrt{1-c^2}}$$ Combining, $$\operatorname{P.V.} \int_0^\frac{\pi}{2} \frac{\mathrm{d} \varphi}{\cos(\varphi)-c} = \frac{2}{\sqrt{1-c^2}} \operatorname{arctanh}\left(\sqrt{\frac{1-c}{1+c}}\right) = \frac{1}{\sqrt{1-c^2}} \log \frac{1+\sqrt{1-c^2}}{c}$$
Thanks a lot! However, how to proceed in case of $$\int_0^{\pi/2}d\varphi\frac{f(\varphi)}{\cos(\varphi)-c},$$ where $f(\varphi)$ has no divergencies? –  pawel_winzig Aug 1 '12 at 20:56
The problem is that $$f(\varphi)$$ is very complicated, so there is no chance to get the indefinite integral. But I think the trafo $$\psi=\tan(\varphi/2)$$ is helpful. In the end I have to use gsl_integration_qawc. –  pawel_winzig Aug 1 '12 at 21:15