Residue¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
Residue[f, {z, z0}]
gives the residue of f at the isolated singularity z = z0 -- the coefficient of (z - z0)^-1 in the Laurent expansion of f.
Notes
Computed by power-series expansion, so a residue is found only where f admits a Laurent series at z0. Returns unevaluated at branch points (fractional-power expansions) and when no series can be produced. See NResidue for a numerical alternative that also handles essential singularities.Examples (9)¶
Every input below was run against the current Mathilda build and its output recorded.
Basic examples (9)¶
In[1]:= Residue[1/z, {z, 0}]
Out[1]= 1
In[2]:= Residue[1/z^2, {z, 0}]
Out[2]= 0
In[3]:= Residue[1/Sin[z]^5, {z, 0}]
Out[3]= 3/8
Order-2 pole
Complex pole
Algebraic pole
Unknown numerator
Branch point
Algorithm¶
residue.c -- Residue[expr, {z, z0}], the symbolic residue.
The residue of f at an isolated singularity z = z0 is the coefficient of (z - z0)^-1 in the Laurent expansion of f. We obtain it directly from the series engine: expand f to order (z - z0)^0 (which always spans the -1 term, however deep the pole), then read the coefficient at exponent -1 out of the resulting SeriesData[z, z0, {coefs}, nmin, nmax, den].
A residue is well defined only for an ordinary Laurent expansion (den == 1). A fractional-power (Puiseux) expansion, den > 1, signals a branch point, where the residue is undefined -- we leave the call unevaluated, matching Mathematica (e.g. Residue[1/Sqrt[z], {z, 0}]).
evaluating the denominator there and testing it against zero; but for a pole whose location is a SUM of radicals (e.g. z0 = -2 + Sqrt[3], a root of 1 + 4 z + z^2), Denominator(z0) is an expression like 1 + 4 (-2 + Sqrt[3]) + (-2 + Sqrt[3])^2 that does not auto-simplify to 0, so
expanding about z0 EXPLICITLY: substitute z -> z0 + w, then Expand the denominator of the result -- polynomial expansion collapses the radical arithmetic (Sqrt[3]^2 -> 3, ...) so the vanishing constant term becomes a
coefficient is then a plain Series-at-0 of the expanded form.
Implementation notes¶
Attributes: Protected.
References¶
See also: NResidue, Together, Zeta
- Source:
src/info.c - Specification:
docs/spec/builtins/calculus.md - Tests:
tests/test_residue.c