How do I find the residuals of this problem? 
Find all the singularities in the finite plane and the corresponding residues. Show the details.

$$\frac{8}{1+z^2}$$
I am a bit stuck on this problem:
So I know the residual is going to be the coefficient associated with the first negative exponent in the Laurent series. Why do I have to find both the singularities and the residual? They seem like different questions no?
So the singularities are at $z = i$ because $i^2 = -i$ and that's when the denominator will equal 0.
But how do I find the residuals? So I remember that:
$$\frac{1}{1+z} = 1 - z + z^2 - ...$$
So I now multiply each element by 8:
$$\frac{8}{1+z} = 8(1 - z + z^2 - ...)t$$
But none of these terms have an exponent of -1 so I cannot find the coefficient...
Sigh, what am. I doing wrong?
Next problem, same as above but different function: $$\frac{1}{1-e^z}$$
 A: You can write the following:
$$\frac{8}{1+z^2}=\frac{8}{(z-i)(z+i)}$$
So we have two simple poles, one at $z=i$ and another at $z=-i$. We can then use the following:
$$\text{Res}(f,c)=\lim_{z\rightarrow c}(z-c)f(z)$$
Which gives:
$$\text{Res}(f,i)=\lim_{z\rightarrow i}\frac{8}{z+i}=-4i$$
Similarly we obtain:
$$\text{Res}(f,-i)=4i$$
For $f(z)=\frac{1}{1-e^z}$ we rewrite $e^z$ using eulers formula and obtain:
$$f(z)=\frac{1}{1-e^x(\cos(y)+i\sin(y))}$$
Clearly we have simple poles when $z=2\pi in$ for all $n\in\mathbb{Z}$, and everywhere else the function is well behaved. Taking the limit as before we find:
$$\text{Res}(f,2\pi i n)=\lim_{z\rightarrow 2\pi in}\frac{x+iy-2\pi in}{1-e^x(\cos(y)-i\sin(y)}$$
Setting $x=0$ we obtain:
$$\lim_{y\rightarrow 2\pi n}\frac{iy-2\pi i n}{1-\cos(y)-i\sin(y)}=\lim_{y\rightarrow 2\pi n}\frac{i}{\sin(y)-i\cos(y)}=-1$$
Thus we have that $f(z)$ has simple poles at $z=2\pi i n$ with residues of $-1$.
Note: For higher order poles, you must either look at the laurent series expansion or use the following formula for an $n$th order pole:
$$\text{Res}(f,c)=\frac{1}{(n-1)!}\lim_{z\rightarrow c}\frac{d^{n-1}}{dz^{n-1}}[(z-c)^nf(z)]$$
A: $f(z)=\frac{8}{z^2+1}$ has simple poles at $z=\pm i$
$$\text{Res}(f(z),i)=\underset{z\to i}{\text{lim}}\frac{8 (z-i)}{(z-1) (z+i)}=\frac{8}{2i}=-4i$$
in a similar way can be proved that
$$\text{Res}(f(z),-i)=4i$$

Forgot the second question
$$\frac{z}{1-e^z}=-1+\frac{z}{2}-\frac{z^2}{12}+O\left(z^3\right)$$
the dividing by $z$ we get
$$g(z)=\frac{1}{1-e^z}=-\frac{1}{z}+\frac{1}{2}-\frac{z}{12}+O\left(z^2\right)$$
Therefore
$$\text{Res}(g(z),0)=-1$$
