We would like to derive the Cauchy-Riemann conditions (CRC) in cartesian and polar coordinates. They follow from requiring that derivative of a function to be the same when evaluated in different directions. We can start from the basic definition of the derivation operation.
Defining the complex derivative
Consider a function \(f\) defined on the complex plane as \(f(z)\) with \(z=x+iy\). The derivative of a function is defined by perturbing its argument by a small amount and computing the change in the function. In the case of complex variables, we can move \(z\) to \(z+\Delta z\), as illustrated in Fig. 1.The complex derivative is defined just like in the case of familiar derivative: \[\begin{equation} \frac{df(z)}{dz}\equiv\lim_{\Delta z\rightarrow 0} \frac{f(z+\Delta z)-f(z)}{\Delta z}. \tag{1} \end{equation}\]
CRC in Cartesian coordinates
However, note that we are free to perturb the point as we wish. We can move it only vertically, that is \(\Delta z=i\Delta y\), or only horizontally , \(\Delta z=\Delta x\), or with any combination of these two. We require that the derivative is the same no matter how we move the point, and that is a strong requirement! In order to simplify the notation, let us split \(f(z)\) into its real and imaginary parts: \[\begin{equation} f(z)\equiv u(x,y)+iv(x,y) \tag{2}. \end{equation}\] Let us first calculate the derivative when we move the point horizontally: \(\Delta y=0\) and \(\Delta z=\Delta x\): \[\begin{equation} \frac{df(z)}{dz}=\lim_{\Delta x\rightarrow 0} \frac{f(z+\Delta x)-f(z)}{\Delta x} =\lim_{\Delta x\rightarrow 0} \frac{u(x+\Delta x,y)+iv(x+\Delta x,y) -u(x,y)-iv(x,y)}{\Delta x}=\frac{\partial u}{\partial x}+i\frac{\partial v}{\partial x}. \tag{3} \end{equation}\]
Secondly, we move the point vertically: \(\Delta x=0\) and \(\Delta z=i \Delta y\): \[\begin{equation} \frac{df(z)}{dz}=\lim_{ \Delta y\rightarrow 0} \frac{f(z+i \Delta y)-f(z)}{i \Delta y} =\lim_{\Delta y\rightarrow 0} \frac{u(x,y +\Delta y)+iv(x,y+\Delta y) -u(x,y)-iv(x,y)}{i \Delta y}=-i \frac{\partial u}{\partial y}+\frac{\partial v}{\partial y}. \tag{4} \end{equation}\] We want the results in Eqs. (3) and (4) to be the same which requires:
\[\begin{equation} \frac{\partial u}{\partial x}=\frac{\partial v}{\partial y}\quad \text{and} \quad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}. \tag{5} \end{equation}\] Equations in (5) is known as Cauchy-Riemann equations, named after A. L. Cauchy who discovered them and G. F. B. Riemann who made them fundamental in the theory of functions of complex variables.
CRC in polar coordinates
We can convert Eq. (5) to polar coordinates simply by changing the variables from \((x,y)\) to \((r,\theta)=\left(\sqrt{x^2+y^2},\arctan(y/x)\right)\). Consider the following: \[\begin{eqnarray} \frac{\partial u}{\partial x}&=&\frac{\partial u}{\partial r}\frac{\partial r}{\partial x}+\frac{\partial u}{\partial \theta}\frac{\partial \theta}{\partial x}=\frac{\partial u}{\partial r}\cos\theta-\frac{\partial u}{\partial \theta}\frac{\sin\theta}{r},\nonumber\\ \frac{\partial v}{\partial y}&=& \frac{\partial v}{\partial r}\frac{\partial r}{\partial y}+\frac{\partial v}{\partial \theta}\frac{\partial \theta}{\partial y} =\frac{\partial v}{\partial r}\sin\theta+\frac{\partial v}{\partial \theta}\frac{\cos \theta}{r} \tag{6} \end{eqnarray}\]
Since \(\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y}\), we need \[\begin{eqnarray} \frac{\partial u}{\partial r}\cos\theta-\frac{\partial u}{\partial \theta}\frac{\sin\theta}{r} =\frac{\partial v}{\partial r}\sin\theta+\frac{\partial v}{\partial \theta}\frac{\cos \theta}{r}. \tag{7} \end{eqnarray}\]
Similarly: \[\begin{eqnarray} \frac{\partial u}{\partial y}&=&\frac{\partial u}{\partial r}\frac{\partial r}{\partial y}+\frac{\partial u}{\partial \theta}\frac{\partial \theta}{\partial y}=\frac{\partial u}{\partial r}\sin\theta+\frac{\partial u}{\partial \theta}\frac{\cos\theta}{r},\nonumber\\ \frac{\partial v}{\partial x}&=& \frac{\partial v}{\partial r}\frac{\partial r}{\partial x}+\frac{\partial v}{\partial \theta}\frac{\partial \theta}{\partial x} =\frac{\partial v}{\partial r}\cos\theta-\frac{\partial v}{\partial \theta}\frac{\sin \theta}{r} \tag{8} \end{eqnarray}\]
Since \(\frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}\), we need \[\begin{eqnarray} \frac{\partial u}{\partial r}\sin\theta+\frac{\partial u}{\partial \theta}\frac{\cos\theta}{r} =-\frac{\partial v}{\partial r}\cos\theta+\frac{\partial v}{\partial \theta}\frac{\sin \theta}{r}. \tag{9} \end{eqnarray}\] Multiplying Eq. (7) with \(-\sin\theta\) and Eq. (9) with \(-\cos\theta\) and adding up gives \[\begin{eqnarray} \frac{1}{r}\frac{\partial u}{\partial \theta}=-\frac{\partial v}{\partial r}. \tag{10} \end{eqnarray}\]
Multiplying Eq. (7) with \(\cos\theta\) and Eq. (9) with \(\sin\theta\) and adding up gives \[\begin{eqnarray} \frac{1}{r}\frac{\partial v}{\partial \theta}=\frac{\partial u}{\partial r}. \tag{11} \end{eqnarray}\] Although it was fun to go through the computation related to the change of variables, we could have avoided that altogether if we started from scratch in the polar coordinates and define \(z=re^{i\theta}\) and \(\Delta z=\Delta r\, e^{i\theta}+ir \Delta \theta\, e^{i\theta}\). We can then go through the same exercise of moving the point radially first, and then in the angular direction with the requirement that the results should be the same. This will also result in the Cauchy-Riemann equations in polar coordinates.