Complex analysis · Differentiation

The Complex Derivative and the Cauchy–Riemann Equations

The complex derivative is defined by the same difference quotient as the real one. But because \(\Delta z\) can approach zero from every direction in the plane, demanding that the limit exist is a very strong condition. It forces the real and imaginary parts of the function to be tied together by two equations, the Cauchy–Riemann equations, and functions that satisfy them (the analytic functions) have remarkable properties: their parts are harmonic, their level curves cross at right angles, and as mappings they preserve angles. This post explains where all of this comes from.

1. The derivative of a complex function

1° Derivative If the limit \[ f'(z_0) = \lim_{\Delta z\to0}\frac{f(z_0 + \Delta z) - f(z_0)}{\Delta z} \] exists, \(f(z)\) is said to have the derivative \(f'(z_0)\) at the point \(z_0\).

The formula is identical to the real one, but the meaning of "\(\Delta z \to 0\)" is not. As in the previous post on limits, \(\Delta z\) is a complex number that may shrink to zero along any path: horizontally, vertically, along a spiral. The quotient must approach the same number along all of them. For functions built algebraically from \(z\) this happens automatically:

Example 1 · \(f(z) = z^2\) \[ \frac{(z + \Delta z)^2 - z^2}{\Delta z} = \frac{2z\,\Delta z + (\Delta z)^2}{\Delta z} = 2z + \Delta z \ \longrightarrow\ 2z, \] whatever the direction of \(\Delta z\). So \( (z^2)' = 2z \), as in the real case.

But a very innocent-looking function fails completely:

Example 2 · \(f(z) = \bar z\) has no derivative anywhere \[ \frac{\overline{z + \Delta z} - \bar z}{\Delta z} = \frac{\overline{\Delta z}}{\Delta z}. \] For horizontal \(\Delta z = \Delta x\) this is \(1\); for vertical \(\Delta z = i\Delta y\) it is \( \frac{-i\Delta y}{i\Delta y} = -1 \). The limit does not exist, at any point. Yet \(\bar z = x - iy\) is as smooth as can be as a map of the plane (it is a reflection). Complex differentiability is a much stronger property than smoothness of \(u\) and \(v\).

2. Regular and analytic functions

Definitions
  • A function \(f(z)\) with a continuous derivative \(f'(z)\) at every point of a domain \(G\) is called differentiable, regular or holomorphic in \(G\).
  • (2°) A function differentiable in \(G\) except at finitely many points is called analytic in \(G\) in this book. The points where it is not differentiable are its singular points (singularities).
A note on terminology In most modern texts, "analytic in \(G\)" means the same as "holomorphic in \(G\)": differentiable at every point of \(G\). A function like \(\frac1z\) is then called analytic in \(G\) minus the point \(0\), with an (isolated) singularity at \(0\). The book's convention allows finitely many exceptional points inside \(G\); keep this in mind when reading other sources. Also, the word "continuous" in the definition of regularity is not really an extra condition: by Goursat's theorem, a complex derivative existing at every point of a domain is automatically continuous (and even differentiable again, infinitely often).

3. The Cauchy–Riemann equations

Write \( f(z) = u(x, y) + iv(x, y) \) and suppose \(f'(z)\) exists. Let us compute it along two special directions.

Both must give the same complex number. Comparing real and imaginary parts:

3° Cauchy–Riemann equations A function \( f(z) = u(x, y) + iv(x, y) \) is differentiable in a domain \(G\) if and only if \(u(x, y)\) and \(v(x, y)\) are differentiable in \(G\) as functions of two independent real variables and satisfy \[ \frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \qquad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}. \] Then \[ f'(z) = \frac{\partial u}{\partial x} + i\frac{\partial v}{\partial x} = \frac{\partial v}{\partial y} - i\frac{\partial u}{\partial y} = \frac{\partial u}{\partial x} - i\frac{\partial u}{\partial y} = \frac{\partial v}{\partial y} + i\frac{\partial v}{\partial x}. \]

The computation above proves that the equations are necessary. Why are they also sufficient (with the differentiability of \(u, v\))? For a general direction, differentiability of \(u\) and \(v\) gives \( \Delta u \approx u_x\Delta x + u_y\Delta y \) and \( \Delta v \approx v_x\Delta x + v_y\Delta y \). Using the equations to replace \(u_y = -v_x\) and \(v_y = u_x\):

\[ \Delta u + i\Delta v \approx (u_x + iv_x)\Delta x + (-v_x + iu_x)\Delta y = (u_x + iv_x)(\Delta x + i\Delta y) = (u_x + iv_x)\,\Delta z. \]

So the quotient \( \frac{\Delta f}{\Delta z} \) tends to \( u_x + iv_x \) whatever the direction: the two equations are exactly what is needed to turn a real linear approximation into multiplication by one complex number.

The four formulas for \(f'(z)\) all say the same thing; choose the one most convenient for the given \(u\) and \(v\). The last two show that \(f'\) is determined by \(u\) alone, or by \(v\) alone.

4. Testing functions

Example 3 · \(e^z\) \( e^z = e^x\cos y + ie^x\sin y \): \( u = e^x\cos y \), \( v = e^x\sin y \). \[ u_x = e^x\cos y = v_y, \qquad u_y = -e^x\sin y = -v_x. \] Both equations hold everywhere, and \( (e^z)' = u_x + iv_x = e^x\cos y + ie^x\sin y = e^z \). The exponential is its own derivative in the complex plane too.
Example 4 · \(\bar z\) and \(|z|^2\)
  • \( \bar z \): \(u = x\), \(v = -y\); \( u_x = 1 \ne -1 = v_y \). The first equation fails everywhere: nowhere differentiable (as in Example 2).
  • \( |z|^2 = x^2 + y^2 \): \( u = x^2 + y^2 \), \(v = 0\). The equations \(2x = 0\), \(2y = 0\) hold only at \(z = 0\). So \(|z|^2\) is differentiable at the single point \(0\) (with derivative \(0\)), and analytic nowhere: there is no domain around \(0\) where it is differentiable.

Polar form

For functions given in polar coordinates \( z = re^{i\theta} \), \( f = u(r, \theta) + iv(r, \theta) \), the equations become (by the chain rule)

\[ \frac{\partial u}{\partial r} = \frac1r\frac{\partial v}{\partial\theta}, \qquad \frac{\partial v}{\partial r} = -\frac1r\frac{\partial u}{\partial\theta}, \qquad f'(z) = e^{-i\theta}\Big(\frac{\partial u}{\partial r} + i\frac{\partial v}{\partial r}\Big). \]
Example 5 · The logarithm \( \ln z = \ln r + i\theta \) (principal branch, \( -\pi < \theta < \pi \)): \( u_r = \frac1r = \frac1r v_\theta \), \( v_r = 0 = -\frac1r u_\theta \). Analytic in the cut plane, with \( (\ln z)' = e^{-i\theta}\cdot\frac1r = \frac1z \).

5. Harmonic functions and conjugates

Harmonic functions If \( f(z) = u + iv \) is regular in a domain \(G\), then \(u\) and \(v\) are harmonic functions: they satisfy Laplace's equation \[ \frac{\partial^2u}{\partial x^2} + \frac{\partial^2u}{\partial y^2} = 0, \qquad \frac{\partial^2v}{\partial x^2} + \frac{\partial^2v}{\partial y^2} = 0. \]

Why: differentiate the first equation by \(x\) and the second by \(y\): \( u_{xx} = v_{yx} \), \( u_{yy} = -v_{xy} \). Adding, and using that the mixed derivatives are equal, gives \( u_{xx} + u_{yy} = 0 \). The same trick works for \(v\). (The second derivatives exist and are continuous because analytic functions are infinitely differentiable, a fact proved later with Cauchy's integral formula.)

Laplace's equation describes steady-state temperature, electrostatic potential and ideal fluid flow in the plane. So every analytic function hands us two solutions of a physical problem for free, which is one reason complex analysis is so useful in engineering.

Finding an analytic function from its real part

Conversely, given a harmonic \(u\) on a simply connected domain, the Cauchy–Riemann equations determine \(v\) (the harmonic conjugate) up to a constant, and with it \(f = u + iv\).

Example 6 Find the analytic \(f\) with \( u = x^2 - y^2 + x \).
  1. Check: \( u_{xx} + u_{yy} = 2 - 2 = 0 \), harmonic ✓.
  2. \( v_y = u_x = 2x + 1 \), so \( v = 2xy + y + \varphi(x) \).
  3. \( v_x = 2y + \varphi'(x) \) must equal \( -u_y = 2y \), so \( \varphi' = 0 \), \( \varphi = C \).
  4. \( f = x^2 - y^2 + x + i(2xy + y + C) = z^2 + z + iC \).
By contrast, \( u = x^2 + y^2 \) is not harmonic (\(u_{xx} + u_{yy} = 4\)), so it is not the real part of any analytic function: the second step would lead to a contradiction.

Orthogonal level curves

The Cauchy–Riemann equations make the gradients of \(u\) and \(v\) perpendicular:

\[ \nabla u\cdot\nabla v = u_xv_x + u_yv_y = u_x(-u_y) + u_y(u_x) = 0. \]

So the level curves \(u = \text{const}\) and \(v = \text{const}\) cross at right angles (wherever \(f' \ne 0\)). In physics: equipotential lines and field lines, or isotherms and heat-flow lines.

x y u = c v = c
Figure 1. For \(f(z) = z^2\): the level curves \(u = x^2 - y^2 = c\) (blue hyperbolas) and \(v = 2xy = c\) (red hyperbolas) cross at right angles everywhere except at the origin, where \(f'(0) = 0\).

6. The differential and the rules of differentiation

4° Differential If \(f\) is differentiable, its increment can be written \[ \Delta w = f(z + \Delta z) - f(z) = f'(z)\,\Delta z + \varepsilon\,\Delta z, \qquad \varepsilon \to 0 \text{ as } \Delta z \to 0. \] The principal part \( f'(z)\,\Delta z \) is the differential of \(w = f(z)\): \[ dw = f'(z)\,dz. \]

All the rules of differentiation of real functions hold for complex functions, with the same proofs: sums, products, quotients, the chain rule, inverse functions. Hence

\[ (z^n)' = nz^{n-1},\quad (e^z)' = e^z,\quad (\sin z)' = \cos z,\quad (\cos z)' = -\sin z,\quad (\ln z)' = \frac1z, \quad \dots \]

Polynomials are analytic everywhere; rational functions everywhere except at the zeros of the denominator.

L'Hôpital's rule If \(f\) and \(g\) are analytic at \(z_0\), \( f(z_0) = g(z_0) = 0 \) and \( g'(z_0) \ne 0 \), then \[ \lim_{z\to z_0}\frac{f(z)}{g(z)} = \frac{f'(z_0)}{g'(z_0)}. \]

(Proof: divide numerator and denominator by \(z - z_0\) and pass to the limit; this form does not need a mean value theorem, which in fact fails for complex functions. If also \(f'(z_0) = g'(z_0) = 0\), repeat with higher derivatives.)

Example 7 \[ \lim_{z\to0}\frac{\sin z}{z} = \frac{\cos 0}{1} = 1, \qquad \lim_{z\to i}\frac{z^2 + 1}{z^6 + 1} = \frac{2i}{6i^5} = \frac{2i}{6i} = \frac13. \]

7. What the derivative means geometrically

Near \(z_0\), \( \Delta w \approx f'(z_0)\,\Delta z \). Multiplying by the complex number \( f'(z_0) = |f'(z_0)|e^{i\alpha} \) means:

So, if \( f'(z_0) \ne 0 \), small figures near \(z_0\) are mapped to similar small figures: angles between curves through \(z_0\) are preserved, in size and orientation. Such mappings are called conformal, and analytic functions are conformal wherever \(f' \ne 0\). This is the geometric content of the Cauchy–Riemann equations: a general smooth map of the plane distorts small circles into ellipses, but an analytic map keeps them circles.

Example: \(w = z^2\) is conformal everywhere except at \(0\), where \(f'(0) = 0\) and angles are doubled (as seen in the previous post). The map \(\bar z\) preserves angle sizes but reverses their orientation (it is a mirror), which is another way to see why it is not analytic.

8. Summary

ConceptStatement
Derivative\( f'(z_0) = \lim\frac{f(z_0 + \Delta z) - f(z_0)}{\Delta z} \), the same along every path
Cauchy–Riemann\( u_x = v_y \), \( u_y = -v_x \) (+ differentiability of \(u, v\)) \(\iff\) \(f\) differentiable
Formula for \(f'\)\( u_x + iv_x = v_y - iu_y = u_x - iu_y = v_y + iv_x \)
Polar form\( u_r = \frac1r v_\theta \), \( v_r = -\frac1r u_\theta \)
Harmonic\( \Delta u = \Delta v = 0 \); level curves of \(u\) and \(v\) orthogonal
Differential\( dw = f'(z)\,dz \)
Geometry\(f' \ne 0\): local rotation by \(\arg f'\) and scaling by \(|f'|\), conformal

9. Practice problems

Try each one before opening the solution. More solved problems from this topic are in Complex Numbers.

Problem 1: Verify the Cauchy–Riemann equations for \( f(z) = z^3 \).

\( z^3 = x^3 - 3xy^2 + i(3x^2y - y^3) \). \( u_x = 3x^2 - 3y^2 = v_y \); \( u_y = -6xy = -v_x \). ✓ And \( f' = u_x + iv_x = 3(x^2 - y^2) + 6ixy = 3z^2 \).

Problem 2: Where is \( f(z) = x^2 + iy^2 \) differentiable? Where analytic?

\( u_x = 2x \), \( v_y = 2y \): equal on the line \(y = x\); \( u_y = 0 = -v_x \) always. Differentiable only on the line \(y = x\), analytic nowhere (a line contains no disk).

Problem 3: Find the analytic \(f\) with \( v = e^x\sin y \) and \(f(0) = 1\).

\( u_x = v_y = e^x\cos y \Rightarrow u = e^x\cos y + \psi(y) \); \( u_y = -e^x\sin y + \psi' = -v_x = -e^x\sin y \Rightarrow \psi = C \). \( f = e^z + C \), and \(f(0) = 1\) gives \(C = 0\): \( f = e^z \).

Problem 4: Is \( u = x^3 - 3xy^2 \) harmonic? Find its conjugate.

\( u_{xx} + u_{yy} = 6x - 6x = 0 \). \( v_y = u_x = 3x^2 - 3y^2 \Rightarrow v = 3x^2y - y^3 + \varphi(x) \); \( v_x = 6xy + \varphi' = -u_y = 6xy \). So \( v = 3x^2y - y^3 + C \), and \( f = z^3 + iC \).

Problem 5: Compute \( \lim_{z\to0}\frac{e^z - 1}{\sin z} \).

L'Hôpital: \( \frac{e^0}{\cos 0} = 1 \).

Problem 6: By what angle and factor does \(w = z^2\) rotate and stretch small figures near \(z_0 = 1 + i\)?

\( f'(1 + i) = 2 + 2i = 2\sqrt2\,e^{i\pi/4} \): rotation by \(45^\circ\), stretching by \(2\sqrt2 \approx 2.83\).

Final thoughts

The complex derivative asks for one limit, but since \(\Delta z\) can come from any direction, that single demand splits into two real equations. Checking just the horizontal and vertical directions gives the Cauchy–Riemann equations, and with differentiable \(u, v\) they are also enough. From them flow the main facts of this chapter: the real and imaginary parts of an analytic function are harmonic, either one determines the other, their level curves are orthogonal, and the function acts locally as a rotation combined with a scaling. Analytic functions are much more special than smooth maps of the plane, and that is what makes complex analysis so powerful.

Related posts: complex functions, limits and continuity; partial derivatives and the chain rule.