# Calculating all possible values of complex integral

Calculate all possible values of

$$\int_\gamma \frac{\cos(z+1)}{z(z+100i)}dz$$ where $\gamma$ is a simple closed curve in C, oriented counter clockwise.

Solution:

The function $\frac{\cos(z+1)}{z(z+100i)}$ has two singularities. $z=0,z=-100i$

1. The first possibility is that neither singularity is inside $\gamma$. By Cauchy's Theorem, the integral in this case = 0.
2. The second possibility is that $\gamma$ contains exactly one singularity. By choosing simple closed curves around the singularities $z=0, z=-100i$ and applying Cauchy's Integral Formula I found the values of the integral to be $\frac{\pi \cos(1)}{50}$ and $-\frac{\pi \cos(1-100i)}{50}$ respectively.
3. The last possibility is that $\gamma$ contains both singularities. This integral is equal to the sum of the integrals in part $2$.

Is that all correct? Do my values in part $2$ look right?

I'll write down the OP's own solution to rescue this question from Unanswered Questions' monster's claws:

Since the singularities of the function $\,\displaystyle{f(z):=\frac{\cos(z+1)}{z(z+100i)}}\,$ are the simple poles $\,z=0\,\,,\,z=-100i\,$, and assuming $\gamma\,$ doesn't pass through any of these poles, we have that $$I_\gamma:=\oint_\gamma f(z)\,dz=2\pi i\left[Res_{z=0}(f)+Res_{z=-100i}(f)\right]\,\,\,,\,\,\text{and since}$$\begin{align} Res_{z=0}(f)=&\lim_{z\to 0}\,\,zf(z)=\frac{\cos 1}{100i};\\ Res_{z=-100i}(f)=&\lim_{z\to -100i}\,\,(z+100i)f(z)=\frac{\cos (1-100i)}{(-100i)}\,\,,\,\,\text{so }:\end{align}

$(1)\,\,$ if the domain enclosed by $\,\gamma\,\,,\text{namely}\,\,int(\gamma)\, ,$ doesn't contain any of the two poles

$\;\;\;\;\;\;\;$of $\,f\,$ then $\,I_\gamma=0$;

$(2)\,\,$ if $int(\gamma)\,$ contains only $\,z=0\,$ , then $\,\displaystyle{I_\gamma=2\pi i\,Res_{z=0}(f)=\frac{\pi\cos 1}{50}}$;

$(3)\,\,$ if $\,int(\gamma)\,$ contains only $\,z=-100i\,$ , then $\,\displaystyle{I_\gamma=2\pi i\,Res_{z=-100i}(f)=-\frac{\pi\cos(1-100i)}{50}}$;

$(4)\,\,$ if $int(\gamma)\,$ contains both poles then

$\;\;\;\;\;$ $\,\displaystyle{I_\gamma=2\pi i\left[Res_{z=0}(f)+Res_{z=-100i}(f)\right]=\frac{\pi\left[\cos 1-\cos(1-100i)\right]}{50}}$