Complex Analysis
Complex analysis studies functions of a complex variable. Analyticity and contour integration yield powerful tools with applications in signal processing, physics, and number theory.
Key Points
- A function is holomorphic if it is complex differentiable in a neighborhood.
- Cauchy's theorem: integrals of holomorphic functions around closed contours vanish.
- The residue theorem evaluates real integrals and series.
Formulas
Cauchy-Riemann equations
$$\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}$$
Cauchy integral formula
$$f^{(n)}(a) = \frac{n!}{2\pi i} \oint_\gamma \frac{f(z)}{(z-a)^{n+1}} \, dz$$
Residue theorem
$$\oint_\gamma f(z) \, dz = 2\pi i \sum_{k} \operatorname{Res}(f, a_k)$$
Code Example
import cmath
# Contour integral of 1/z around unit circle
N = 1000
total = 0.0
for k in range(N):
z = cmath.exp(2j * cmath.pi * k / N)
dz = 2j * cmath.pi * z / N
total += dz / z
print(total) # ~ 2*pi*i