Skip to main content
$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 6.3: Complex Differentiation

• • Contributed by Steve Cox
• Emeritus Professor (Computational and Applied Mathematics) at Rice University
$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

The complex $$f$$ is said to be differentiable at $$z_{0}$$ if

$\lim_{z \rightarrow z_{0}} \frac{f(z)-f(z_{0})}{z-z_{0}} \nonumber$

exists, by which we mean that

$\frac{f(z_{n})-f(z_{0})}{z_{n}-z_{0}} \nonumber$

converges to the same value for every sequence $$\{z_{n}\}$$ that converges to $$z_{0}$$. In this case we naturally call the limit $$\frac{d}{dz} f(z_{0})$$

To illustrate the concept of 'for every' mentioned above, we utilize the following picture. We assume the point $$z_{0}$$ is differentiable, which means that any conceivable sequence is going to converge to $$z_{0}$$. We outline three sequences in the picture: real numbers, imaginary numbers, and a spiral pattern of both.

## Sequences Approaching A Point In The Complex Plane Figure $$\PageIndex{1}$$: The green is real, the blue is imaginary, and the red is the spiral. (CC BY-NC; Ümit Kaya)

Example $$\PageIndex{1}$$

The derivative of $$z^2$$ is $$2z$$.

\begin{align*} \lim z \rightarrow z_{0} \frac{z^2-z_{0}^2}{z-z_{0}} &= \lim_{z \rightarrow z_{0}} \frac{(z-z_{0})(z+z_{0})}{z-z_{0}} \\[4pt] &= 2z_{0} \end{align*}

Example $$\PageIndex{2}$$

The exponential is its own derivative.

\begin{align*} \lim z \rightarrow z_{0} \frac{e^{z}-e^{z_{0}}}{z-z_{0}} &= e^{z_{0}} \lim_{z \rightarrow z_{0}} \frac{e^{z-z_{0}}-1}{z-z_{0}} \\[4pt] &= e^{z_{0}} \lim_{z \rightarrow z_{0}} \sum_{n = 0}^{\infty} \frac{(z-z_{0})^{n}}{(n+1)!} \\[4pt] &= e^{z_{0}} \end{align*}

Example $$\PageIndex{3}$$

The real part of $$z$$ is not a differentiable function of $$z$$.

We show that the limit depends on the angle of approach. First, when $$z_{n} \rightarrow z_{0}$$ on a line parallel to the real axis, e.g., $$z_{n} = x_{0}+\frac{1}{n}+iy_{0}$$, we find

$\lim_{n \rightarrow \infty} \frac{x_{0}+\frac{1}{n}-x_{0}}{x_{0}+\frac{1}{n}+iy_{0}-x_{0}+iy_{0}} = 1 \nonumber$

while if $$z_{n} \rightarrow z_{0}$$ in the imaginary direction, e.g., $$z_{n} = x_{0}+i(y_{0}+\frac{1}{n})$$, then

$\lim_{n \rightarrow \infty} \frac{x_{0}-x_{0}}{x_{0}+i(y_{0}+\frac{1}{n})-x_{0}+iy_{0}} = 0 \nonumber$

## Conclusion

NOT_CONVERTED_YET: para

This last example suggests that when $$f$$ is differentiable a simple relationship must bind its partial derivatives in $$x$$ and $$y$$.

Definition: Partial Derivative Relationship

If $$f$$ is differentiable at $$z_{0}$$ then $$\frac{d}{dz} f(z_{0}) = \frac{\partial f(z_{0})}{\partial x} = -(i \frac{\partial f(z_{0})}{\partial y})$$

With $$z = x+iy_{0}$$

