Skip to content
Published on

Engineering Mathematics: Complex Analysis Complete Guide - Cauchy Theorem to Residues

Authors

Engineering Mathematics: Complex Analysis and Z-Transform Complete Guide

In electrical and control engineering, complex numbers are far more than a mathematical abstraction. Phasors in AC circuit analysis, s=σ+jωs = \sigma + j\omega in the Laplace transform, the unit circle in the Z-transform, complex frequency response in Bode plots — all of these are rooted in complex analysis. This guide takes you from the complex number system through the residue theorem, Z-transform, and digital filter design.


1. The Complex Number System

1.1 Representations of Complex Numbers

Rectangular Form: z=x+iy=x+jyz = x + iy = x + jy

(Electrical engineers use jj instead of ii, since ii denotes current.)

  • Real part: Re(z)=x\text{Re}(z) = x
  • Imaginary part: Im(z)=y\text{Im}(z) = y

Polar Form: z=reiθ=r(cosθ+isinθ)=rθz = r e^{i\theta} = r(\cos\theta + i\sin\theta) = r\angle\theta

  • Magnitude: r=z=x2+y2r = |z| = \sqrt{x^2 + y^2}
  • Argument (phase): θ=arg(z)=arctan(y/x)\theta = \arg(z) = \arctan(y/x) (accounting for quadrant)

Euler's Formula: eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta

From this: cosθ=eiθ+eiθ2,sinθ=eiθeiθ2i\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2}, \quad \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}

Often called the most beautiful formula in mathematics, Euler's Identity: eiπ+1=0e^{i\pi} + 1 = 0

Five of the most important numbers (ee, ii, π\pi, 11, 00) united in a single equation.

De Moivre's Formula: (reiθ)n=rneinθ=rn(cosnθ+isinnθ)(r e^{i\theta})^n = r^n e^{in\theta} = r^n(\cos n\theta + i\sin n\theta)

n-th roots: z1/n=r1/nei(θ+2kπ)/nz^{1/n} = r^{1/n} e^{i(\theta + 2k\pi)/n}, k=0,1,,n1k = 0, 1, \ldots, n-1

These represent nn equally-spaced points on the unit circle. (The n-th roots of unity: WNk=ej2πk/NW_N^k = e^{j2\pi k/N} — you will see these in the FFT!)

1.2 Complex Arithmetic

Addition/Subtraction (rectangular form is convenient): (x1+iy1)±(x2+iy2)=(x1±x2)+i(y1±y2)(x_1 + iy_1) \pm (x_2 + iy_2) = (x_1 \pm x_2) + i(y_1 \pm y_2)

Multiplication (polar form is convenient): (r1eiθ1)(r2eiθ2)=r1r2ei(θ1+θ2)(r_1 e^{i\theta_1})(r_2 e^{i\theta_2}) = r_1 r_2 e^{i(\theta_1 + \theta_2)}

Magnitudes multiply, phases add — the foundation of impedance multiplication in electrical engineering.

Division: r1eiθ1r2eiθ2=r1r2ei(θ1θ2)\frac{r_1 e^{i\theta_1}}{r_2 e^{i\theta_2}} = \frac{r_1}{r_2} e^{i(\theta_1 - \theta_2)}

Complex Conjugate: zˉ=xiy=reiθ\bar{z} = x - iy = r e^{-i\theta}

Useful properties:

  • zzˉ=x2+y2=z2z\bar{z} = x^2 + y^2 = |z|^2
  • Re(z)=(z+zˉ)/2\text{Re}(z) = (z + \bar{z})/2
  • Im(z)=(zzˉ)/(2i)\text{Im}(z) = (z - \bar{z})/(2i)

1.3 Engineering Application: Phasor Analysis

The power of complex numbers is on full display in AC circuit analysis.

Expressing v(t)=Vmcos(ωt+ϕ)v(t) = V_m\cos(\omega t + \phi) as a phasor: V=Vmejϕ=Vmϕ\mathbf{V} = V_m e^{j\phi} = V_m\angle\phi

Impedance:

ZR=R(pure resistance, no phase shift)Z_R = R \quad \text{(pure resistance, no phase shift)} ZL=jωL(inductor, +90 degrees phase lead)Z_L = j\omega L \quad \text{(inductor, +90 degrees phase lead)} ZC=1jωC=jωC(capacitor, -90 degrees phase lag)Z_C = \frac{1}{j\omega C} = \frac{-j}{\omega C} \quad \text{(capacitor, -90 degrees phase lag)}

