Advanced maths

Complex residue calculator for rational functions

Compute exact residues at supplied rational complex denominator roots, distinguish removable roots and evaluate supported circular contour integrals.

Your numbers

Enter c0,c1,… for the real-coefficient polynomial c0+c1*z+…. Fractions stay exact; numerator degree at most twelve.
The denominator is the monic product ∏(z−p)^m. Enter each distinct root once with its multiplicity: at most six roots and total degree twelve.
Use an exact fraction or a decimal with at most six places, within ±10⁶.
Use an exact fraction or a decimal with at most six places, within ±10⁶.
Use an exact fraction or a decimal with at most six places, within ±10⁶.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

The numerator and a complete factored monic denominator specify a rational function. Around each supplied denominator root, the calculator forms exact truncated Taylor coefficients of the analytic factor and reads off its Laurent principal part. This handles repeated poles as well as simple ones. It reports actual pole order after cancellation, the residue at every supplied root and an independently expanded residue at infinity. An optional circle uses exact rational distance comparisons to identify enclosed poles.

THE FORMULARes(f,p)=coefficient of (z−p)^−1; ∮f(z) dz=±2πi·Σ enclosed residues for a circular contour with no pole on it.

A worked example

For f(z)=1/[z(z−1)²], enter numerator 1 and denominator rows 0,0,1 and 1,0,2. The residue at zero is one. Around z=1 the analytic factor is 1/z, whose first Taylor coefficient is −1, giving residue −1 at the double pole. A counterclockwise circle centered at zero with radius 1/2 encloses only the first pole, so its contour integral is 2πi. The total finite residue sum and residue at infinity are both zero.

Good to know

Requires all distinct denominator roots and multiplicities of the monic denominator; no automatic polynomial factorization or root search is provided. Root real/imaginary coordinates and numerator coefficients are rational within ±10⁶. Supports numerator degree twelve, 1–6 distinct roots, multiplicities 1–6 and total denominator degree twelve. Exact coefficient growth is bounded. Contours are ordinary circles with rational centers/radii; actual boundary poles are rejected. Essential singularities, branch cuts and principal-value contour prescriptions are unsupported.

A zero residue can still belong to a genuine higher-order pole

The function 1/(z−2)² has a double pole at two but residue zero because its Laurent series has no (z−2)^−1 term. A contour enclosing that pole has zero integral, yet the function is certainly not analytic at its center. The actual-pole-order column and residue column therefore answer different questions. In contrast, (z−1)²/(z−1)² has a removable denominator root after cancellation; its principal part vanishes entirely.

For a pole of supplied multiplicity m, write the function as H(z)/(z−p)^m with H analytic at p. Taylor coefficients of H through degree m−1 determine all negative Laurent powers. The final one supplies the residue, while the first nonzero coefficient determines the actual pole order. The page obtains those coefficients by exact polynomial expansion and a Taylor-quotient recurrence, rather than estimating a derivative by subtracting nearly equal floating-point samples.

The default circle encloses the residue-one pole and excludes the double pole at one01 (order 2)Inside sum = 1Outside: −1Counterclockwise integral = 2πi
For 1/[z(z−1)²], the pole at zero has residue +1 and the double pole at one has residue −1. The radius-one-half counterclockwise circle encloses zero only, giving integral 2πi. The graph uses a common complex-plane scale.

The Laplace transform calculator with a convergence region converts supported causal transform pairs and distinguishes repeated poles from time-domain polynomial factors.

The infinity check and exact contour membership guard different parts of the calculation

For rational functions, the sum of finite residues plus the residue at infinity is zero. The engine checks this using a separate expansion after substituting w=1/z and reversing the numerator and denominator polynomials. This also works when the rational function has a polynomial part, because polynomial terms have no finite residues. Agreement checks the aggregate residues; it does not make an incomplete or wrongly entered denominator factorization describe the intended original function.

The circle test compares the squared root-to-center distance with the squared radius using rational arithmetic. An actual pole exactly on the boundary is rejected, even when its residue happens to be zero. A removable root on the boundary does not create that obstruction. Reversing orientation negates the integral. Increasing the radius can change which poles are enclosed, and crossing the external double pole in the default example changes the enclosed residue sum from one to zero; visual proximity alone is not used to decide membership.

A few questions, answered

Can the denominator have complex coefficients?

The supplied complex roots define a possibly complex monic denominator, so yes. The numerator field currently accepts real rational coefficients. A denominator with nonunit leading coefficient must be normalized first.

Why does a pole on the contour cause an error instead of half a residue?

The ordinary contour integral in the stated residue-theorem setting requires the function to be nonsingular along the contour. Half-residue and principal-value prescriptions require extra assumptions and a different problem definition.

Find your calculator

Start typing to explore the library.