Laurent Series Calculator
Enter parameters to compute.

What is a Laurent Series?

While a Taylor series contains only nonnegative powers, a Laurent series allows negative powers as well. Around a point a, a function fz can sometimes be written as n=-cnz-an. The negative powers form the principal part and capture poles or essential singularities. By contrast, a Taylor series would diverge at such points. Laurent series are thus crucial in complex analysis for describing behavior near singularities.

Consider 1z-1. Expanding about a=0 yields -n=0zn for |z|<1. This series features only negative powers relative to a if we rewrite z as a+z. Such expansions are used to compute residues and to study analytic continuation.

Numerical Approach

Our calculator uses the Cauchy coefficient formula to approximate the series. For coefficient cn we integrate along a small circle around a: cn=12πi|z-a|=rfz-an+1dz. We discretize this integral with equally spaced points zk=a+reiθk where θk ranges from 0 to 2π. Summing fzk multiplied by the appropriate exponential approximates the integral.

This method works well for rational functions with isolated poles because the contour integral depends only on values near the circle. However, accuracy depends on the radius r and the number of sample points. If r is too large, other singularities may lie inside the contour and distort the coefficients. If r is too small, numerical cancellation may occur. Choosing a modest radius such as 110 often suffices when expanding near an isolated pole.

Using the Calculator

Enter a function in terms of x that math.js can evaluate. Specify the expansion point a, the maximum negative power to include, and the maximum positive power. When you click Compute, the script estimates each coefficient using a circular contour with radius 110. The coefficients from negative order through positive order are displayed as text. Because the integration is numerical, results may only approximate the exact series, but they generally capture the leading terms accurately.

As an example, try 1/(x-1) with a=0 and orders -1 through 3. You should see coefficients corresponding to the geometric series mentioned earlier. Another interesting case is (x+1)/(x*(x-2)) expanded about a=1. Such examples illustrate how the principal part captures the pole at x=1 while the positive powers encode the analytic remainder.

Applications

Laurent series are indispensable for computing residues, which lead to the powerful residue theorem. Contour integrals that might otherwise be difficult often collapse to evaluating the coefficient c-1. They also describe essential singularities, whose infinite principal parts encode wild behavior close to certain points. Engineers and physicists use Laurent series to analyze frequency responses, while mathematicians apply them in analytic number theory and complex dynamics.

In practice, exact symbolic expansions may be unwieldy or require computer algebra systems. Our calculator emphasizes the conceptual and numerical approach. By experimenting with various functions and observing the resulting coefficients, you build intuition for how singularities manifest and how analytic behavior extends around them.

Algorithm Details

The calculation evaluates f at 400 equally spaced points around the circle. For each coefficient index n, it multiplies the function values by z-a-n+1 and sums them. Dividing by 2πi and the number of sample points gives the approximation. Complex numbers are handled via math.complex, and results are simplified to real values when the imaginary parts are near zero.

The coefficients are printed in ascending order starting with the most negative power. Each coefficient is rounded to six decimal places. You can copy the output and construct the series by hand if you wish. Because this approach uses floating-point arithmetic, very high orders may lose accuracy. Nevertheless, it offers a hands-on way to explore expansions without needing a full-featured computer algebra system.

Further Exploration

Try varying the radius or the number of sample points in the code. A smaller radius hones in on the behavior near the singularity, while more sample points improve accuracy. Plotting partial sums of the resulting series against the original function within the annulus of convergence provides a powerful visual check. You can also experiment with essential singularities such as e1z to see how an infinite principal part appears.

Laurent series provide a bridge between local and global analysis on the complex plane. By decomposing a function near a singularity into explicit powers, we gain insight into residues, analytic continuation, and the classification of singular points. From Foucault pendulums to quantum field theory, these expansions underpin a surprising range of modern science.

Related Calculators

Covariance Matrix Calculator - Analyze Multivariate Data

Compute the covariance matrix for two or three datasets and explore its meaning.

covariance matrix calculator multivariate statistics

Fractal Dimension Calculator - Self-Similarity Method

Estimate the fractal dimension from the number of pieces and scaling ratio.

fractal dimension calculator self-similar

Möbius Inversion Calculator

Use the Möbius function to invert summatory functions of arithmetic sequences.

Möbius inversion calculator number theory