Series RLC impedance: Z=R+jωL+1jωC=R+j(ωL1ωC)Z = R + j\omega L + \frac{1}{j\omega C} = R + j\left(\omega L - \frac{1}{\omega C}\right)

Resonance condition: ω0L=1/(ω0C)\omega_0 L = 1/(\omega_0 C) implies ω0=1/LC\omega_0 = 1/\sqrt{LC}, Z=RZ = R (pure resistance).


2. Complex Functions and Analytic Functions

2.1 Complex Functions

f(z)=f(x+iy)=u(x,y)+iv(x,y)f(z) = f(x + iy) = u(x, y) + iv(x, y)

where uu and vv are real-valued functions.

Examples: f(z)=z2=(x+iy)2=x2y2+i(2xy)f(z) = z^2 = (x+iy)^2 = x^2 - y^2 + i(2xy)

u(x,y)=x2y2,v(x,y)=2xyu(x,y) = x^2 - y^2, \quad v(x,y) = 2xy

f(z)=ez=ex+iy=ex(cosy+isiny)f(z) = e^z = e^{x+iy} = e^x(\cos y + i\sin y)

u(x,y)=excosy,v(x,y)=exsinyu(x,y) = e^x\cos y, \quad v(x,y) = e^x\sin y

2.2 Complex Differentiation and the Cauchy-Riemann Equations

The complex derivative of f(z)f(z): f(z0)=limΔz0f(z0+Δz)f(z0)Δzf'(z_0) = \lim_{\Delta z\to 0}\frac{f(z_0 + \Delta z) - f(z_0)}{\Delta z}

Unlike real analysis, Δz\Delta z can approach 0 from any direction in the complex plane, and the limit must be the same regardless of direction.

Along the real axis (Δz=Δx\Delta z = \Delta x): f(z)=ux+ivxf'(z) = \frac{\partial u}{\partial x} + i\frac{\partial v}{\partial x}

Along the imaginary axis (Δz=iΔy\Delta z = i\Delta y): f(z)=iuy+vyf'(z) = -i\frac{\partial u}{\partial y} + \frac{\partial v}{\partial y}

For these two expressions to be equal:

ux=vy,uy=vx\boxed{\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}}

These are the Cauchy-Riemann Equations.

If the partial derivatives of uu and vv are continuous and satisfy the Cauchy-Riemann equations, f(z)f(z) is an analytic function.

2.3 Harmonic Functions

The real and imaginary parts of an analytic function each satisfy Laplace's equation:

2u=2ux2+2uy2=0,2v=2vx2+2vy2=0\nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0, \quad \nabla^2 v = \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2} = 0

From Cauchy-Riemann: uxx=vyxu_{xx} = v_{yx} and uyy=vxyu_{yy} = -v_{xy}, so uxx+uyy=0u_{xx} + u_{yy} = 0.

Given uu, the Cauchy-Riemann equations allow you to find the harmonic conjugate vv.

Engineering significance: velocity potential and stream function in potential flow; electric potential and field lines in electrostatics.

import numpy as np
import matplotlib.pyplot as plt

# Visualize Cauchy-Riemann orthogonality for f(z) = z^2
x = np.linspace(-2, 2, 400)
y = np.linspace(-2, 2, 400)
X, Y = np.meshgrid(x, y)

U = X**2 - Y**2   # Re(z^2)
V = 2 * X * Y     # Im(z^2)

fig, axes = plt.subplots(1, 2, figsize=(12, 5))
for ax, data, title in zip(axes, [U, V],
        ['Re(z^2) = x^2 - y^2', 'Im(z^2) = 2xy']):
    c = ax.contour(X, Y, data, levels=20, cmap='RdBu')
    ax.set_title(title)
    ax.set_xlabel('x')
    ax.set_ylabel('y')
    ax.set_aspect('equal')
    plt.colorbar(c, ax=ax)

plt.suptitle('Level curves of f(z)=z^2: orthogonal grids (Cauchy-Riemann)', fontsize=12)
plt.tight_layout()
plt.savefig('cauchy_riemann_z2.png', dpi=150)
plt.show()

2.4 Important Analytic Functions

