Lets say we have the integral:$$\int_\gamma\frac{1}{z}+z^2dz$$ and we would like to apply the Fundamental Theorem of Calculus here for complex numbers. Now, we let $\gamma$ be any curve connecting $-1+i$ to $2+2i$ such that $Im(z)>0$.
I'm having some trouble using the FTC for this. I wanted to say that we can separate this into two integrals: $$\int_{-1+i}^{2+2i}z^2dz+ \int_\gamma\frac{1}{z}dz.$$ Now we can apply the FTC on the first integral since we know $\frac{d}{dz}(\frac{z^3}{3})=z^2$ and just compute it. For the second integral I'm having trouble. I want to say that the integral equals zero because if we take the branch cut $$-\pi <\arg(z)<\pi$$for $\log|z|+i\arg(z)$ we know that it is the derivative of $\log(z)$ for the given branch cut. I'm not sure how to solve the second integral.
edit: If I take the branch cut $-\frac{3\pi}{2}<\arg(z)<\frac{3\pi}{2}$, would my answer be:
$$\int_{-1+i}^{2+2i}z^2+\frac{1}{z}dz = (\frac{z^3}{3}+\log(z))|_{-1+i}^{2+2i}? $$
edit 2: I was thinking, why can't we apply Cauchy's theorem for the second integral and get 0 because we never actually cross the singularity z=0?
edit 3: I guess from the assumption that we have we don't know if the curve is indeed closed, so now I understand why we can't apply Cauchy's theorem and must use the FTC as I have.