Laurent Series Calculator

Introduction

This Laurent series calculator works like a local microscope for complex functions. Instead of asking what a formula does everywhere at once, it asks what the function looks like very close to a chosen center a. Near that point, many complex functions can be written as a sum of powers of (za). The positive powers tell you about the smooth, Taylor-like behavior. The negative powers reveal singular structure: poles, principal parts, and the coefficient that matters most for contour integration, the residue.

That makes the page useful in two complementary ways. If you are learning complex analysis, it turns a formal definition into something you can test numerically with your own examples. If you already know the theory, it becomes a quick check on whether you should expect a regular Taylor expansion, a simple pole, a higher-order pole, or a more delicate local pattern. You enter the function using x as the variable, choose the expansion point, and set how many negative and nonnegative powers you want to inspect.

There are also a few practical expectations worth stating up front. This page evaluates the function numerically on a small complex circle around the chosen center, so the result is an approximation rather than a symbolic proof. Very small coefficients are often just numerical noise. Also, the interface accepts a real value for the center a, even though the sampled points around that center are complex. Read the output as a local numerical expansion, and then use it alongside hand calculations when you need a fully rigorous derivation.

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 (za)1,(za)2,, which describe behavior near poles and other singularities.

Formally, a function f(z) has a Laurent expansion about z=a of the form

Formula: f(z) = ∑ n = − ∞ c^n (z−a)^n,

f(z)=n=cn(za)n,

where the coefficients cn are complex numbers. The part with negative powers, n=1cn(zan), is called the principal part. The non‑negative powers n=0cn(za)n 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 c-1 is the residue of f at a, 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 a (except possibly at a itself), the Laurent coefficients can be obtained from the Cauchy integral formula:

c n = 1 2 π i | z - a = r f ( z ) ( z - a ) n + 1 d z

Here the integral is taken around a small circle |za|=r that does not cross other singularities of f.

How this Laurent series calculator works

This calculator approximates the coefficients cn 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.

After parameterizing the contour as a circle and simplifying the integral, the coefficient computation becomes an average of sampled values of the function multiplied by the appropriate power of (za). In this page version the contour radius is kept small internally so that the expansion remains local. That detail explains an important pattern in the output: if the center is an ordinary analytic point, the negative coefficients should come out very close to zero, whereas poles at the center show up clearly in the principal part.

For each coefficient cn, the algorithm:

  1. Chooses a small radius r around the expansion point a.
  2. Samples points on the circle z_k=a+reiθk with equally spaced angles θθk=2πkN.
  3. Evaluates f(zk) using complex arithmetic with the real variable x substituted by zk.
  4. Forms a discrete approximation to the contour average that defines cn.

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. The residue c-1 is often the most stable and useful coefficient to inspect first.

How to use the calculator

To compute a Laurent series with the tool, think of the inputs as describing a local neighborhood around the point of expansion. There are no physical units here. The “orders” are simply the exponents you want to include on either side of the expansion.

  • f(x): Enter your function using x as the variable, in syntax compatible with the calculator. 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 z=0, use 0. For an expansion around z=1, use 1, and so on. In this page interface, a is entered as a real number.
  • Negative order: This is how far into the principal part you want to go. For example, a negative order of 2 means the calculator will include terms down to (za)2.
  • Positive order: This is how many non‑negative powers to include, such as (za)0,(za)1,,(za)n.

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 f(z) as

Formula: f(z) ≈ ∑ n = n_min n_max c_n(z − a) n.

f(z)n=nminnmaxcn(za)n.

Interpreting the results

The output lists coefficients cn together with their corresponding powers (za)n. Read them in layers rather than as isolated numbers. Negative coefficients tell you whether the center is singular. The coefficient of (za)1 tells you the residue. The nonnegative powers tell you how the remaining analytic part behaves after the singular behavior has been accounted for.

  • Principal part (negative powers) describes the singular behavior near z=a. If the largest negative power is finite (say (za)m), then a is a pole of order m.
  • Residue is the coefficient c-1. This value can be used directly in the residue theorem to evaluate contour integrals enclosing a.
  • Regular part (non‑negative powers) behaves like a Taylor series around a and captures how the function varies smoothly once the singularity is factored out.

