I have an integral where its limits of integration is from the imaginary axis to the real axis, specifically,
$$\int_{\pi i/2}^\infty \frac{dp}{\sinh(p/2) \sqrt{\cosh(p)}}$$
I want to evaluate this along the contour from $[\pi i/2,0]$ then $[0,\infty]$ (L-shaped contour). However, the integrand has a pole at $p=0$. Is there any way to use the principal value method to evaluate this integral?
If you evaluate func[p]
near the pole from the imaginary axis and from the real axis, you will see that they diverge in the opposite direction (one positive one negative) albeit in different axes. I have tried for example at $p=10^{-4}$.
func[p_] := 1/(Sinh[p/2] Sqrt[Cosh[p]])
func[10^-4 I] // N
0. - 20000. I
func[10^-4] // N
20000.
NIntegrate[func[p], {p, Pi I/2, 0, 100}, Method -> PrincipalValue]
NIntegrate::izero: Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option.
-1.76275 + 3.14159 I
I only know the principal value method if evaluating on the same axes. However I still tried to use NIntegrate
.
NIntegrate[func[ p], {p, I Pi/2, 0 I, Infinity}, Method -> "PrincipalValue"] (*-1.76275 + 3.14159 I*)
$\endgroup$