In an exercise, it's given that $C$ is a circle such that $|z-2|=3$
Now I know that, a circle with radius $r$ can be represented by $z=re^{i\theta}$, hence, $$ z-2=3e^{i\theta} \implies z=2+3e^{i\theta} \implies dz=3ie^{i\theta}d\theta $$ Also $$z^2=(2+3e^{i\theta})^2 \implies z^2=4+9e^{2i\theta}+12e^{i\theta}$$
Now $ f(z)=z-z^2=-(2+9e^{i\theta}+9e^{2i\theta})$
So,
$$
\int_c(z-z^2)dz=\int_0^{2π}-(2+9e^{i\theta}+9e^{2i\theta})3ie^{i\theta}d\theta
\tag{1}
$$
We can write
$e^{i\theta}=(\cos\theta+i\sin\theta)$
On solving (1) I am getting 0 whereas the answer given is 30
Any and all help is appreciated
By Cauchy's Integral Theorem, integral of an analytic function over any closed contour is zero.