Evaluate:$$\int_{C} (1 + z + z^2)(e^\frac{1}{z}+e^\frac{1}{z-1}+e^\frac{1}{z-2}) dz $$ where $ C$ is a circle $|z|=3$ and $z \ \epsilon \ \mathbb{C}$
The function that is being integrated has singularities at $0, \ 1, and \ 2$
Therefore I know we must consider the residue.
Only contributions from the $z^{-1}$, $(z-1)^{-1}$, $(z-2)^{-1}$ terms contribute.
$$\oint_C dz \, (1+z+z^2) e^{1/z} = \sum_{k=0}^{\infty} \frac1{k!} \oint_C dz \, (1+z+z^2) \frac1{z^k} = i 2 \pi \left (1+\frac1{2!}+\frac1{3!} \right ) = i \frac{10 \pi}{3}$$
Rewrite the quadratic as
$$z^2+z+1 = (z-1)^2 + 3(z-1) + 3 \implies \\\oint_C dz \, (1+z+z^2) e^{1/(z-1)} = i 2 \pi \left (3+\frac{3}{2!}+\frac1{3!} \right )=i \frac{28 \pi}{3}$$
$$z^2+z+1 = (z-2)^2 + 5(z-1) + 2 \implies \\\oint_C dz \, (1+z+z^2) e^{1/(z-2)} = i 2 \pi \left (2+\frac{5}{2!}+\frac1{3!} \right )=i \frac{28 \pi}{3}$$
The integral is then the sum of these terms, or $i 22 \pi$.