Laurent Series Calculator
What is a Laurent series?
A Laurent series represents a complex function as an infinite sum of both positive and negative powers around a point a. While a Taylor series only has non‑negative powers (regular power series), a Laurent series can include terms like , which describe behavior near poles and other singularities.
Formally, a function has a Laurent expansion about of the form
Formula: f(z) = ∑ n = − ∞ c^n (z−a)^n,
where the coefficients are complex numbers. The part with negative powers, , is called the principal part. The non‑negative powers form the regular part (similar to a Taylor series).
Laurent series are central in complex analysis because they describe the local behavior of functions near isolated singularities. In particular, the coefficient is the residue of at , which is crucial for evaluating contour integrals using the residue theorem.
Coefficient formula
For a function that is analytic on and inside a circle centered at (except possibly at itself), the Laurent coefficients can be obtained from the Cauchy integral formula:
Here the integral is taken around a small circle that does not cross other singularities of .
How this Laurent series calculator works
This calculator approximates the coefficients numerically using the contour integral formula above. Instead of integrating exactly, it samples points on a circle around the expansion point and approximates the integral by a discrete sum.
For each coefficient , the algorithm:
- Chooses a radius around the expansion point .
- Samples points on the circle with equally spaced angles .
- Evaluates using
math.jswith the real variablexsubstituted by . - Forms a discrete approximation to the contour integral that defines .
For rational functions with isolated poles, this numerical contour method typically recovers the dominant coefficients quite accurately, especially the principal part (negative powers) and a few nearby regular terms.
How to use the calculator
To compute a Laurent series with the tool:
- f(x): Enter your function using
xas the variable, in syntax compatible withmath.js. For example:1/(x-1)(x+1)/(x*(x-2))exp(1/x)(numerically more delicate)
- Expansion point a: Enter the center of expansion. For a Laurent expansion around , use
0. For an expansion around , use1, and so on. - Negative order: This is how far into the principal part you want to go. For example, a negative order of
2means the calculator will include terms down to . - Positive order: This is how many non‑negative powers to include, such as .
After you click the compute button, the tool estimates all coefficients from the specified negative order up to the specified positive order and displays them so that you can reconstruct as
Formula: f(z) ≈ ∑ n = n_min n_max c_n(z − a) n.
Interpreting the results
The output lists coefficients together with their corresponding powers . You can use these in several ways:
- Principal part (negative powers) describes the singular behavior near . If the largest negative power is finite (say ), then is a pole of order .
- Residue is the coefficient . This value can be used directly in the residue theorem to evaluate contour integrals enclosing .
- Regular part (non‑negative powers) behaves like a Taylor series around and captures how the function varies smoothly once the singularity is factored out.
Worked example
Example: f(z) = 1/(z-1) around a = 0
Consider
Formula: f(z) = 1 / (z − 1), a = 0.
For , we can rewrite
Formula: 1 / (z − 1) = − 1 / (1 − z) = − ∑ n = 0 ∞ z^n.
In Laurent series form about , this is actually a Taylor series (no negative powers):
Formula: f(z) = - 1 - z - z^2 - z^3 - …
If you set in the calculator:
- f(x):
1/(x-1) - a:
0 - Negative order:
0 - Positive order:
3
you should obtain coefficients close to . There is no principal part here; the function is analytic at , and its Laurent series reduces to a Taylor series.
Example: f(z) = (z+1)/(z(z-2)) around a = 1
Now consider
Formula: f(z) = (z + 1) / (z(z - 2)), a = 1.
This function has simple poles at and . Around , the Laurent series has a non‑trivial principal part (because is between two poles) and a regular part. By running the calculator with
- f(x):
(x+1)/(x*(x-2)) - a:
1 - Negative order:
1 - Positive order:
3
you will see a term, whose coefficient is the residue at , together with several regular terms. Comparing these to a hand computation (via partial fractions and Taylor expansion) gives a useful check.
Comparison: Laurent vs. Taylor series
| Feature | Taylor series | Laurent series |
|---|---|---|
| Allowed powers | Non‑negative powers | Both negative and non‑negative powers |
| Singularities at the center | Not allowed; requires analytic at | Allows isolated singularities at (poles, essential singularities) |
| Principal part | Absent | Present if there are negative powers; encodes singular behavior |
| Residue (coefficient of ) | Zero by definition | May be nonzero and is used in the residue theorem |
| Typical use cases | Local approximations for analytic functions, series solutions | Studying singularities, computing contour integrals, analytic continuation |
Limitations and assumptions
This calculator is designed primarily for rational functions and reasonably well‑behaved expressions near the expansion point. The numerical method assumes:
- The function is analytic on a small circle around , except possibly at itself.
- No other singularities lie extremely close to the integration circle; otherwise, the coefficients may be distorted.
- The chosen orders (negative and positive) are modest in size so that numerical errors do not dominate.
When using more complicated functions (such as those with branch cuts, essential singularities, or many nearby poles), expect the numerical coefficients to be approximations only. For highly sensitive problems, compare the output with symbolic algebra or smaller radii and more sample points if those options are available.
Finally, keep in mind that the series is local: it describes only within the annulus where the Laurent series converges. Outside that region, the truncated series used by the calculator may give poor approximations even if it looks algebraically similar.
