What if one of the singularity gives infinity to the residue. Consider this contour;
$$X=\int_{\gamma} e^{i(\frac{z^{2}+1}{2z})}\frac{{(z^{2}-1)}^4}{2z^2(z-i)^{3}(z+i)^{3}}dz$$
I have singularities at z=0,i,-i. But when z=0, exponential function goes to infinity. How can this kind of countour be evaluated?
Note: Initial integration is
$$\int_{0}^{\pi} e^{i\cos(\theta)}\frac{\sin^{4}(\theta)}{\cos^{3}(\theta)}d\theta.$$
My attempt to solve this by substituting $cos(\theta)=z$ yields; $$\int_{-1}^{1} e^{iz}\frac{(1-z^2)^{3/2}}{z^3}dz.$$
With change of variable $\theta=t+\frac{\pi}{2}$ $$I=\int_{0}^{\pi} e^{i\cos(\theta)}\frac{\sin^{4}(\theta)}{\cos^{3}(\theta)}d\theta=-\int_{-\pi/2}^{\pi/2} e^{-i\sin(t)}\frac{\cos^{4}(t)}{\sin^{3}(t)}dt$$ $x=\sin(t)$ $$I=-\int_{-1}^{1} e^{-ix}\frac{(1-x^2)^{3/2}}{x^3}dx$$ $$e^{-ix}\frac{(1-x^2)^{3/2}}{x^3}=\frac{1}{x^3}+\frac{i}{x^2}-\frac{2}{x}-\frac{5i}{3}+O(x)$$ The function to be integrated around $x=0$ includes an odd part $\frac{1}{x^3}-\frac{2}{x}$ which integral is finite in the sens of Cauchy principal value.
The function also includes an even part $\frac{i}{x^2}$ which integral is not convergent in terms of Cauchy principal value. So, the whole integral is not convergent, even in the sens of Cauchy principal value. This concerns the imaginary part of the integral, since the non-convergent term $\frac{i}{x^2}$ is imaginary. The real part of the integral is convergent and has a finite Cauchy principal value.
Now, if we consider only the real part, the function to be integrated is odd. So, the result is (in sens of Cauchy principal value) : $$\Re e(I)=-\int_{-1}^{1} \cos(x)\frac{(1-x^2)^{3/2}}{x^3}dx=0$$ The imaginary part of the integral is infinite : $$\Im m(I)=\infty$$