Tricky integral in a complex plane How to integrate using residues:
$$\oint\limits_{|z|=2}\frac{1}{(z^6-1)(z-3)} dz $$
if the idea probably requires to change the sum of 6 residues to aditive inverse of residue at infinity.
I believe that the sum of 6 residues is:
$$2 \pi i\sum_{i=1}^6 Res_i \frac{1}{(z^6-1)(z-3)}=-2\pi i(Res_\inf \frac {1}{(z^6-1)(z-3)}+Res_3 \frac {1}{(z^6-1)(z-3)})$$
because $${3>|z|=2, \infty>|z|=2.}$$
Since $$\frac {1}{(z^6-1)(z-3)} = \frac {1}{(z^7)(1-\frac{1}{z^6})(1-\frac {3}{z})} = \frac {1}{z^7}+ \frac {3}{z^8}+ ...$$
$$=> -2\pi iRes_\inf \frac {1}{(z^6-1)(z-3)}=0$$
 A: One way is, as you say, to use the residue at infinity. Since substituting $\frac1z$ for $z$ yields a function that goes with $z^7$ at the origin, the residue at infinity is $0$, so the integral is the negative of the residue at $3$. Another way to see this is to note that for a simple product of linear factors in the denominator like this, the residues add to $0$, so the residue of the one pole outside the circle must be the negative of the sum of the residues inside the circle. In either case, the integral comes out as $-2\pi\mathrm i\cdot\frac1{3^6-1}=-2\pi\mathrm i\cdot\frac1{728}$.
A: Thank you for adding your work. Expanding on my comment: for $|z|\ge R\gt3$, we have
$$
\begin{align}
\left|\frac1{\left(z^6-1\right)(z-3)}\right|
&\le\frac1{|z|^7}\frac1{\left(1-\frac1{|z|^6}\right)\left(1-\frac3{|z|}\right)}\tag{1a}\\
&\le\frac{\frac{R^6}{R^6-1}\frac{R}{R-3}}{|z|^7}\tag{1b}
\end{align}
$$
For $R=7$, $\frac{R^6}{R^6-1}\frac{R}{R-3}\lt2$. Therefore, for $|z|\ge7$, we have
$$
\left|\frac1{\left(z^6-1\right)(z-3)}\right|\le\frac2{|z|^7}\tag2
$$
Thus, for $R\ge7$, the absolute value of the sum of the residues at all $7$ poles is
$$
\left|\frac1{2\pi i}\int_{|z|=R}\frac{\mathrm{d}z}{\left(z^6-1\right)(z-3)}\right|\le\frac2{R^6}\tag3
$$
That is, the sum of the residues at all $7$ poles is $0$.
The residue at $z=3$ is $\frac1{3^6-1}$. The integral around $|z|=2$ contains all the residues except at $z=3$, thus the sum of the residues inside $|z|=2$ is $-\frac1{728}$.
Therefore,
$$
\int_{|z|=2}\frac{\mathrm{d}z}{\left(z^6-1\right)(z-3)}=-\frac{\pi i}{364}\tag4
$$
A: $$Res_{\infty}f(z)=Res_{z=0}-\frac{1}{z^2}f(\frac1z)=Res_{z=0}\frac{z^5}{(z^6-1)(1-3z)}=0$$
$$Res_{z=3}f(z)=Res_{z=3}\frac{1}{(z^6-1)(z-3)}=\left.\frac{1}{z^6-1}\right\rvert_{z=3}=\frac{1}{728}.$$
$$I=-2\pi i(Res_{\infty}f(z)+Res_{z=3}f(z))=-\frac{\pi i}{364}.$$