Trigonometric functions: cosz=eiz+eiz2,sinz=eizeiz2i\cos z = \frac{e^{iz} + e^{-iz}}{2}, \quad \sin z = \frac{e^{iz} - e^{-iz}}{2i}

Unlike their real counterparts, they can become unbounded: cos(iy)=coshy|\cos(iy)| = \cosh y \to \infty.

Logarithm (multi-valued): lnz=lnr+i(θ+2kπ),kZ\ln z = \ln r + i(\theta + 2k\pi), \quad k \in \mathbb{Z}

Principal value: Lnz=lnr+iθ\text{Ln}\,z = \ln r + i\theta, π<θπ-\pi < \theta \leq \pi. Singularities occur at z=0z = 0 and along the negative real axis (branch cut).


3. Complex Integration

3.1 Contour Integrals

CC: a curve parameterized by z(t)=x(t)+iy(t)z(t) = x(t) + iy(t), atba \leq t \leq b

Cf(z)dz=abf(z(t))z(t)dt\int_C f(z)\,dz = \int_a^b f(z(t))z'(t)\,dt

Example: Cz2dz\int_C z^2\,dz along the straight line from 00 to 1+i1+i

Parameterization: z(t)=t(1+i)z(t) = t(1+i), z(t)=1+iz'(t) = 1+i, 0t10 \leq t \leq 1

01t2(1+i)2(1+i)dt=(2i)(1+i)13=2+2i3\int_0^1 t^2(1+i)^2(1+i)\,dt = (2i)(1+i)\cdot\frac{1}{3} = \frac{-2+2i}{3}

3.2 Cauchy's Integral Theorem

Cf(z)dz=0\oint_C f(z)\,dz = 0

Condition: f(z)f(z) analytic on and inside the simple closed curve CC.

Intuition: the integral of an analytic function is path-independent. Using Green's theorem together with the Cauchy-Riemann equations forces both real parts of the integral to vanish.

Antiderivative: if F(z)=f(z)F'(z) = f(z), then abf(z)dz=F(b)F(a)\int_a^b f(z)\,dz = F(b) - F(a).

3.3 Cauchy's Integral Formula

f(a)=12πiCf(z)zadz\boxed{f(a) = \frac{1}{2\pi i}\oint_C \frac{f(z)}{z-a}\,dz}

Conditions: f(z)f(z) analytic on and inside CC; aa lies inside CC.

Higher-order derivative formula: f(n)(a)=n!2πiCf(z)(za)n+1dzf^{(n)}(a) = \frac{n!}{2\pi i}\oint_C \frac{f(z)}{(z-a)^{n+1}}\,dz

This proves that analytic functions are infinitely differentiable.

import numpy as np

def cauchy_integral_formula(f, a, R=1.0, N=2000):
    """Numerically verify f(a) = (1/2pi*i) integral f(z)/(z-a) dz."""
    theta = np.linspace(0, 2*np.pi, N, endpoint=False)
    z = a + R * np.exp(1j * theta)
    dz = np.diff(np.append(z, z[0]))
    integrand = f(z[:-1]) / (z[:-1] - a)
    return np.sum(integrand * dz) / (2 * np.pi * 1j)

a = 1 + 1j
numerical = cauchy_integral_formula(np.exp, a)
print(f"Cauchy formula result : {numerical:.6f}")
print(f"Exact  exp(1+j)       : {np.exp(a):.6f}")
print(f"Error                 : {abs(numerical - np.exp(a)):.2e}")

4. Laurent Series and the Residue Theorem

4.1 Taylor Series vs Laurent Series

Taylor series (analytic at z0z_0): f(z)=n=0an(zz0)n,an=f(n)(z0)n!f(z) = \sum_{n=0}^{\infty}a_n(z-z_0)^n, \quad a_n = \frac{f^{(n)}(z_0)}{n!}

Laurent series (annular region r1<zz0<r2r_1 < |z - z_0| < r_2):

f(z)=n=an(zz0)nf(z) = \sum_{n=-\infty}^{\infty}a_n(z-z_0)^n

The negative-power terms form the principal part. The difference: Laurent series can represent functions with singularities; the structure of the principal part classifies the singularity.

4.2 Classification of Singularities

Removable: no negative-power terms. Example: sinz/z\sin z / z at z=0z = 0.

