Skip to main content

Module complex_path_integrals

Module complex_path_integrals 

Source
Expand description

Contour integrals ∫ f(z) dz of complex functions along paths in the complex plane.

A path is a Contour: a chain of PathSegments (straight lines, circular arcs, or any smooth parametrised curve). Each segment is integrated as ∫ f(z(t)) z'(t) dt with an adaptive 15-point Gauss-Kronrod rule applied to the complex integrand, with the Gauss 7-point rule giving the error estimate.

On top of that are the standard tools of complex analysis: residue, the Cauchy formula for derivatives cauchy_derivative, and the winding_number of a closed path around a point.

See the book entry Complex contour integration.

Structs§

Contour
A path made of consecutive segments.
PathIntegral
The result of a contour integral.

Enums§

PathSegment
One smooth piece of a contour.

Functions§

cauchy_derivative
The n-th derivative f⁽ⁿ⁾(z0) of an analytic function by Cauchy’s integral formula, n!/(2πi) ∮ f(z)/(z - z0)^{n+1} dz, over a circle of the given radius inside the region where f is analytic.
contour_integral
Integrates f along the contour to relative tolerance tol (for example 1e-10) per segment, relative to ∫|f(z)| |dz| along the segment (the smallest error floating point can promise when the integral is small through cancellation).
polyline_integral
The integral along the polyline through vertices (open).
residue
The residue of f at z0: (1/2πi) ∮ f(z) dz over a counter-clockwise circle of the given radius. The circle must enclose z0 and no other singularity of f.
winding_number
The winding number of a closed polygon (vertices in order, implicitly closed) around point: positive for counter-clockwise loops. Computed from the accumulated change of argument, so it is exact for any simple or self-intersecting polygon. None if point lies on the boundary.

Type Aliases§

C64
A double-precision complex number.