Search Knowledge

© 2026 LIBREUNI PROJECT

Calculus & Analysis / Overview

Complex Analysis

Complex Analysis

Complex Analysis is the study of functions of a complex variable z=x+iyz = x + iy. It reveals a profound rigidity: if a complex function is differentiable once, it is differentiable infinitely many times.

Holomorphic Functions

A function f(z)=u(x,y)+iv(x,y)f(z) = u(x, y) + i v(x, y) is holomorphic if it is complex-differentiable. This requires the Cauchy-Riemann Equations: ux=vy,uy=vx\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}

python
1def check_cauchy_riemann(f, z, h=1e-7):
2 # Numerical gradient check
3 dz_x = f(z + h) - f(z)
4 dz_y = f(z + h*1j) - f(z)
5
6 df_dx = dz_x / h
7 df_dy = dz_y / (h*1j)
8
9 # In a holomorphic function, df/dz should be the same
10 # regardless of the direction of the limit.
11 is_holomorphic = abs(df_dx - df_dy) < 1e-5
12 return is_holomorphic, df_dx, df_dy
13 
14# Test f(z) = z^2 (Holomorphic)
15f1 = lambda z: z**2
16print(f"z^2 at 1+i: {check_cauchy_riemann(f1, 1+1j)}")
17 
18# Test f(z) = conj(z) (Non-holomorphic)
19f2 = lambda z: z.conjugate()
20print(f"conj(z) at 1+i: {check_cauchy_riemann(f2, 1+1j)}")

Complex Integration and Cauchy’s Theorem

If ff is holomorphic in a simply connected domain, the line integral along any closed path γ\gamma is zero: γf(z)dz=0\oint_\gamma f(z) dz = 0

However, if the domain has “holes” (singularities), we apply the Residue Theorem: γf(z)dz=2πiRes(f,zk)\oint_\gamma f(z) dz = 2\pi i \sum \text{Res}(f, z_k)

What is the integral of 1/z around a unit circle centered at the origin?

Conformal Mappings

Holomorphic functions are conformal maps, meaning they preserve angles between curves. This property is vital in fluid dynamics and electromagnetism.

python
1import numpy as np
2 
3def transform_grid(f, points):
4 return [f(p) for p in points]
5 
6# Grid of points
7grid = [x + y*1j for x in np.linspace(-1, 1, 5) for y in np.linspace(-1, 1, 5)]
8 
9# Exponential map: mapping lines to circles/rays
10f_exp = lambda z: np.exp(z)
11transformed = transform_grid(f_exp, grid)
12 
13print(f"First 5 Original: {grid[:5]}")
14print(f"First 5 Transformed: {[f'{t:.2f}' for t in transformed[:5]]}")

Laurent Series and Singularities

Functions can be expanded into Laurent series near singularities: f(z)=n=an(zz0)nf(z) = \sum_{n=-\infty}^{\infty} a_n (z-z_0)^n

  • Removable singularity: No negative power terms.
  • Pole of order m: Finite negative terms up to n=mn = -m.
  • Essential singularity: Infinitely many negative power terms.

The function f(z) = exp(1/z) has what type of singularity at z = 0?

Previous Module Calculus of Variations