Pole of order m: finitely many negative-power terms; f(z)=g(z)/(zz0)mf(z) = g(z)/(z-z_0)^m with gg analytic and g(z0)0g(z_0) \neq 0.

Essential singularity: infinitely many negative-power terms. Example: e1/ze^{1/z} at z=0z = 0.

Picard's theorem: near an essential singularity, ff takes almost every complex value.

4.3 The Residue Theorem

Residue: the coefficient of (zz0)1(z-z_0)^{-1} in the Laurent expansion.

Res[f,z0]=b1=12πizz0=ϵf(z)dz\text{Res}[f, z_0] = b_1 = \frac{1}{2\pi i}\oint_{|z-z_0|=\epsilon} f(z)\,dz

Computing residues:

Simple pole: Res[f,z0]=limzz0(zz0)f(z)\text{Res}[f, z_0] = \lim_{z\to z_0}(z - z_0)f(z)

Rational f=p/qf = p/q at a simple pole: Res[f,z0]=p(z0)/q(z0)\text{Res}[f, z_0] = p(z_0)/q'(z_0)

Pole of order mm: Res[f,z0]=1(m1)!limzz0dm1dzm1[(zz0)mf(z)]\text{Res}[f, z_0] = \frac{1}{(m-1)!}\lim_{z\to z_0}\frac{d^{m-1}}{dz^{m-1}}\left[(z-z_0)^m f(z)\right]

Residue Theorem: Cf(z)dz=2πikRes[f,zk]\oint_C f(z)\,dz = 2\pi i \sum_k \text{Res}[f, z_k]

where zkz_k are all singularities inside CC.

4.4 Evaluating Real Integrals

Example 1: dx1+x2\displaystyle\int_{-\infty}^{\infty}\frac{dx}{1+x^2}

Pole in the upper half-plane: z=iz = i. Residue: 1/(2i)1/(2i). By the residue theorem and Jordan's lemma: I=2πi12i=πI = 2\pi i \cdot \frac{1}{2i} = \pi

Example 2: 0cosxx2+a2dx(a>0)\displaystyle\int_0^{\infty}\frac{\cos x}{x^2+a^2}dx \quad (a > 0)

Consider f(z)=eiz/(z2+a2)f(z) = e^{iz}/(z^2+a^2). Pole at z=iaz = ia, residue ea/(2ia)e^{-a}/(2ia). Taking the real part: I=πea/(2a)I = \pi e^{-a}/(2a).

Example 3: 02πdθ2+cosθ\displaystyle\int_0^{2\pi}\frac{d\theta}{2+\cos\theta}

Substitute z=eiθz = e^{i\theta}, cosθ=(z+z1)/2\cos\theta = (z + z^{-1})/2: =2dzi(z2+4z+1)=2π3= \oint\frac{2\,dz}{i(z^2+4z+1)} = \frac{2\pi}{\sqrt{3}}

4.5 Inverse Laplace Transform via Residues

Bromwich Integral: f(t)=12πiσiσ+iF(s)estds=kRes[F(s)est,sk]f(t) = \frac{1}{2\pi i}\int_{\sigma-i\infty}^{\sigma+i\infty}F(s)e^{st}\,ds = \sum_k \text{Res}\left[F(s)e^{st}, s_k\right]

Example: F(s)=1/(s2+ω2)F(s) = 1/(s^2+\omega^2), poles s=±iωs = \pm i\omega

f(t)=eiωt2iω+eiωt2iω=sinωtωf(t) = \frac{e^{i\omega t}}{2i\omega} + \frac{e^{-i\omega t}}{-2i\omega} = \frac{\sin\omega t}{\omega}


5. Conformal Mappings

5.1 Definition and Angle Preservation

An analytic function w=f(z)w = f(z) with f(z)0f'(z) \neq 0 defines a conformal mapping: it preserves angles and orientation between curves at every point.

5.2 Mobius Transformation

w=az+bcz+d,adbc0w = \frac{az + b}{cz + d}, \quad ad - bc \neq 0

Properties:

  • Maps circles and lines to circles and lines
  • Any three distinct points can be mapped to any other three
  • Composition of Mobius maps is again a Mobius map

Key examples:

  • w=1/zw = 1/z: inversion
  • w=(za)/(1aˉz)w = (z - a)/(1 - \bar{a}z): maps the unit disk to itself
  • w=(1+z)/(1z)w = (1 + z)/(1 - z): maps the unit disk to the right half-plane

