The partial-fraction expansion of the hyperbolic tangent #
The hyperbolic tangent has simple poles at the odd multiples of i π / 2, and its Mittag-Leffler
expansion runs over the odd integers: for every real y,
(π / 2) tanh (π y / 2) = ∑_{n ≥ 0} 2 y / (y² + (2 n + 1)²).
This file derives it from Mathlib's partial-fraction expansion of the cotangent
(cot_series_rep'), whose terms cotTerm z n = 1 / (z - (n + 1)) + 1 / (z + (n + 1)) collect the
poles at ± (n + 1). Halving the argument keeps exactly the poles at even integers
(TauCeti.cotTerm_div_two), so subtracting the two expansions isolates the odd poles
(TauCeti.hasSum_cotTerm_two_mul):
π cot (π z) - (π / 2) cot (π z / 2) = ∑_{n ≥ 0} (1 / (z - (2 n + 1)) + 1 / (z + (2 n + 1)))
for every non-integer z. Evaluating at z = i y turns cotangents into hyperbolic cotangents, and
coth (2 u) - coth u / 2 = tanh u / 2 gives the expansion of the hyperbolic tangent
(TauCeti.hasSum_pi_div_two_mul_tanh).
Main results #
TauCeti.cot_ofReal_mul_I: the cotangent at an imaginary argument;TauCeti.hasSum_cotTerm_two_mul: the odd-pole part of the cotangent expansion;TauCeti.hasSum_pi_div_two_mul_tanh: the partial-fraction expansion oftanh (π y / 2).
The odd-pole part of the cotangent expansion. For z ∉ ℤ,
π cot (π z) - (π / 2) cot (π z / 2) = ∑_{n ≥ 0} (1 / (z - (2 n + 1)) + 1 / (z + (2 n + 1))).
The full expansion of π cot (π z) collects all integer poles, and that of π cot (π z / 2)
exactly the even ones (cotTerm_div_two).