On this page
Euler's product for the sine builds sin πx from its zeros. Take its logarithm, differentiate once, and the cotangent falls out as a sum over its poles. That one line of calculus gives you the Leibniz series for π, a second proof that Σ 1/n² = π²/6, and a first look at Mittag-Leffler's theorem.
What is the partial-fraction expansion of π cot πx?
For every x that is not an integer, π cot πx = 1/x + Σ 2x/(x² − n²), summed over n = 1, 2, 3, …. The NIST Digital Library of Mathematical Functions, equation 4.22.3 states it as cot z = 1/z + 2z Σ 1/(z² − n²π²); put z = πx and multiply by π.
Read it as ordinary partial fractions. Near each integer n, π cot πx behaves like 1/(x − n), and the expansion adds up those pieces with n and −n paired: 1/(x − n) + 1/(x + n) = 2x/(x² − n²). The Wikipedia article on Mittag-Leffler's theorem writes the same sum as a symmetric limit from −N to N.
How do you derive it from the sine product?
DLMF equation 4.22.1 gives sin z = z Π (1 − z²/(n²π²)). With z = πx:
Write sin πx = πx Π (1 − x²/n²).
Take logarithms of absolute values on any interval that avoids the integers: ln|sin πx| = ln π + ln|x| + Σ ln|1 − x²/n²|.
Differentiate both sides: π cos πx / sin πx = 1/x + Σ (−2x/n²) / (1 − x²/n²).
Clear the inner fraction: (−2x/n²) / (1 − x²/n²) = −2x/(n² − x²) = 2x/(x² − n²).
The one step to defend is differentiating an infinite sum term by term. On any closed, bounded interval that avoids the integers, the differentiated terms are bounded by a constant times 1/n², so the series converges uniformly and the step is allowed.
Does x = 1/4 really give π = 4(1 − 1/3 + 1/5 − …)?
Yes, and it is a good test of whether you remember the formula correctly. At x = 1/4 the left side is π cot(π/4) = π. On the right, 1/x = 4, and each term is (1/2)/(1/16 − n²) = −8/((4n − 1)(4n + 1)).
Split that fraction: 8/((4n − 1)(4n + 1)) = 4[1/(4n − 1) − 1/(4n + 1)]. So π = 4 − 4(1/3 − 1/5) − 4(1/7 − 1/9) − …, which is π = 4(1 − 1/3 + 1/5 − 1/7 + …).
That is the Madhava–Leibniz series, first found by Madhava of Sangamagrama or his followers in the 14th–15th century and rediscovered by James Gregory in 1671 and Leibniz in 1673. Why it converges at all is covered in our post on the Leibniz test for alternating series.
A quicker check: at x = 1/2 the left side is 0, and the right side is 2 − 2[(1 − 1/3) + (1/3 − 1/5) + …], which telescopes to 2 − 2 = 0.
How does the expansion prove Σ 1/n² = π²/6?
Move 1/x to the left and divide by x: (π cot πx − 1/x)/x = Σ 2/(x² − n²). Now let x → 0. The right side tends to −2 Σ 1/n².
For the left side, use cot y = cos y / sin y ≈ (1 − y²/2) / (y(1 − y²/6)) ≈ 1/y − y/3 for small y. With y = πx, π cot πx ≈ 1/x − π²x/3, so the left side tends to −π²/3. Setting −2 Σ 1/n² = −π²/3 gives Σ 1/n² = π²/6, the value of ζ(2) in DLMF equation 25.6.1. Keep one more term of the cotangent series and the same comparison gives ζ(4) = π⁴/90, listed in the same equation.
Euler's original route, through the roots of the sine product, is in our post on why the sum of 1/n² is π²/6.
What does Mittag-Leffler's theorem say in general?
Mittag-Leffler's theorem says that for any set of points with no limit point inside a region, and any chosen principal part at each point, some meromorphic function has exactly those poles and principal parts; any other such function differs from it by a holomorphic function (Wikipedia). Gösta Mittag-Leffler published versions in 1876 and 1884.
His MacTutor biography records that he was born in Stockholm in 1846, attended Weierstrass's lectures in Berlin in 1875, and published the result in French in Acta Mathematica in 1884. It partners Weierstrass's factorisation theorem: Weierstrass builds a function from its zeros (the sine product is an example), Mittag-Leffler builds one from its poles (the cotangent sum is an example).
The general proof does what the callout did by hand: when the plain sum of principal parts diverges, subtract a correction from each term until it converges. To show the cotangent expansion is exactly right, treat x as a complex variable and prove the difference of the two sides is entire, has period 1 and is bounded, so it is constant by Liouville's theorem. Both sides are odd, so the constant is zero.
A four-step checklist for any pole expansion
List the poles and the principal part at each one.
Check that the terms shrink fast enough; if not, pair them or add correction terms.
Test the formula at a point you know, such as x = 1/2 or x = 1/4.
Expand both sides near a convenient point and compare coefficients to read off sums.
If a step such as the term-by-term derivative feels shaky, the Fermi Concept Library covers every concept in physics, chemistry, biology, mathematics and computing. To practise expansions like this one, the Fermi Problem Library has a step-by-step solver that explains the reasoning.