A good quick habit is to compare the size of the negative coefficients with the size of the regular ones. If the negative coefficients are essentially zero, the center is behaving like an ordinary analytic point on the small contour used here. If the negative coefficients are prominent, the center is singular and the principal part is carrying real structural information rather than mere numerical noise.

Worked example

Example: f(z) = 1/(z-1) around a = 0

Consider

Formula: f(z) = 1 / (z − 1), a = 0.

f(z)=1z1,a=0.

For |z|<1, we can rewrite

Formula: 1 / (z − 1) = − 1 / (1 − z) = − ∑ n = 0 ∞ z^n.

1z1=11z=n=0zn.

In Laurent series form about a=0, this is actually a Taylor series (no negative powers):

Formula: f(z) = - 1 - z - z^2 - z^3 - …

f(z)=-1-z-z2-z3-

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 c0=-1,c1=-1,c2=-1,c3=-1. There is no principal part here; the function is analytic at 0, 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.

f(z)=z+1z(z-2),a=1.

This function has simple poles at z=0 and z=2. Around z=1, however, the function is locally analytic on any sufficiently small circle. That means the small-contour calculation performed by this page should behave mostly like a Taylor expansion there, with negative-power coefficients close to zero. Running the calculator with the values below is still helpful, but mainly as a way to see how nearby poles influence the radius of convergence rather than as a principal-part example:

  • f(x): (x+1)/(x*(x-2))
  • a: 1
  • Negative order: 1
  • Positive order: 3

Important note: because this calculator samples a small contour around a = 1, the coefficient of (z1)1 should be near zero rather than large. If you want a genuine principal part for this same rational function in the current interface, move the center to a = 0 or a = 2, where the poles actually sit.

A pole-centered check: the same function around a = 0

If you switch to a = 0 for the same function, the behavior changes immediately because the center is now a pole. The calculator should return a clear negative-power term and a residue close to -0.5. That is exactly what the theory predicts from partial fractions: the local expansion starts with a principal-part term proportional to 1/z, and then continues with ordinary powers of z. This is a nice reality check because it lets you see the calculator distinguish between a regular center and a singular center using the same underlying function.

Comparison: Laurent vs. Taylor series

Feature Taylor series Laurent series
Allowed powers Non‑negative powers (za)0,(za)1, Both negative and non‑negative powers
Singularities at the center Not allowed; requires f analytic at a Allows isolated singularities at a (poles, essential singularities)
Principal part Absent Present if there are negative powers; encodes singular behavior
Residue (coefficient of (za)1) 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 a, except possibly at a itself.
  • No other singularities lie extremely close to the integration circle; otherwise, the coefficients may be distorted.
  • The chosen orders 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 f(z) 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.

One last interpretation tip: if you are using the page for coursework, treat the numerical result as a diagnostic tool rather than the final answer you submit. It is excellent for spotting the order of a pole, estimating a residue, or checking the first few regular coefficients. Once the pattern is clear, you can then carry out the symbolic argument with much more confidence and much less algebraic guesswork.

Use x as the variable. Enter a real expansion center a; the calculator then samples a small complex circle around that point. The order fields are exponents, not physical units.

Enter parameters to compute.

Mini-game: Residue Rush

This optional canvas mini-game turns the same vocabulary into a fast visual challenge. Rotate the contour and route incoming terms into the correct part of the expansion: negative powers belong to the principal part, nonnegative powers belong to the regular part, and the special c_-1 term earns a bonus when you send it through the glowing residue gate. It does not change the calculator’s math above; it simply gives you a more memorable way to rehearse the idea.

Score0
Time75.0s
Streak0
Lives5
Best0
Your browser does not support the canvas game.

Educational takeaway: in a Laurent series, negative powers make up the principal part, and the coefficient of (z-a)^-1 is the residue.

Embed this calculator

Copy and paste the HTML below to add the Laurent Series Calculator – Complex Function Expansion, Principal Parts & Residues to your website.