5.3 Engineering Applications

Potential flow: conformal mappings transform complicated domain geometries (e.g., airfoils) into simple ones (half-plane, disk), enabling analytic solutions.

Electrostatics: find field distributions between irregular electrodes by mapping to standard geometries.

Digital filter design: the bilinear transform s=2(z1)/[Ts(z+1)]s = 2(z-1)/[T_s(z+1)] is a conformal map converting the jωj\omega axis exactly onto the unit circle.

import numpy as np
import matplotlib.pyplot as plt

def mobius(z, a=1, b=-1, c=1, d=1):
    return (a * z + b) / (c * z + d)

theta = np.linspace(0, 2*np.pi, 300)
r_vals = [0.3, 0.6, 0.9, 1.0]

fig, axes = plt.subplots(1, 2, figsize=(12, 6))

for r in r_vals:
    z_c = r * np.exp(1j * theta)
    w_c = mobius(z_c)
    axes[0].plot(z_c.real, z_c.imag, linewidth=1.5)
    axes[1].plot(w_c.real, w_c.imag, linewidth=1.5)

for phi in np.linspace(0, 2*np.pi, 12, endpoint=False):
    r_line = np.linspace(0.01, 0.99, 100)
    z_l = r_line * np.exp(1j * phi)
    w_l = mobius(z_l)
    axes[0].plot(z_l.real, z_l.imag, 'gray', alpha=0.4, linewidth=0.8)
    axes[1].plot(w_l.real, w_l.imag, 'gray', alpha=0.4, linewidth=0.8)

for ax, title in zip(axes, ['z-plane (unit disk)', 'w-plane: w = (z-1)/(z+1)']):
    ax.set_xlim([-2, 2])
    ax.set_ylim([-2, 2])
    ax.axhline(0, color='k', linewidth=0.5)
    ax.axvline(0, color='k', linewidth=0.5)
    ax.set_aspect('equal')
    ax.set_title(title)
    ax.grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('mobius_transform.png', dpi=150)
plt.show()

6. Z-Transform

6.1 Definition and Region of Convergence

X(z)=Z{x[n]}=n=x[n]znX(z) = \mathcal{Z}\{x[n]\} = \sum_{n=-\infty}^{\infty}x[n]z^{-n}

Region of Convergence (ROC):

  • Causal signal: z>rmax|z| > r_{\max}
  • Anti-causal signal: z<rmin|z| < r_{\min}
  • Two-sided signal: annular region r1<z<r2r_1 < |z| < r_2

6.2 Key Z-Transform Pairs

| Signal x[n]x[n] | X(z)X(z) | ROC | | --------------------------- | ------------------------------------------ | ------- | --- | --- | --- | --- | | δ[n]\delta[n] | 11 | all zz | | u[n]u[n] | z/(z1)z/(z-1) | z>1 | z | >1 | | anu[n]a^n u[n] | z/(za)z/(z-a) | z>a | z | > | a | | | cosΩ0nu[n]\cos\Omega_0 n \cdot u[n] | z(zcosΩ0)/(z22zcosΩ0+1)z(z-\cos\Omega_0)/(z^2-2z\cos\Omega_0+1) | z>1 | z | >1 | | nu[n]nu[n] | z/(z1)2z/(z-1)^2 | z>1 | z | >1 |

6.3 Properties of the Z-Transform

  • Time shift: Z{x[nk]}=zkX(z)\mathcal{Z}\{x[n-k]\} = z^{-k}X(z) (z1z^{-1} = unit delay operator)
  • Convolution: Z{x[n]h[n]}=X(z)H(z)\mathcal{Z}\{x[n]*h[n]\} = X(z)H(z)
  • Final value: limnx[n]=limz1(z1)X(z)\lim_{n\to\infty} x[n] = \lim_{z\to 1}(z-1)X(z)

6.4 Digital Filter Design

Transfer function: H(z)=b0+b1z1++bMzM1+a1z1++aNzNH(z) = \frac{b_0 + b_1 z^{-1} + \cdots + b_M z^{-M}}{1 + a_1 z^{-1} + \cdots + a_N z^{-N}}

Stability: all poles must satisfy pk<1|p_k| < 1.

FIR: poles only at origin — always stable, can achieve linear phase.

IIR: feedback poles can be anywhere — sharper characteristics with fewer coefficients, but requires stability check.

