Basically the question in the title. I'm working through Ahlfors' Complex Analysis book and ran into this question (right at the beginning of the integral section).
My idea was to use the following theorem to show the integral of $log(z)$ is path independent, which would imply in turn that the condition holds only for closed curves $\gamma$:
Theorem: The integral $\int_{\gamma}fdz$ with continuous $f$ depends only on the endpoints of $\gamma$ if and only if $f$ is the derivative of an analytic function in $\Omega$ (where $\Omega$ is the space on which $f$ is defined).
I basically have two questions:
How do I show that $log(z)$ is the the derivative of an analytic function (or is it not and do I have this idea completely wrong)? My idea was to express $log(z)$ as $log(r)+i\theta$ (where $z=re^{i\theta}$), but then I'm not sure how to integrate with respect to these new variables $r, \theta$ rather than $x, y$.
Can I be sure in assuming that an integral that is dependent only on endpoints is equal to $0$ if and only if the curve is closed? I guess once I work out the integral of $log(z)$ specifically in this case, I could work it out on my own, but as I'm not sure quite how to do that, I feel like I am stuck.