Let $\gamma\colon [0,2\pi]\longrightarrow \mathbb{C}, t\mapsto e^{it}$ be a contour.
I want to compute $\int_\gamma \cos(z)/z^3\mathrm{d}z$ by using the polynomial series for $\cos(z)$.
So I get $$\int_\gamma \sum_{n=0}^\infty (-1)^n \frac{z^{2n-3}}{(2n)!}\mathrm{d}z$$
Hence, by evaluating on the curve: $$\int_{0}^{2\pi}\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} i\exp\big(2it(n-1)\big)\mathrm{d}t$$
I am stuck here.
Hint: integrate your sum term by term. If you want to compute it in a more direct way, write $\cos(z) = \frac{1}{2}\left( e^{iz} + e^{-iz}\right)$ and integrate directly. For yet another way, utilize Cauchy's integral formula.