from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

b, a = signal.butter(4, 0.2, btype='low')
w, h = signal.freqz(b, a, worN=2048)
zeros, poles, gain = signal.tf2zpk(b, a)

fig, axes = plt.subplots(1, 2, figsize=(12, 5))

axes[0].plot(w/np.pi, 20*np.log10(abs(h) + 1e-15), 'b-', linewidth=2)
axes[0].axhline(-3, color='r', linestyle='--', label='-3 dB')
axes[0].set_xlabel('Normalized Frequency')
axes[0].set_ylabel('Magnitude (dB)')
axes[0].set_title('Butterworth LPF (order 4)')
axes[0].set_xlim([0, 1])
axes[0].legend()
axes[0].grid(True, alpha=0.3)

unit_circle = np.exp(1j * np.linspace(0, 2*np.pi, 200))
axes[1].plot(unit_circle.real, unit_circle.imag, 'k--', alpha=0.5)
axes[1].scatter(zeros.real, zeros.imag, s=100, marker='o', color='blue', label='Zeros')
axes[1].scatter(poles.real, poles.imag, s=100, marker='x', color='red', linewidths=2, label='Poles')
axes[1].set_title('Pole-Zero Plot (z-plane)')
axes[1].set_aspect('equal')
axes[1].legend()
axes[1].grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('butterworth_lpf.png', dpi=150)
plt.show()
print(f"Pole magnitudes: {np.abs(poles)}")

6.5 s-Plane to z-Plane Correspondence

z=esTsz = e^{sT_s}

| s-plane | z-plane | | ------------------------------- | ------------- | --- | ---- | | jωj\omega axis (σ=0\sigma = 0) | Unit circle z=1 | z | = 1 | | Left half-plane (σ<0\sigma < 0) | Interior z<1 | z | < 1 | | Right half-plane (σ>0\sigma > 0) | Exterior z>1 | z | > 1 |

Stability: continuous poles in left half-plane correspond to discrete poles inside the unit circle.

Bilinear transform (analog to digital without aliasing): s=2Tsz1z+1s = \frac{2}{T_s}\cdot\frac{z-1}{z+1}


7. Applications to AI and Signal Processing

7.1 Complex-Valued Neural Networks

Complex-valued neural networks process signals in the amplitude-phase domain. The Wirtinger derivative generalizes complex differentiation to non-analytic functions used in machine learning, enabling gradient-based optimization in the complex domain.

7.2 Loss Landscape Geometry

Complex analysis tools characterize critical points of neural network loss functions. Saddle points, local minima, and their basins of attraction can be studied through the lens of analytic function theory and conformal geometry.

import numpy as np
import matplotlib.pyplot as plt

# Domain coloring of sin(z)/z — removable singularity at z=0
x = np.linspace(-5, 5, 600)
y = np.linspace(-3, 3, 600)
X, Y = np.meshgrid(x, y)
Z = X + 1j * Y

with np.errstate(invalid='ignore', divide='ignore'):
    F = np.where(np.abs(Z) < 1e-10, 1.0 + 0j, np.sin(Z) / Z)

fig, axes = plt.subplots(1, 2, figsize=(14, 5))
im1 = axes[0].pcolormesh(X, Y, np.abs(F), cmap='viridis', vmax=2.5)
axes[0].set_title('|sin(z)/z| — modulus')
axes[0].set_xlabel('Re(z)')
axes[0].set_ylabel('Im(z)')
axes[0].set_aspect('equal')
plt.colorbar(im1, ax=axes[0])

im2 = axes[1].pcolormesh(X, Y, np.angle(F), cmap='hsv')
axes[1].set_title('arg(sin(z)/z) — phase')
axes[1].set_xlabel('Re(z)')
axes[1].set_ylabel('Im(z)')
axes[1].set_aspect('equal')
plt.colorbar(im2, ax=axes[1])

plt.suptitle('Domain coloring of sin(z)/z (removable singularity at 0)', fontsize=12)
plt.tight_layout()
plt.savefig('domain_coloring_sinc.png', dpi=150)
plt.show()

Summary and Next Steps

