# Complex Analysis/Complex differentiable, holomorphic, Cauchy–Riemann equations
## Open sets in the complex plane

Since the complex numbers $\mathbb {C}$ are nothing but $\mathbb {R} ^{2}$ with a multiplicative structure, the notion of open sets carries over from $\mathbb {R} ^{2}$ to $\mathbb {C}$. Hence, we consider a set $O\subseteq \mathbb {C}$ open if and only if $O$ is open as a subset of $\mathbb {R} ^{2}$ (that is, around each point $z_{0}\in O$ there exists a ball around $z_{0}$ completely contained within $O$) w.r.t. Euclidean norm (or any other norm, due to norm equivalence).

## Complex differentiability

Recall that a function $f:\mathbb {R} \to \mathbb {R}$ is differentiable at $x_{0}$ iff the limit
    $\lim _{h\to 0}{\frac {f(x_{0}+h)-f(x_{0})}{h}}$
exists, and in this case the derivative $f'(x_{0})$ is defined as the value of that limit. By analogy, we infer the analogous definition for functions $f:\mathbb {C} \to \mathbb {C}$:
Definition 2.1:
Let $O\subseteq \mathbb {C}$ be open, and let $f:O\to \mathbb {C}$ be a function. Let $z_{0}\in O$. We say that $f$ is complex differentiable in $z_{0}$ iff
    $\lim _{|h|\to 0}{\frac {f(z_{0}+h)-f(z_{0})}{h}}$,
where this time $h$ is complex, exists, and in this case we write $f'(z_{0})$ as an abbreviation for that limit. If the function is complex differentiable on all its domain of definition (in this case $O$), we say that $f$ is holomorphic.
The derivative is linear in the following sense:
Theorem 2.3:
Since a complex number is a tuple $(x,y)$ in $\mathbb {R} ^{2}$, a map $f:O\to \mathbb {C}$ is tantamount to a map $f:\mathbb {R} ^{2}\supset O\to \mathbb {R} ^{2}$. The complex differentiability of $f$ at a certain point implies its real differentiability, in the sense that the directional derivatives exist. In fact, we will later prove that in case of holomorphy, even continuous differentiability of $f$ (in the sense of existence of partial derivatives) will follow, and hence, we have a Jacobian matrix which equals the differential of $f$. However, the converse is not true: If $f\in {\mathcal {C}}^{1}(O,\mathbb {R} ^{2})$ in the sense of real numbers (that is, considering $f$ as a map $\mathbb {R} ^{2}\to \mathbb {R} ^{2}$: All partial derivatives exist and are continuous), we don't know yet whether $f$ is holomorphic or not. The next section will make that precise.

## The Cauchy–Riemann equations

If $f\in {\mathcal {C}}^{1}$ in the real sense, then there is a precise criterion for when $f$ is complex differentiable. This is given by the Cauchy–Riemann equations:
Theorem 2.3:
Let $f:O\to \mathbb {R} ^{2}$ be continuously differentiable at $(x_{0},y_{0})$, that is, all partial derivatives exist and are continuous, both at $(x_{0},y_{0})$. Then $f$ as a function $O\to \mathbb {C}$ is complex differentiable in $z_{0}:=x_{0}+iy_{0}=(x_{0},y_{0})$ if and only if the Cauchy–Riemann equations, given by
    ${\frac {\partial f_{1}}{\partial x}}={\frac {\partial f_{2}}{\partial y}}$ and ${\frac {\partial f_{1}}{\partial y}}=-{\frac {\partial f_{2}}{\partial x}}$,
are satisfied, where $f=(f_{1},f_{2})=f_{1}+if_{2}$.
Proof:
For the whole proof, note that if $h=(h_{1},h_{2})$, then $|h|=\|h\|=\|(h_{1},h_{2})\|$ for $h\in \mathbb {C}$.
If $f$ is continuously differentiable in $z_{0}=(x_{0},y_{0})$, then
    $f(z_{0}+h)=f((x_{0},y_{0})+(h_{1},h_{2}))=f(z_{0})+J_{f}(z_{0})h+r(h)$, $r(h)\in o(\|h\|)$,
