JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Partial Fractions of sin, cot, and Friends

A finite rational function splits into a sum over its poles — and cot, csc, and tan have infinitely many. This guide turns that intuition into the famous expansion cot z = 1/z + sum of 2z/(z^2 - n^2 pi^2), the crown jewel of Mittag-Leffler in action, and shows how integrating it hands you Euler's sine product for free.

From finite partial fractions to infinitely many poles

You met partial fractions long before complex analysis: a rational function like 1/(z^2 - 1) breaks into 1/2 times 1/(z-1) minus 1/2 times 1/(z+1), one clean term per pole. The complex viewpoint makes the bookkeeping honest — each piece is the principal part at its pole, and the coefficient is just the residue there. A finite rational function is, in this light, nothing but the sum of its principal parts plus a polynomial. That is the whole story when there are finitely many poles.

Now turn to a meromorphic function with infinitely many poles. The cotangent, cot z = cos z / sin z, has a simple pole at every zero of sin z, that is at z = n pi for every integer n. Csc z = 1/sin z does the same. The dream is to write each as a sum of one principal part per pole — but an infinite sum of 1/(z - n pi) terms cannot converge, the way the harmonic series cannot. This is exactly the gap the previous guide filled.

The cotangent expansion, term by term

Here is the prize, the cotangent expansion. Near z = n pi the function cot z behaves like 1/(z - n pi) — a simple pole with residue 1, since the logarithmic derivative cot z = (sin z)'/sin z picks up residue 1 at each simple zero of sin z. Naively summing 1/(z - n pi) over all integers diverges. The cure Mittag-Leffler prescribes is to pair each pole at +n pi with its twin at -n pi and combine them: 1/(z - n pi) + 1/(z + n pi) = 2z/(z^2 - n^2 pi^2). That pairing is the convergence-forcing subtraction in disguise — it makes the n-th term shrink like 1/n^2 instead of 1/n.

cot z  =  1/z  +  sum over n = 1 to infinity  of  2z / (z^2 - n^2 pi^2)

         =  1/z  +  ( 1/(z - pi)   + 1/(z + pi)  )
                 +  ( 1/(z - 2pi)  + 1/(z + 2pi) )
                 +  ...

  each paired term  ~  2z / (n^2 pi^2)  ~  1/n^2   <-- now it converges
The cotangent partial-fraction expansion: the n = 0 pole gives the bare 1/z, and every other pole is paired with its mirror to force convergence.

Read the formula and check that it is honest. At z = 0 the lone term 1/z carries the pole; every paired term 2z/(z^2 - n^2 pi^2) is finite there, summing to 0 by symmetry, so cot z minus 1/z tends to 0 as it should (cot z is odd). Near z = pi the term 1/(z - pi) blows up with residue 1, matching cot's pole exactly, while all other terms stay finite. Every pole is accounted for, with the right principal part, and the leftover is a bounded entire function that turns out to be identically zero — which is why the equality is exact, not merely 'up to a polynomial'.

Why the leftover vanishes — pinning it to zero

Mittag-Leffler hands you a meromorphic function with the right poles, but only up to an unknown entire function — call it g(z). To nail down cot z exactly you must show g is zero, and this is the step beginners skip. Form the difference d(z) = cot z minus the whole series on the right. Every pole cancels by construction, so d is entire. The trick is to bound it: away from the poles, both cot z and the series stay bounded on large squares whose sides sit halfway between the poles, where sin z is comfortably large. A bounded entire function is constant by Liouville's theorem, and since both sides are odd the constant must be 0.

Two honesty notes. First, the symmetric pairing is essential: the series sum of 2z/(z^2 - n^2 pi^2) converges absolutely and uniformly on compact sets away from the poles, but the unpaired form sum of 1/(z - n pi) over all n only converges in the symmetric sense — sum from -N to N as N grows — and not absolutely. Order matters here, and writing the pairs is what makes the order legitimate. Second, the expansion is for the complex cot z, valid for all z that are not integer multiples of pi, not just for real angles; the real formula you may have seen is its restriction to the real axis.