Topics covered in this guide:

  1. Complex number system: rectangular form, polar form, Euler's formula, De Moivre, phasor analysis, impedance
  2. Complex functions and analytic functions: Cauchy-Riemann equations, harmonic functions
  3. Complex integration: contour integrals, Cauchy's theorem, Cauchy's integral formula
  4. Laurent series and the residue theorem: singularity classification, residue computation, real integrals, inverse Laplace
  5. Conformal mappings: Mobius transformation, angle preservation, engineering applications
  6. Z-transform: ROC, key transform pairs, solving difference equations
  7. Digital filter design: FIR/IIR, pole-zero plots, stability, bilinear transform
  8. AI applications: complex-valued networks, optimization landscape geometry

The next installment covers Numerical Methods: solving equations, numerical differentiation and integration, ODE solvers, and interpolation — all implemented in Python.


References

  • Churchill, R. & Brown, J. "Complex Variables and Applications", 9th Edition
  • Oppenheim, A. & Schafer, R. "Discrete-Time Signal Processing", 3rd Edition
  • Proakis, J. & Manolakis, D. "Digital Signal Processing", 4th Edition
  • Ogata, K. "Modern Control Engineering", 5th Edition
  • SciPy signal processing documentation

Quiz

Q1. What do the Cauchy-Riemann equations state, and what do they imply about analytic functions?

Answer: The Cauchy-Riemann equations are u/x=v/y\partial u/\partial x = \partial v/\partial y and u/y=v/x\partial u/\partial y = -\partial v/\partial x.

Explanation: For the complex derivative to exist, the limit [f(z+Δz)f(z)]/Δz[f(z + \Delta z) - f(z)] / \Delta z must be the same regardless of the direction in which Δz\Delta z approaches 0. Taking horizontal and vertical limits and equating them yields these two PDE conditions. When satisfied (with continuous partials), f(z)f(z) is analytic — infinitely differentiable and locally representable as a convergent power series. A key consequence is that both uu and vv satisfy Laplace's equation (they are harmonic functions), linking complex analysis to potential theory in physics and engineering.

Q2. Why does Cauchy's theorem say the integral of an analytic function around a closed contour is zero?

Answer: Because analytic functions have path-independent integrals, so any closed-loop integral vanishes.

Explanation: Writing Cf(z)dz\oint_C f(z)\,dz in terms of uu and vv, one obtains two real line integrals. Green's theorem converts each to a double integral over the enclosed region, and the Cauchy-Riemann equations force both integrands to zero. Geometrically, since the integral depends only on endpoints, starting and ending at the same point gives zero. This is the complex-analysis counterpart of conservative vector fields: the work integral around any closed loop is zero.

Q3. What is the difference between a Taylor series and a Laurent series?

Answer: A Taylor series contains only non-negative powers of (zz0)(z - z_0); a Laurent series also includes negative powers.

Explanation: A Taylor series is valid when ff is analytic at z0z_0. A Laurent series is valid in an annular region and is necessary when ff has a singularity at z0z_0. The negative-power terms (the principal part) classify the singularity: no negative terms means removable, finitely many means a pole, and infinitely many means an essential singularity. The coefficient a1a_{-1} of (zz0)1(z-z_0)^{-1} is the residue, the central quantity in the residue theorem.

Q4. How does the residue theorem simplify real integral calculations?

Answer: It converts a real integral into a contour integral in the complex plane, reducing the calculation to finding residues at poles — a straightforward algebraic step.

Explanation: Many definite real integrals are difficult by real-variable methods. By extending the integrand to the complex plane, choosing a contour (e.g., a large semicircle in the upper half-plane), and showing the extra arc contributes nothing (Jordan's lemma), the residue theorem gives the answer as 2πi2\pi i times the sum of enclosed residues. For R(x)dx\int_{-\infty}^{\infty} R(x)\,dx this approach reduces what might be an intractable antiderivative problem to computing limits at poles.

Q5. Conformal mappings preserve angles — what are their practical applications?

Answer: Conformal mappings are used in fluid dynamics, electrostatics, and digital filter design to transform complex geometries into tractable ones while preserving governing equations.

Explanation: Because conformal maps preserve angles and the Laplacian structure, boundary-value problems in complicated domains (fluid around an airfoil, field between irregular electrodes) can be mapped to simple domains (half-plane, disk) where solutions are known. In digital signal processing, the bilinear transform is a conformal map converting the jωj\omega axis exactly onto the unit circle, enabling analog-to-digital filter conversion while preserving stability. The Mobius transformation class is especially versatile because it maps circles and lines to circles and lines.