2.1 Complex Differentiation and Cauchy-Riemann Equations
A complex function $f(z)$ is differentiable at point $z_0$ if the limit $\lim_{h \to 0} \frac{f(z_0+h) - f(z_0)}{h}$ exists independently of how $h$ approaches zero.
Necessary and sufficient condition for $f(z) = u(x,y) + iv(x,y)$ to be analytic: $$\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}$$ Calculation of complex derivative: $$f'(z) = \frac{\partial u}{\partial x} + i\frac{\partial v}{\partial x} = \frac{\partial v}{\partial y} - i\frac{\partial u}{\partial y}$$
š» Code Example 1: Verification of Cauchy-Riemann Equations
# Requirements:
# - Python 3.9+
# - matplotlib>=3.7.0
# - numpy>=1.24.0, <2.0.0
import numpy as np
import matplotlib.pyplot as plt
from scipy.misc import derivative
def f_analytic(z):
"""Analytic function: f(z) = z^2"""
return z**2
def f_not_analytic(z):
"""Non-analytic function: f(z) = zĢ (complex conjugate)"""
return np.conj(z)
# Separate real and imaginary parts
def extract_uv(f, x, y):
z = x + 1j*y
w = f(z)
return w.real, w.imag
# Numerical calculation of partial derivatives
def check_cauchy_riemann(f, x0, y0, h=1e-5):
u, v = extract_uv(f, x0, y0)
# āu/āx
u_xp, _ = extract_uv(f, x0+h, y0)
u_xm, _ = extract_uv(f, x0-h, y0)
du_dx = (u_xp - u_xm) / (2*h)
# āu/āy
u_yp, _ = extract_uv(f, x0, y0+h)
u_ym, _ = extract_uv(f, x0, y0-h)
du_dy = (u_yp - u_ym) / (2*h)
# āv/āx
_, v_xp = extract_uv(f, x0+h, y0)
_, v_xm = extract_uv(f, x0-h, y0)
dv_dx = (v_xp - v_xm) / (2*h)
# āv/āy
_, v_yp = extract_uv(f, x0, y0+h)
_, v_ym = extract_uv(f, x0, y0-h)
dv_dy = (v_yp - v_ym) / (2*h)
return du_dx, du_dy, dv_dx, dv_dy
# Test point
x0, y0 = 1.5, 2.0
print("=== Analytic function: f(z) = z^2 ===")
du_dx, du_dy, dv_dx, dv_dy = check_cauchy_riemann(f_analytic, x0, y0)
print(f"āu/āx = {du_dx:.6f}")
print(f"āv/āy = {dv_dy:.6f}")
print(f"āu/āx - āv/āy = {du_dx - dv_dy:.6e} (should be ~0)")
print(f"\nāu/āy = {du_dy:.6f}")
print(f"-āv/āx = {-dv_dx:.6f}")
print(f"āu/āy - (-āv/āx) = {du_dy - (-dv_dx):.6e} (should be ~0)")
print("\n\n=== Non-analytic function: f(z) = zĢ ===")
du_dx, du_dy, dv_dx, dv_dy = check_cauchy_riemann(f_not_analytic, x0, y0)
print(f"āu/āx = {du_dx:.6f}")
print(f"āv/āy = {dv_dy:.6f}")
print(f"āu/āx - āv/āy = {du_dx - dv_dy:.6f} (NOT ~0)")
print(f"\nāu/āy = {du_dy:.6f}")
print(f"-āv/āx = {-dv_dx:.6f}")
print(f"āu/āy - (-āv/āx) = {du_dy - (-dv_dx):.6f} (NOT ~0)")
# Visualization omitted (see original code)2.2 Examples and Properties of Analytic Functions
Many complex functions are analytic, but functions involving complex conjugate or absolute value are not analytic.
Examples of analytic functions:
- Polynomials: $z^n$, $a_n z^n + \cdots + a_1 z + a_0$
- Exponential function: $e^z$
- Trigonometric functions: $\sin z$, $\cos z$
- Rational functions: $\frac{P(z)}{Q(z)}$ (in region where $Q(z) \neq 0$)
- Complex conjugate: $\bar{z}$
- Real/Imaginary part: $\mathrm{Re}(z)$, $\mathrm{Im}(z)$
- Absolute value: $|z|$
2.3 Calculation of Complex Integrals
Complex integrals are defined as path integrals: $\int_C f(z) dz = \int_a^b f(z(t)) z'(t) dt$
$$\int_C f(z) dz = \int_a^b f(z(t)) \frac{dz}{dt} dt$$ where $z(t)$ is parametric representation of path $C$ $(a \leq t \leq b)$
2.4 Cauchy's Integral Theorem
The integral of an analytic function along a closed curve is zero. This is known as Cauchy's integral theorem.
$$\oint_C f(z) dz = 0$$ where $f(z)$ is analytic inside closed curve $C$
2.5 Cauchy's Integral Formula
The value of an analytic function can be obtained from values on the surrounding closed curve.
Cauchy's integral formula: $$f(z_0) = \frac{1}{2\pi i} \oint_C \frac{f(z)}{z - z_0} dz$$ Formula for derivatives: $$f^{(n)}(z_0) = \frac{n!}{2\pi i} \oint_C \frac{f(z)}{(z - z_0)^{n+1}} dz$$
2.6 Conformal Mapping and Harmonic Functions
Analytic functions are angle-preserving mappings (conformal mappings). Also, the real and imaginary parts of analytic functions are harmonic functions (solutions to Laplace's equation).
Conformal mapping: Analytic function $w = f(z)$ preserves angles
Harmonic functions: If $f(z) = u + iv$ is analytic, then $$\nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0$$ $$\nabla^2 v = \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2} = 0$$
š Chapter Exercises
- For $f(z) = z^3$, verify the Cauchy-Riemann equations at point $z_0 = 1+i$.
- Calculate $\oint_C z^n dz$ where $C$ is unit circle centered at origin and $n$ is an integer.
- For $f(z) = \frac{1}{z-2}$, calculate integral $\oint_C f(z) dz$ along unit circle and discuss relation to Cauchy's integral theorem.
- Find what curve the line $x=1$ is mapped to by conformal mapping $w = z^2$.
š References
- Ahlfors, L. V. (1979). Complex Analysis. McGraw-Hill.
- Stein, E. M., & Shakarchi, R. (2003). Complex Analysis. Princeton University Press.