I tried to solve the following contour integral: $$ \oint_\gamma {\frac{{dz}}{{z - c}}} $$ Where $\gamma$ is a disk centered at the origin. In order to do so, I used the following parametrization: $$ \begin{array}{l} z &= Re^{i\varphi }, \qquad 0 < \left| R \right| \ne \left| c \right| \\ dz &= iRe^{i\varphi } d\varphi \end{array} $$ Replacing in the contour integral: $$ \begin{array}{l} \oint_\gamma {\frac{{dz}}{{z - c}}} &= \int\limits_0^{2\pi } {\frac{{iRe^{i\varphi } }}{{Re^{i\varphi } - c}}} d\varphi \\ &= \left. {\ln \left( {Re^{i\varphi } - c} \right)} \right|_0^{2\pi } \\ &= \ln \left( {Re^{i2\pi } - c} \right) - \ln \left( {Re^{i0} - c} \right) \\ &= \ln \left( {R - c} \right) - \ln \left( {R - c} \right) \\ &= 0 \end{array} $$ However, by the residue theorem the contour integral must be equal to $2\pi i$ if $\left| R \right| > \left| c \right|$, whereas in the answer obtained by parametriztion the value is always $0$.
My question is: What am I missing here? Where is my mistake? Thank you in advance.
You are assuming that there is a differentiable function $\ln$ from $\mathbb{C}\setminus \{0\}$ into $\mathbb C$ such that $\ln'(z)=\frac1z$. There isn't.