\begin{align*} \frac{d}{dz} f(z_0) &= \lim_{z \rightarrow z_0} \frac{f(z)-f(z_0)}{z-z_0} \\[4pt] &= \lim_{x \rightarrow x_0} \frac{f(x+iy_0)-f(x_0+iy_0}{x-x_0} \\[4pt] &= \frac{\partial f(z_{0})}{\partial x} \end{align*}

With $$z = x_{0}+iy$$

\begin{align*} \frac{d}{dz} f(z_{0}) &= \lim_{z \rightarrow z_{0}} \frac{f(z)-f(z_{0})}{z-z_{0}} \\[4pt] &= \lim_{x \rightarrow x_{0}} \frac{f(x_{0}+iy)-f(x_{0}+iy_{0}}{i(y-y_{0})} \\[4pt] &= -(i \frac{\partial f(z_{0})}{\partial y}) \end{align*}

## Cauchy-Reimann Equations

In terms of the real and imaginary parts of $$f$$ this result brings the Cauchy-Riemann equations.

$\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y} \nonumber$

and

$\frac{\partial v}{\partial x} = -\frac{\partial u}{\partial y} \nonumber$

Regarding the converse proposition we note that when $$f$$ has continuous partial derivatives in region obeying the Cauchy-Reimann equations then $$f$$ is in fact differentiable in the region.

We remark that with no more energy than that expended on their real cousins one may uncover the rules for differentiating complex sums, products, quotients, and compositions.

As one important application of the derivative let us attempt to expand in partial fractions a rational function whose denominator has a root with degree larger than one. As a warm-up let us try to find $$q_{1,1}$$ and $$q_{1,2}$$ in the expression

$\frac{z+2}{(z+1)^2} = \frac{q_{1,1}}{z+1}+\frac{q_{1,2}}{(z+1)^2} \nonumber$

Arguing as above, it seems wise to multiply through by $$(z+1)^2$$ and so arrive at

$z+2 = q_{1,1}(z+1)+q_{1,2} \nonumber$

On setting $$z = -1$$ this gives $$q_{1,2} = 1$$. With $$q_{1,2}$$ computed, Equation takes the simple form $$z+1 = q_{1,1}(z+1)$$ and so $$q_{1,2} = 1$$ as well. Hence,

$\frac{z+2}{(z+1)^2} = \frac{1}{z+1} \frac{1}{(z+1)^2} \nonumber$

This latter step grows more cumbersome for roots of higher degrees. Let us consider

$\frac{(z+2)^2}{(z+1)^3} = \frac{q_{1,1}}{z+1}+\frac{q_{1,2}}{(z+1)^2}+\frac{q_{1,3}}{(z+1)^3} \nonumber$

The first step is still correct: multiply through by the factor at its highest degree, here 3. This leaves us with

$(z+2)^2 = q_{1,1}(z+1)^2+q_{1,2}(z+1)+q_{1,3} \nonumber$

Setting $$z = -1$$ again produces the last coefficient, here $$q_{1,3} = 1$$. We are left however with one equation in two unknowns. Well, not really one equation, for Equation is to hold for all $$z$$, of Equation. This produces

$2(z+2) = 2q_{1,1}(z+1)+q_{1,2} \nonumber$

and $$2 = q_{1,1}$$ The latter of course needs no comment. We derive $$q_{1,2}$$ from the former by setting $$z = -1$$. This example will permit us to derive a simple expression for the partial fraction expansion of the general proper rational function $$q = \frac{f}{g}$$ where $$g$$ has h distinct roots $$\{\lambda_{1}, \cdots, \lambda_{h}\}$$ of respective degrees $$\{d_{1}, \cdots, d_{h}\}$$. We write

$q(z) = \sum_{j = 1}^{h} \sum_{k = 1}^{d_{j}} \frac{q_{j,k}}{(z-\lambda_{j})^k} \nonumber$

and note, as above, that $$q_{j,k}$$ is the coefficient of $$(z-d_{j})^{d_{j-k}}$$ in the rational function

$r_{j}(z) \equiv q(z)(z-\lambda_{j})^{d_{j}} \nonumber$

Hence, $$q_{j,k}$$ may be computed by setting $$z = \lambda_{j}$$ in the ratio of the $$d_{j}-kth$$ derivative of $$r_{j}$$ to $$(d_{j}-k)!$$

$q_{j,k} = \lim_{z \rightarrow \lambda_{j}} \frac{1}{(d_{j}-k)!} \frac{d^{d_{j}-k}}{dz^{d_{j}-k}} \{(z-\lambda_{j})^{d_{j}} q(z)\} \nonumber$

As a second example, let us take

$B = \begin{pmatrix} {1}&{0}&{0}\\ {1}&{3}&{0}\\ {0}&{1}&{1} \end{pmatrix} \nonumber$

and compute the $$\Phi_{j,k}$$ matrices in the expansion

\begin{align*} (zI-B)^{-1} &= \begin{pmatrix} {\frac{1}{z-1}}&{0}&{0}\\ {\frac{1}{(z-1)(z-3)}}&{\frac{1}{z-3}}&{0}\\ {\frac{1}{(z-1)^{2}(z-3)}}&{\frac{1}{(z-1)(z-3)}}&{\frac{1}{z-1}} \end{pmatrix} \\[4pt] &= \frac{1}{z-1} \Phi_{1,1}+\frac{1}{(z-1)^2} \Phi_{1,2}+\frac{1}{z-3} \Phi_{2,1} \end{align*}

The only challenging term is the $$(3,1)$$ element. We write

$\frac{1}{(z-1)^{2}(z-3)} = \frac{q_{1,1}}{z-1}+\frac{q_{1,2}}{(z-1)^2}+\frac{q_{2,1}}{z-3} \nonumber$

It follows that

\begin{align*} q_{1,1} &= \frac{d}{dz}(\frac{1}{z-3}1) \\[4pt] &= -1/4 \end{align*}

and

\begin{align*} q_{1,2} &= \frac{1}{z-3}1 \\[4pt] &= -1/4 \end{align*}

and

\begin{align*}q_{2,1} &= (\frac{1}{(z-3)^{2}}1) \\[4pt] &= 1/4 \end{align*}

It now follows that

$(zI-B)^{-1} = \frac{1}{z-1} \begin{pmatrix} {1}&{0}&{0}\\ {-1/2}&{0}&{0}\\ {-1/4}&{-1/2}&{1} \end{pmatrix}+\frac{1}{(z-1)^2} \begin{pmatrix} {0}&{0}&{0}\\ {0}&{0}&{0}\\ {-1/2}&{0}&{0} \end{pmatrix}+\frac{1}{z-3} \begin{pmatrix} {0}&{0}&{0}\\ {1/2}&{1}&{0}\\ {1/4}&{1/2}&{0} \end{pmatrix} \nonumber$

In closing, let us remark that the method of partial fraction expansions has been implemented in Matlab. In fact, Equations $$q_{1,1}, q_{1,2}, q_{2,1}$$ all follow from the single command: [r,p,k]=residue([0 0 0 1],[1 -5 7 -3]). The first input argument is Matlab-speak for the polynomial $$f(z) = 1$$ while the second argument corresponds to the denominator

$g(z) = (z-1)^{2}(z-3) = z^{3}-5z^{2}+7z-3 \nonumber$