This module provides symbolic-numerical tools for computing the asymptotic
behaviour of parameter-dependent integrals of the form
I(λ) = ∫ a(x) exp(iλφ(x)) dx, λ → +∞
as the large parameter λ grows without bound. The nature of the phase
function φ determines which asymptotic method applies:
φ
Integral form
Method
real
oscillatory
Stationary phase
purely imaginary
exponentially damped
Laplace
genuinely complex
oscillatory + damped
Saddle-point (method of steepest
descent)
The correct method is selected automatically from the symbolic expression
of φ when the analyzer is initialised (method=IntegralMethod.AUTO, the
default). It can also be set explicitly.
All three methods share the same underlying idea: the dominant contribution
to I(λ) as λ → ∞ comes from a small neighbourhood of a critical point
x_c where ∇φ(x_c) = 0. Away from x_c, rapid oscillations (or exponential
decay) make the integrand self-cancelling.
Stationary phase (φ real)
The leading term at a non-degenerate critical point (det ∇²φ ≠ 0,
Morse point) is
where n is the dimension and μ = n − 2σ is the Maslov index (σ =
number of negative eigenvalues of ∇²φ). Degenerate critical points
require special treatment: corank-1 singularities with a non-zero
cubic term yield Airy integrals (decay O(λ^(−1/3)) in 1D,
O(λ^(−5/6)) in 2D); those with a vanishing cubic but non-zero quartic
term yield Pearcey integrals (decay O(λ^(−3/4))).
Laplace’s method (φ = iψ, ψ real)
The integrand concentrates exponentially around the minimum x_c of ψ.
The leading term is identical to the stationary-phase formula with the
oscillatory factor replaced by a real Gaussian:
A second-order correction O(λ^(−n/2−1)) involving amplitude
derivatives and phase anharmonicity (cubic/quartic tensors) is also
computed.
Saddle-point / steepest descent (φ complex)
The integration contour is deformed into ℂⁿ to pass through a saddle
point z_c ∈ ℂⁿ satisfying ∇φ(z_c) = 0. On the steepest-descent
contour through z_c the phase Im(λφ) is stationary and Re(λφ) grows
as fast as possible, making the integrand a complex Gaussian. The
asymptotic formula is formally identical to the Morse case:
where the square root is taken on the principal branch.
Limitation: this implementation uses a naive continuation strategy
(minimising |∇φ(z)|² over ℝ^(2n)) and does NOT verify that the
original contour can be deformed through the found saddle (Picard-
Lefschetz theory). A RuntimeWarning is always emitted.
Handles symbolic analysis of phase and amplitude functions.
Supports three integration paradigms selected via method:
IntegralMethod.STATIONARY_PHASE:
Oscillatory integrals I(λ) = ∫ a(x) exp(iλφ(x)) dx, φ real.
All singularity types (Morse, Airy, Pearcey) are supported.
IntegralMethod.LAPLACE:
Exponentially damped integrals I(λ) = ∫ a(x) exp(-λφ(x)) dx, φ real.
Only non-degenerate minima of φ are relevant.
IntegralMethod.SADDLE_POINT:
Mixed integrals I(λ) = ∫ a(x) exp(iλφ(x)) dx, φ genuinely complex.
Saddle points are searched in ℂⁿ by continuation from real guesses.
IntegralMethod.AUTO (default):
The analyzer inspects φ symbolically and chooses automatically among
the three concrete methods. The resolved method is written back to
self.method after __init__ completes.
The main workflow is:
Initialize with symbolic SymPy expressions (method=AUTO by default).
Find critical / saddle points using find_critical_points().
Analyze each point using analyze_point().
Use AsymptoticEvaluator (unified façade) to compute contributions.
Perform complete analysis of a critical point (real or complex).
For STATIONARY_PHASE and LAPLACE the coordinates xc are real (numpy
float array). For SADDLE_POINT, xc may be complex (numpy complex
array produced by SaddlePointEvaluator.find_saddle_points).
Computes all geometric and analytical properties needed for asymptotic
evaluation:
- Phase value φ(x_c) and amplitude value a(x_c)
- Hessian matrix ∇²φ and its properties (determinant, eigenvalues,
signature)
Higher-order derivatives: D3 and D4 tensors of φ, gradients and
Hessians of a
Classification of singularity type (Morse, Airy, Pearcey, etc.)
Canonical coefficients for degenerate cases
Hessian inverse (for Morse points only)
Parameters:
xc – Coordinates of the critical point. Real numpy array for
STATIONARY_PHASE / LAPLACE; complex numpy array for
SADDLE_POINT.
Returns:
CriticalPoint object containing all computed properties.
Delegates to caustics.find_critical_points_numerical, the shared
numerical kernel (L-BFGS-B minimisation of |∇φ|² + DBSCAN dedup).
Parameters:
initial_guesses – List of starting coordinate arrays for optimization.
If None, uses [0, …] and domain center (if domain is specified).
Provide multiple guesses to search for multiple critical points.
Returns:
List of unique critical point coordinates (as numpy arrays) found within
the specified tolerance. Empty list if no critical points are found.
For Morse points, the correction term is of order λ^(-n/2-1) relative to λ^(-n/2).
For degenerate singularities (Airy, Pearcey), typically only the leading term
is computed, as correction terms require more sophisticated analysis.
>>> analyzer=Analyzer(phi,amp,[x,y])# AUTO by default>>> print(analyzer.method)# e.g. IntegralMethod.SADDLE_POINT>>> pts=analyzer.find_critical_points([np.array([0.,0.])])>>> cp=analyzer.analyze_point(pts[0])>>> result=AsymptoticEvaluator().evaluate(cp,lam=100)>>> print(result.method,result.total_value)
For SADDLE_POINT, use SaddlePointEvaluator.find_saddle_points() to
obtain complex coordinates before calling analyze_point():
Evaluate the asymptotic contribution at parameter λ.
The evaluation method is selected from cp.method:
- STATIONARY_PHASE → full singularity-type dispatch (Morse, Airy, Pearcey …)
- LAPLACE → Laplace formula with O(1/λ) corrections
- SADDLE_POINT → complex Morse formula (naive; see SaddlePointEvaluator)
Parameters:
cp (CriticalPoint) – Critical/saddle point from Analyzer.analyze_point().
Visualization toolkit for asymptotic analysis — supports all three integration
methods (STATIONARY_PHASE, LAPLACE, SADDLE_POINT).
Provides three diagnostic plots, each adapted to the nature of the phase φ:
plot_phase_landscape
2D contour map of φ with critical / saddle-point overlay.
- φ real (STATIONARY_PHASE) : single panel, Re(φ).
- φ imag (LAPLACE) : single panel, Im(φ) = ψ (the damping potential).
- φ complex (SADDLE_POINT) : two panels side-by-side, Re(φ) and Im(φ).
The display parameter overrides the automatic choice
(‘real’, ‘imag’, ‘both’, ‘abs’, ‘arg’).
plot_integrand
2D map of the integrand f(x,y) = a(x,y)·exp(iλφ(x,y)) at a given λ.
- STATIONARY_PHASE : single panel, Re(f) — pure oscillation, |f| = const.
- LAPLACE : single panel, Re(f) = a·exp(-λψ) — exponential envelope.
- SADDLE_POINT : two panels, Re(f) and |f| = |a|·exp(-λ Im φ), revealing
both the oscillation pattern and the exponential damping.
plot_asymptotic_convergence
Log-log plot of |I₀(λ)| and |I₁(λ)| vs λ for any dimension and any method.
Overlays the theoretical decay slope λ^(-p) for verification.
Notes
plot_phase_landscape and plot_integrand require dim = 2.
plot_asymptotic_convergence works for any dimension.
Log-log convergence diagnostic for any method and any dimension.
Plots |I₀(λ)| and |I₁(λ)| vs λ and compares the empirical slope
with the theoretical decay exponent −p:
Parameters:
cp (CriticalPoint) – Critical / saddle point (any method, any dimension).
lambda_start (float) – Minimum λ for the convergence sweep (default 10).
lambda_end (float) – Maximum λ (default 1000).
num_points (int) – Number of log-spaced λ samples (default 50).
Notes
A straight line on the log-log plot confirms the asymptotic regime.
Deviations at small λ indicate pre-asymptotic behaviour.
The correction term |I₁| should be parallel to |I₀| but shifted
down by slope −1 for Morse / Laplace points.
points_per_axis (int) – Grid resolution (default 200). Increase for large λ to resolve
fine oscillations.
Notes
For STATIONARY_PHASE, as λ increases the oscillations become finer
everywhere except near stationary points (∇φ = 0), where the phase
is locally flat — this is the geometric core of the method.
For LAPLACE, the integrand concentrates sharply around the minimum of
Im(φ) = ψ, illustrating why only a small neighbourhood contributes.
For SADDLE_POINT, |f| reveals the exponential ridge structure while
Re(f) shows the additional rapid oscillations along the ridge.
Stores all geometric and analytical properties of a critical point.
A critical point x_c satisfies ∇φ(x_c) = 0. This class contains all the data
needed to compute its asymptotic contribution to the stationary phase integral
∫ a(x) exp(iλφ(x)) dx as λ → ∞.
Coefficients for normal forms
(Airy/Pearcey canonical representations). Contains keys like ‘cubic’,
‘quartic’, ‘quadratic_transverse’ depending on singularity type.
The integrand is real and exponentially damped; contributions arise
from minima of ψ where ∇ψ = 0 and ∇²ψ > 0.
Typical applications: large deviations, Bayesian inference,
statistical mechanics partition functions.
SADDLE_POINT: φ is genuinely complex, φ = φ_R + i·φ_I with both
φ_R ≠ 0 and φ_I ≠ 0.
The integrand both oscillates and is exponentially modulated.
Contributions come from saddle points in ℂⁿ found by analytically
continuing ∇φ(z) = 0 into the complex plane. The integration contour
must be deformed to pass through these saddle points along the
steepest-descent direction.
Note: this implementation uses a naive continuation strategy; see
SaddlePointEvaluator for limitations.
AUTO: automatic detection (default).
The analyzer inspects φ symbolically (via sympy.im / sympy.re) and
falls back to a numerical test if the symbolic check is inconclusive.
The detected method is stored back in Analyzer.method
after __init__ so the user can always query which method was chosen.
Evaluator for exponentially damped integrals of the form:
I(λ) = ∫ a(x) exp(-λ φ(x)) dx, λ → +∞
Uses Laplace’s method with second-order asymptotic corrections O(λ^(-n/2-1)).
The critical point must be a strict minimum of φ (positive definite Hessian).
Saddle points and maxima are not supported: the Laplace method relies on the
Gaussian concentration of the integrand around the minimum.
Returns an AsymptoticContribution with method=IntegralMethod.LAPLACE for
consistency with StationaryPhaseEvaluator.
where both the real part φ_R and the imaginary part φ_I are non-trivial.
The integrand simultaneously oscillates (φ_R) and is exponentially damped
(φ_I). The asymptotic contribution is dominated by saddle points in ℂⁿ,
i.e. solutions of ∇φ(z) = 0 with z ∈ ℂⁿ.
Contour validity is NOT checked. The naive continuation finds a
saddle point algebraically but does NOT verify that the original
real integration contour can be deformed through that saddle without
crossing other singularities (Picard-Lefschetz theory). A
RuntimeWarning is always emitted to remind the user of this.
Branch choice. The complex square root √det H is multi-valued.
This implementation uses numpy’s principal branch (argument in
(-π, π]). The correct branch depends on the global topology of
the steepest-descent contour.
Multiple saddles. When several saddle points are found, ALL
contributions are returned; their relative signs (Stokes phenomena)
are not resolved.
Degenerate saddles (det H ≈ 0) are not supported; a warning is
issued and a zero contribution is returned.
Evaluate the leading-order saddle-point contribution.
Uses the standard multi-dimensional Morse formula extended to a
complex critical point z_c:
I(λ) ≈ (2π/λ)^(n/2) · a(z_c) · exp(iλφ(z_c))
· 1/√det(∇²φ(z_c))
The complex determinant det(∇²φ(z_c)) is evaluated with numpy’s
principal square root.
Warning
This contribution is valid only if the original integration
contour can be deformed through z_c along a steepest-descent
path. This is NOT verified here (Picard-Lefschetz theory).
Always examine the result critically.
Parameters:
cp (CriticalPoint) – Saddle point with method=SADDLE_POINT, produced by
Analyzer.analyze_point() called with a complex
coordinate returned by find_saddle_points().
lam (float) – Large parameter λ > 0.
Returns:
leading_term : saddle-point formula value.
correction_term : 0j (not implemented for saddle points).
order_leading : n/2.
method : IntegralMethod.SADDLE_POINT.
Computes asymptotic contributions from critical points for large parameter λ.
This class implements the standard stationary phase formulas for different types
of critical points:
- Morse points: Standard stationary phase with second-order corrections
- Airy singularities (1D and 2D): Catastrophe integrals with exact formulas
- Pearcey singularities: Quartic catastrophe integrals
The evaluation includes both leading-order terms and next-order corrections where
applicable (primarily for Morse points). Each method returns an AsymptoticContribution
object containing the computed terms.
Reference:
Wong, “Asymptotic Approximations of Integrals” (1989)
Dispatch evaluation to the appropriate method based on singularity type.
Parameters:
cp – CriticalPoint object with all necessary geometric data.
lam – Large parameter λ in the oscillatory integral I(λ).
Returns:
AsymptoticContribution containing leading term, correction (if computed),
and total value. For HIGHER_ORDER or unknown types, returns zero contribution
with a warning.