Question on calculating $\int_{\partial B_{3/2}(1)} \frac{z^7 + 1}{z^2(z^4 + 1)}dz$ My task is to calculate $$\int_{\partial B_{3/2}(1)} \frac{z^7 + 1}{z^2(z^4 + 1)}dz$$ using the Cauchy integral formula. My question is: Is there a simple trick or do I have to perform a partial fraction decomposition?
 A: A partial fraction decomposition is not necessary. 
The function
\begin{align*}
f(z)=\frac{z^7 + 1}{z^2(z^4 + 1)}
\end{align*}
has a double pole at $z=0$ and simple poles at
$z\in\left\{e^{\frac{\pi i}{4}},e^{-\frac{\pi i}{4}},e^{\frac{3\pi i}{4}},e^{-\frac{3\pi i}{4}}\right\}$. The contour of integration $\partial B_{3/2}(1)$ is a circle with center $(1,0)$ and radius $\frac{3}{2}$. It encloses precisely the poles at
$0,e^{\frac{\pi i}{4}},e^{-\frac{\pi i}{4}}$.

We obtain
  \begin{align*}
\int_{\partial B_{3/2}(1)} \frac{z^7 + 1}{z^2(z^4 + 1)}dz&=\int_{\partial B_{3/2}(1)}f(z)dz\\
&=2\pi i\left(\operatorname{res}\left(f,0\right)
+\operatorname{res}\left(f,e^{\frac{3\pi i}{4}}\right)
+\operatorname{res}\left(f,e^{-\frac{\pi i}{4}}\right)\right)\\
&=2\pi i\left(0+\frac{1}{4}\left(e^{\frac{3\pi i}{4}}+i\right)+\frac{1}{4}\left(-e^{\frac{\pi i}{4}}-i\right)\right)\\
&=2\pi i\left(-\frac{1}{2\sqrt{2}}\right)\\
&=-\frac{\pi i}{\sqrt{2}}
\end{align*}

A: Yes there is a trick you don't have to use partial fraction decomposition
Note that the degree of nomenator is higher than the degree of the denomenator. 
We use partial fraction usually when the degree of the nomenator is lower than the degree of the 
denomenator.
I prefer solving this using another method than using partial fraction .
I wll denote $|z-1|=\frac{3}{2}$ as $C$
The  trick is to devide the circle to three parts $C_1$ and $C_2$ and $C_3$
Where $0$ is inside $C_1$ and $e^{\frac{\pi i}{4}}$ is inside $C_2$ and $e^{\frac{-\pi i}{4}}$ is inside $C_3$
\begin{align*}
\int_{C} \frac{z^7 + 1}{z^2(z^4 + 1)}dz&=\int_{C}\frac{z^7 + 1}{z^2(z^4 + 1)}dz + 0\ \\
&=\int_{C} \frac{z^7 + 1}{z^2(z^4 + 1)}dz \ + \ \int_{\gamma} \frac{z^7 + 1}{z^2(z^4 + 1)}dz \ + \int_{-\gamma} \frac{z^7 + 1}{z^2(z^4 + 1)}dz\\
&+\int_{\beta} \frac{z^7 + 1}{z^2(z^4 + 1)}dz \ + \ \int_{-\beta}  \frac{z^7 + 1}{z^2(z^4 + 1)}dz \\
&=\int_{C_1} \frac{z^7 + 1}{z^2(z^4 + 1)}dz \ + \ \int_{C_2} \frac{z^7 + 1}{z^2(z^4 + 1)}dz \ + \ \int_{C_3} \frac{z^7 + 1}{z^2(z^4 + 1)}dz \\
\end{align*}
Now you can apply Cauchy integral formula For $C_1$
$$\int_{C_1} \frac{f}{z^2}dz = 2\pi i f(0)$$
Where $f=\frac{z^7 + 1}{(z^4 + 1)}$
And for $C_2$
$$\int_{C_2} \frac{f}{(z-e^{\frac{\pi i}{4}})}dz = 2\pi i f(e^{\frac{\pi i}{4}})$$
Wher $f=\frac{z^7 + 1}{z^2(z-e^{\frac{-\pi i}{4}})(z-e^{\frac{3\pi i}{4}})(z-e^{\frac{-3\pi i}{4}})}$
Similarly for $C_3$.
