I am trying to solve this integration $$\int_{0}^{\pi} e^{cos(\theta)} \tan^{3}(\theta)d\theta$$
putting $$z=e^{i\theta}$$ $$\int_{\gamma} e^{(\frac{z^{2}+1}{2z})}\frac{{(z^{2}-1)}^3}{z(z-i)^{3}(z+i)^{3}}d\theta$$
I tried to solve the expression like this $$=\pi i[\frac{1}{2!}\lim_{z \to i} \frac{d^2}{dz^2}(z-i)^3f_{2}(z)+\frac{1}{2!}\lim_{z \to -i} \frac{d^2}{dz^2}(z+i)^3f_{2}(z)]$$ where $$f_{2}(z)=e^{(\frac{z^{2}+1}{2z})}\frac{{(z^{2}-1)}^3}{z(z-i)^{3}(z+i)^{3}}$$ If the integrand is symmetric around $\pi$, we change limits from $0$ to $2\pi$. (Answer to my previous question on this Residue theorem:When a singularity on the circle (not inside the circle)). However in this particular scenario integrand is not symmetric about $\pi$. Therefore I have a doubt whether I can derive the third equation as written in the form above. Any help on this is highly appreciated. Thanks