where $r(h)\in o(\|h\|)$ means $\lim _{h\to 0}{\frac {r(h)}{\|h\|}}=0$. Thus, in this case,
    ${\begin{aligned}{\frac {f(z_{0}+h)-f(z_{0})}{h}}&={\frac {J_{f}(z_{0})h+r(h)}{h}}\\&={\frac {h_{1}-ih_{2}}{|h|^{2}}}J_{f}(z_{0})h+{\frac {r(h)}{h}}\\&={\frac {h_{1}-ih_{2}}{\|h\|^{2}}}{\begin{pmatrix}\partial _{x}f_{1}&\partial _{y}f_{1}\\\partial _{x}f_{2}&\partial _{y}f_{2}\end{pmatrix}}{\begin{pmatrix}h_{1}\\h_{2}\end{pmatrix}}+{\frac {r(h)}{h}}\\&={\frac {h_{1}(h_{1}\partial _{x}f_{1}+h_{2}\partial _{y}f_{1})+h_{2}(h_{1}\partial _{x}f_{2}+h_{2}\partial _{y}f_{2})+i\left[h_{1}(h_{1}\partial _{x}f_{2}+h_{2}\partial _{y}f_{2})-h_{2}(h_{1}\partial _{x}f_{1}+h_{2}\partial _{y}f_{1})\right]}{\|h\|^{2}}}+{\frac {r(h)}{h}}.\end{aligned}}$
If the Cauchy–Riemann equations are satisfied, we may replace $\partial _{y}f_{2}$ by $\partial _{x}f_{1}$ and $\partial _{x}f_{2}$ by $-\partial _{y}f_{1}$ in the latter expression and obtain
    $\lim _{|h|\to 0}{\frac {f(z_{0}+h)-f(z_{0})}{h}}=\partial _{x}f_{1}-i\partial _{y}f_{1}$
(whereby we also obtained another formula for the complex derivative). On the other hand, if the limit
    $\lim _{|h|\to 0}{\frac {f(z_{0}+h)-f(z_{0})}{h}}$
does exist, then in particular we are free to choose $h=(h_{1},0)$ for real positive $h_{1}>0$ to get
    $\lim _{|h|\to 0}{\frac {f(z_{0}+h)-f(z_{0})}{h}}=\lim _{|h|\to 0}{\frac {h_{1}(h_{1}\partial _{x}f_{1})+ih_{1}(h_{1}\partial _{x}f_{2})}{\|h\|^{2}}}=\partial _{x}f_{1}+i\partial _{x}f_{2}$
and similarly $h=(0,h_{2})$ for real, positive $h_{2}>0$ to get
    $\lim _{|h|\to 0}{\frac {f(z_{0}+h)-f(z_{0})}{h}}=\lim _{|h|\to 0}{\frac {h_{2}(h_{2}\partial _{y}f_{2})-ih_{2}(h_{2}\partial _{y}f_{1})}{\|h\|^{2}}}=\partial _{y}f_{2}-i\partial _{y}f_{1}$
and hence the Cauchy–Riemann equations.$\Box$

## Rules for the complex derivative

For the usual real derivative, there are several rules such as the product rule, the chain rule, the quotient rule and the inverse rule. Fortunately, these carry over verbatim to the complex derivative, and even the proofs remain the same (although we will repeat them for the sake of completeness).
Theorem 2.4 (chain rule):
Let $f:O\to \mathbb {C}$ be complex differentiable at $z_{0}$ and let $g:U\to \mathbb {C}$ be complex differentiable at $f(z_{0})$ (this means of course that $f(z_{0})$ must lay in $U$). Then $g\circ f$ is complex differentiable at $z_{0}$ and
    $(g\circ f)'(z_{0})=g'(f(z_{0}))f'(z_{0})$.
