ResidueSum[f,z]
finds the sum of residues of the meromorphic function f with the variable z.
ResidueSum[{f,cons},z]
finds the sum of residues of f within the solution set of the constraints cons.
ResidueSum
ResidueSum[f,z]
finds the sum of residues of the meromorphic function f with the variable z.
ResidueSum[{f,cons},z]
finds the sum of residues of f within the solution set of the constraints cons.
Details and Options
- ResidueSum computes the sum of residues at all poles of f. The residue of f at a pole z0 is defined as the coefficient of
in the Laurent expansion of f. - Sums of residues are often used to compute contour integrals using Cauchy's residue theorem.
- The function f should be meromorphic for x satisfying the constraints cons.
- cons can contain equations, inequalities or logical combinations of these.
- The following options can be given:
-
Assumptions $Assumptions assumptions on parameters GenerateConditions Automatic whether to generate conditions on parameters PerformanceGoal $PerformanceGoal whether to prioritize speed or quality
Examples
open all close allBasic Examples (2)
Scope (6)
Sum of residues of a rational function:
ResidueSum[x / (x ^ 2 - 2) + (x - 2) / (x - 1) ^ 2, x]Sum of residues of a meromorphic function in a region:
ResidueSum[{Log[x ^ 2 + 3] / Sin[5x], Abs[x] <= 1}, x]Sum of residues at infinitely many poles may be finite:
ResidueSum[Gamma[x], x]Analytic functions have no poles:
ResidueSum[Sin[x ^ 2 + Cosh[x]] + E ^ x, x]
has a removable singularity at
:
ResidueSum[(1 - Cos[x]) / x ^ 2, x]ResidueSum requires the input function to be meromorphic:
ResidueSum[Log[x] + 1 / (x - 1), x]The function is meromorphic for
:
ResidueSum[{Log[x] + 1 / (x - 1), Re[x] > 0}, x]Options (4)
Assumptions (1)
GenerateConditions (2)
By default, ResidueSum may generate conditions on symbolic parameters:
ResidueSum[{1 / (x - a), x > 0}, x, Assumptions -> Element[a, Reals]]With GenerateConditionsNone, ResidueSum fails instead of giving a conditional result:
ResidueSum[{1 / (x - a), x > 0}, x, Assumptions -> Element[a, Reals], GenerateConditions -> None]This returns a conditionally valid result without stating the condition:
ResidueSum[{1 / (x - a), x > 0}, x, Assumptions -> Element[a, Reals], GenerateConditions -> False]By default, conditions that are generically true are not reported:
ResidueSum[1 / ((x - a)(x - b)), x]With GenerateConditions->True, all conditions are reported:
ResidueSum[1 / ((x - a)(x - b)), x, GenerateConditions -> True]PerformanceGoal (1)
Use PerformanceGoal to avoid potentially expensive computations:
ResidueSum[{Log[a z ^ 2 + b], Re[z] > 0}, z, PerformanceGoal -> "Speed"]//AbsoluteTimingThe default setting uses all available techniques to try to produce a result:
ResidueSum[{Log[a z ^ 2 + b], Re[z] > 0}, z]//AbsoluteTimingApplications (1)
Integrate
along the unit circle:
f = Tan[x ^ 2 - 2x];Compute the sum of residues of
in the unit disk:
ResidueSum[{f, Abs[x] < 1}, x]Compute the integral using the residue theorem:
2Pi I %Compare with the result of numeric integration:
NIntegrate[(f /. x -> Exp[I t])D[Exp[I t], t], {t, 0, 2Pi}] - %//ChopProperties & Relations (3)
Use FunctionPoles to find the poles of a function:
FunctionPoles[x ^ 3 / (x ^ 4 - 2), x]Use Residue to find the residues at the poles:
Residue[x ^ 3 / (x ^ 4 - 2), {x, #[[1]]}]& /@ %ResidueSum gives the sum of the residues at all poles:
ResidueSum[x ^ 3 / (x ^ 4 - 2), x]Use FunctionMeromorphic to test whether a function is meromorphic:
FunctionMeromorphic[Log[x] / (x ^ 2 - 2), x]FunctionMeromorphic[{Log[x] / (x ^ 2 - 2), Re[x] > 0}, x]Compute the sum of residues in a region where the function is meromorphic:
ResidueSum[{Log[x] / (x ^ 2 - 2), Re[x] > 0}, x]Use FunctionAnalytic to test whether a function is complex analytic:
FunctionAnalytic[Sin[Cosh[x ^ 3 - E ^ x]], x]Sum of residues of an analytic function is zero:
ResidueSum[Sin[Cosh[x ^ 3 - E ^ x]], x]Related Guides
History
Text
Wolfram Research (2022), ResidueSum, Wolfram Language function, https://reference.wolfram.com/language/ref/ResidueSum.html.
CMS
Wolfram Language. 2022. "ResidueSum." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ResidueSum.html.
APA
Wolfram Language. (2022). ResidueSum. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ResidueSum.html
BibTeX
@misc{reference.wolfram_2026_residuesum, author="Wolfram Research", title="{ResidueSum}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ResidueSum.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_residuesum, organization={Wolfram Research}, title={ResidueSum}, year={2022}, url={https://reference.wolfram.com/language/ref/ResidueSum.html}, note=[Accessed: 13-June-2026]}