Show that the function $f(z)=\frac{1-\cos z}{z^n}$ has no anti-derivative on $\mathbb C\setminus\{0\}$ if $n$ is a positive odd integer.
I think, If we can able to prove $\int_S f(z) dz \neq 0$, on the unit circle $S$, then by fundamental theorem of algebra gives the desired one. But, how can I use the definition $\int_\gamma f(z)dz=\int_a^b f(\gamma(t))\gamma'(t)dt$ for a continuous function $f(z)$ on a piecewise smooth contour $\gamma:=\gamma(t),~a \leq \gamma \leq b$ ?
Let $g(z)=1-\cos z$. Then\begin{align}\int_Sf(z)\,\mathrm dz&=\int_S\frac{g(z)}{z^n}\,\mathrm dz\\&=2\pi i\frac{g^{(n-1)}(0)}{(n-1)!}\end{align}which is $0$ if and only if $n$ is even.