how to show the principal branch of log(z) equal to an integral Show that the principal branch of the log function can be described by the formula $log(z)=\int_1^z \frac{1}{w} dw$ for $z \not \in (-\infty,0]$. 
Thank you everyone in advance. Any help is appreciated. 
 A: Write $z=re^{i\theta}$, where $\vert\theta\vert<\pi$ (so that we do not pass through the deleted ray). 
Then $\log z=\log r+i\theta$ is the principal branch of the logarithm. One has
$$\log z=\log r+i\theta = \log r + \int_0^\theta \frac{ire^{it}}{re^{it}}dt=\int_1^r \frac{1}{w}\,dw+\int_\gamma \frac{1}{w}dw$$
where $\gamma$ is the arc from $r$ to $z$. Now this yields a path integration from $1$ to $\vert z\vert$ on the real line and then along the arc to $z$. But by Cauchy's Theorem on a simply connected domain (since $\log z$ is holomorphic in the complex plane with the deleted ray, and the complex plane with the deleted ray is simply connected), one has (where the integral from $z$ to $1$ means integration over any arbitrary curve from $z$ to $1$ that does not pass through the deleted ray)
$$\int_1^r\frac{1}{w}dw+\int_\gamma\frac{1}{w}dw+\int_z^1\frac{1}{w}dw=0$$
Hence, reversing the orientation on the curve from $z$ to $1$, we have
$$\int_1^r\frac{1}{w}dw+\int_\gamma\frac{1}{w}dw=\int_1^z\frac{1}{w}dw$$
A: Hint 1: Consider the derivative of both $\log(z)$ and $\displaystyle\int_1^{\large z}\frac{\mathrm{d}w}{w}$
Hint 2: Use Cauchy's Integral Theorem to show that this integral does not depend on the path from $1$ to $z$ as long as the path does not cross $(-\infty,0]$.
A: I think I found an answer to my own question. It is pretty much an one-liner if one just applies the FTC for complex number. 