Proof:
Set
    $Q(w):={\begin{cases}{\frac {(g\circ f)(w)-(g\circ f)(z_{0})}{f(w)-f(z_{0})}}&f(w)\neq f(z_{0})\\g'(f(z_{0}))&{\text{otherwise}}\end{cases}}$
Then
    $\lim _{h\to 0}{\frac {(g\circ f)(z_{0}+h)-(g\circ f)(z_{0})}{h}}=\lim _{h\to 0}Q(z_{0}+h){\frac {f(z_{0}+h)-f(z_{0})}{h}}=g'(f(z_{0}))f'(z_{0})$
by the continuity of $f$ at $z_{0}$ (which can be easily proven by multiplying the limit definition of complex differentiability by $h$ and observing that the limit is then $0$ by multiplicativity of limits).$\Box$
Theorem 2.5 (product rule):
Let $f,g:O\to \mathbb {C}$ be complex differentiable at $z_{0}$. Then the product function $fg:z\mapsto f(z)g(z)$ is complex differentiable at $z_{0}$ and
    $(fg)'(z_{0})=f(z_{0})g'(z_{0})+g(z_{0})f'(z_{0})$.
Proof:
    ${\begin{aligned}\lim _{h\to 0}{\frac {f(z_{0}+h)g(z_{0}+h)-f(z_{0})g(z_{0})}{h}}&=\lim _{h\to 0}{\frac {f(z_{0}+h)g(z_{0}+h)-f(z_{0})g(z_{0}+h)+f(z_{0})g(z_{0}+h)-f(z_{0})g(z_{0})}{h}}\\&=\lim _{h\to 0}g(z_{0}+h){\frac {f(z_{0}+h)-f(z_{0})}{h}}+f(z_{0})g'(z_{0}).\end{aligned}}$$\Box$
Theorem 2.6 (quotient rule):
Assume that $f,g:O\to \mathbb {C}$ are complex differentiable at $z_{0}$ and $g(z_{0})\neq 0$. By continuity of $g$, the function ${\frac {f}{g}}$ exists on a small ball around $z_{0}$. It is then complex differentiable at $z_{0}$ and the derivative equals
    $\left({\frac {f}{g}}\right)'(z_{0})={\frac {f'(z_{0})g(z_{0})-f(z_{0})g'(z_{0})}{g(z_{0})^{2}}}$.
Proof:
The derivative of the function $\mathbb {C} \setminus \{0\}\to \mathbb {C} \setminus \{0\},z\mapsto {\frac {1}{z}}$ is given by $z\mapsto -{\frac {1}{z^{2}}}$; for
    ${\begin{aligned}\lim _{h\to 0}{\frac {(z+h)^{-1}-z^{-1}}{h}}&=\lim _{h\to 0}{\frac}\end{aligned}}$
Hence, product and chain rule imply
    ${\begin{aligned}\left({\frac {f}{g}}\right)'(z_{0})&=\left(f{\frac {1}{g}}\right)'(z_{0})\\&=f'(z_{0}){\frac {1}{g(z_{0})}}+f(z_{0})\left({\frac {1}{g}}\right)'(z_{0})\\&=f'(z_{0}){\frac {1}{g(z_{0})}}-f(z_{0}){\frac {1}{g(z_{0})^{2}}}g'(z_{0}).\end{aligned}}$$\Box$
Theorem 2.7 (inverse rule):
Assume $f:O\to O$ is a bijective function that is complex differentiable at $z_{0}$. Then $f^{-1}$ is complex differentiable at $f(z_{0})$ and
Proof:

## Derivatives of polynomials

Theorem 2.8:
Let $n\in \mathbb {N}$. Then a derivative of $f(z)=z^{n}$ at any $z\in \mathbb {C}$ is given by
    $f'(z)=nz^{n-1}$.
Proof:
    ${\begin{aligned}\lim _{h\to 0}{\frac {f(z+h)-f(z)}{h}}&=\lim _{h\to 0}{\frac {\sum _{k=0}^{n}{\binom {n}{k}}z^{k}h^{n-k}-z^{n}}{h}}\\&=\lim _{h\to 0}{\frac {z^{n}-z^{n}+hnz^{n-1}+\sum _{k=0}^{n-2}{\binom {n}{k}}z^{k}h^{n-k}}{h}}=nz^{n-1}\end{aligned}}$
by the binomial theorem.$\Box$
Due to the linearity of the complex derivative, we can now compute the complex derivative of any polynomial, even with complex coefficients:
    $p(z)=a_{n}z^{n}+\cdots +a_{1}z+a_{0}\Rightarrow p'(z)=na_{n}z^{n-1}+\cdots +2a_{2}z+a_{1}$.

## Exercises

* Compute the complex derivative of the polynomial $p(z)=5z^{4}+2z+3\cdot 10^{20}$.