Integrate the logarithmic derivative: out pops the sine product

Here is the beautiful payoff that ties this whole rung together. Recall from guide 2 that cot z is the logarithmic derivative of sin z: (d/dz) log sin z = cos z / sin z = cot z. A logarithmic derivative converts products into sums — taking log of a product turns it into a sum, then differentiating gives a sum of terms (f_k)'/f_k. So if cot z is a sum of simple-pole terms, sin z ought to be the product whose factors generate exactly those terms. Run the logic backwards by integrating the cotangent expansion.

  1. Start from cot z = 1/z + sum of [1/(z - n pi) + 1/(z + n pi)], the paired cotangent expansion.
  2. Recognise each piece as a logarithmic derivative: 1/z = (d/dz) log z, and 1/(z - n pi) + 1/(z + n pi) = (d/dz) log(z^2 - n^2 pi^2) = (d/dz) log(1 - z^2/(n^2 pi^2)) up to a constant.
  3. Integrate term by term (legitimate because the series converges uniformly on compacta): log sin z = log z + sum of log(1 - z^2/(n^2 pi^2)) + C.
  4. Exponentiate to undo the logs: sin z = e^C times z times the product of (1 - z^2/(n^2 pi^2)).
  5. Fix the constant by matching sin z / z to 1 as z goes to 0 (the empty product is 1, so e^C = 1).

What drops out is Euler's celebrated sine product formula: sin z = z times the product over n >= 1 of (1 - z^2/(n^2 pi^2)). This is precisely the Weierstrass factorization of sin z made fully explicit — one factor per zero of the sine, at z = 0 and z = plus-or-minus n pi, with the simplest convergence factors needed. The cotangent expansion and the sine product are two faces of one fact: the cotangent is the logarithmic derivative of the sine, so the partial fractions of one are the logarithmic derivative of the factors of the other. Mittag-Leffler (poles) and Weierstrass (zeros), reunited by a single integration.

Friends of the cotangent, and one famous corollary

Once you have cot, the rest of the trigonometric family falls out by elementary moves. The cosecant comes from the identity csc z = cot(z/2) - cot z, or directly: csc z = 1/z + sum of (-1)^n times 2z/(z^2 - n^2 pi^2), the same skeleton with alternating signs because csc has residue (-1)^n at z = n pi rather than the constant 1 of cot. The tangent is the cotangent shifted by a quarter period, tan z = -cot(z + pi/2), so its poles sit at the odd multiples of pi/2; differentiating cot z gives csc^2 z = sum of 1/(z - n pi)^2 over all integers, a fully absolutely convergent expansion with double poles. Each is the same Mittag-Leffler recipe with its own residues.

These expansions are not just pretty — they compute. Set z = i y in the sine product, or plug a special value into the cotangent expansion, and out tumble closed forms. The most famous: compare the Taylor coefficient of z^2 in log(sin z / z) computed two ways — from the series sum of log(1 - z^2/(n^2 pi^2)) it is minus 1/pi^2 times sum of 1/n^2, and from the known expansion of cot it is minus 1/3. Equating gives sum of 1/n^2 = pi^2/6, Euler's solution of the Basel problem. The same machinery, pushed further, evaluates sum of 1/n^(2k) for every k and connects to the Bernoulli numbers and the values of the zeta function at even integers.

Step back and see what this last rung accomplished. You learned that an entire function is the product of its zeros (Weierstrass), that a meromorphic function is the sum of its principal parts (Mittag-Leffler), and now that for the trigonometric functions both pictures are explicit, beautiful, and dual to each other through the logarithmic derivative. The cotangent expansion is the single most useful instance of the whole theory — keep it in your pocket. It is also the historical seed of the gamma function's product and of analytic number theory, where these very ideas, applied to the zeta function, lead to deep and still-open questions.