Evaluate $∫_γ \frac{z^2+1}{z(z^2+4)} dz$ Where $γ(t)=re^{it}$ with $0≤t≤2π$ for all possible value of $r$, $0Evaluate
$∫_γ \frac{z^2+1}{z(z^2+4)}  dz$
Where $γ(t)=re^{it}$ with $0≤t≤2π$ for all possible value of $r$, $0<r<2$ and $2<r<∞$

Theorem: Let $f: G \to \mathbb C$ be analytic, suppose $B(a,r) \subset G(r>0)$. If $\gamma(T)=a+re^{it}$, $0\leq t \leq 2\pi$ then
$$f(z)=\frac{1}{2\pi i}\int_\gamma\frac{f(w)}{w-z}dw$$

I guess I can use line integral to solve this problem. So first I need to find $\gamma '(t)=ire^{it}$. Plug into the formula, I have
$$\int_\gamma \frac{z^2+1}{z(z^2+4)}  dz= \int _\gamma \frac{3z}{4(z^2+4)}+\frac {1}{4z} dz$$
$$=\int _\gamma \frac{3z}{4(z^2+4)} dz + \int _\gamma\frac {1}{4z} dz$$
$$=\int _0^{2\pi} \frac{3re^{it}}{4(r^2e^{2it}+4)} (ire^{it})dz + \int _0 ^{2\pi}\frac {1}{4re^{it}} (ire^{it})dt$$
$$=\int _0^{2\pi} \frac{3ir^2e^{2it}}{4(r^2e^{2it}+4)} dz + \int _0 ^{2\pi}\frac {i}{4} dt$$
$$=\frac{3i}{4}\int _0^{2\pi} \frac{r^2e^{2it}}{r^2e^{2it}+4} dz + \frac{\pi i}{2}$$
One more thing that concern me is the value of $r$, should I break this into $2$ integral?

From you theorem, you can write
\begin{align}
g(z) &= \int_{\gamma}\frac{z^2+1}{z(z^2+4)}dz\\
& = 2i\pi\biggl[\int_{\gamma}\frac{(z^2+1)/(z^2+4)}{z}dz +\int_{\gamma}\frac{(z^2+1)/(z^2+2zi)}{z-2i}dz+\int_{\gamma}\frac{(z^2+1)/(z^2-2zi)}{z+2i}\biggr]\\
&= 2i\pi [f_1(0)+f_2(2i)+f_3(-2i)]\tag{1}
\end{align}
where $f_1(z) = \frac{z^2+1}{z^2+4}$, $f_2(z) = \frac{z^2+1}{z(z+2i)}$, and $f_3(z) = \frac{z^2+1}{z(z-2i)}$. In order to use equation $(1)$, we need to consider how many poles are in the contours. By Cauchy's theorem, a closed contour that encloses no poles, is equal to zero. Does this help you determine how to evaluate equation $(1)$ in light of $r$? 
For $0<r<2$, only $z=0$ is in the contour. What can we conclude about the second and third integrals? For $r>2$, what poles would be enclosed?
