Skip to content

ClausenCl ​

The Clausen functions Cln(θ)\mathrm{Cl}_n(\theta): ∑k≥1sin⁡(kθ)/kn\sum_{k\ge1} \sin(k\theta)/k^n for even nn and ∑k≥1cos⁡(kθ)/kn\sum_{k\ge1} \cos(k\theta)/k^n for odd nn — the imaginary or real part of Li⁡n(eiθ)\operatorname{Li}_n(e^{i\theta}).

ClausenCl(n, θ)the Clausen function Cln(θ)\mathrm{Cl}_n(\theta) of integer order n≥1n \ge 1 and real θ\theta.
Typed signatures
TypePackageApplies
(integer, real) -> numbercompute-enginealways

Domain: Special functions

Details
  • Cl2(θ)=−∫0θln⁡∣2sin⁡t2∣ dt\mathrm{Cl}_2(\theta) = -\int_0^\theta \ln\left|2\sin\tfrac{t}{2}\right|\,dt is the classical Clausen function; Cl1(θ)=−ln⁡∣2sin⁡(θ/2)∣\mathrm{Cl}_1(\theta) = -\ln|2\sin(\theta/2)|, infinite at θ≡0\theta \equiv 0.
  • Parity alternates with the order (DLMF §25.12(ii), mpmath's clsin / clcos): even nn gives the odd, 2π2\pi-periodic sine series, odd nn the even cosine series, so that Cln(θ)=Im⁡Li⁡n(eiθ)\mathrm{Cl}_n(\theta) = \operatorname{Im}\operatorname{Li}_n(e^{i\theta}) or Re⁡Li⁡n(eiθ)\operatorname{Re}\operatorname{Li}_n(e^{i\theta}) respectively. See PolyLog.
  • Special values: Cl2(π/2)=G\mathrm{Cl}_2(\pi/2) = G (Catalan's constant), Cl2m(0)=Cl2m(π)=0\mathrm{Cl}_{2m}(0) = \mathrm{Cl}_{2m}(\pi) = 0, Cl2m+1(0)=ζ(2m+1)\mathrm{Cl}_{2m+1}(0) = \zeta(2m+1), Cl2m+1(π)=−η(2m+1)\mathrm{Cl}_{2m+1}(\pi) = -\eta(2m+1), Cl2m(π/2)=β(2m)\mathrm{Cl}_{2m}(\pi/2) = \beta(2m), Cl2m+1(π/2)=−2−(2m+1)η(2m+1)\mathrm{Cl}_{2m+1}(\pi/2) = -2^{-(2m+1)}\eta(2m+1). See DirichletEta, DirichletBeta.
  • Cl2\mathrm{Cl}_2 peaks at θ=π/3\theta = \pi/3 with value 1.01494…1.01494\ldots, the Gieseking constant's companion; the volume of the ideal regular tetrahedron is 3 Cl2(π/3)/23\,\mathrm{Cl}_2(\pi/3)/2.
  • Wolfram has no Clausen head: there it is spelled Im⁡[PolyLog[n,eiθ]]\operatorname{Im}[\mathrm{PolyLog}[n, e^{i\theta}]], which is how the oracle checks are phrased. Numerically, the polylogarithm's expansion at the unit circle (DLMF 25.12.12) with θ\theta reduced into (−π,π](-\pi, \pi].

Plot

Examples

2 more kept as data, checked against the oracles
Basic #

Cl2(π/2)=G\mathrm{Cl}_2(\pi/2) = G, Catalan's constant

live ↗
InClausenCl(2,π2)\mathrm{ClausenCl}(2, \frac{π}{2})OutG⁡\operatorname{G}

Odd orders are cosine series: Cl3(0)=ζ(3)\mathrm{Cl}_3(0) = \zeta(3)

live ↗
InClausenCl(3,0)\mathrm{ClausenCl}(3, 0)Outζ(3)ζ(3)

Cl2(π/3)=1.01494…\mathrm{Cl}_2(\pi/3) = 1.01494\ldots, the maximum of Cl2\mathrm{Cl}_2

live ↗
InClausenCl(2,1.047 197 551 196 597 6)\mathrm{ClausenCl}(2, 1.047\,197\,551\,196\,597\,6)Out1.014 941 606 409 653 31.014\,941\,606\,409\,653\,3
Properties #

Cl2(π)=0\mathrm{Cl}_2(\pi) = 0: the sine series vanishes at multiples of π\pi

live ↗
InClausenCl(2,π)\mathrm{ClausenCl}(2, π)Out00

Cl3(π)=−η(3)=−34ζ(3)\mathrm{Cl}_3(\pi) = -\eta(3) = -\tfrac34\zeta(3)

live ↗
InClausenCl(3,π)\mathrm{ClausenCl}(3, π)Out−3ζ(3)4-\frac{3ζ(3)}{4}

Cl4(π/2)=β(4)\mathrm{Cl}_4(\pi/2) = \beta(4), which has no closed form of its own

live ↗
InClausenCl(4,π2)\mathrm{ClausenCl}(4, \frac{π}{2})OutDirichletBeta(4)\mathrm{DirichletBeta}(4)
Possible issues #

Cl1(θ)=−ln⁡∣2sin⁡(θ/2)∣\mathrm{Cl}_1(\theta) = -\ln|2\sin(\theta/2)| diverges at θ=0\theta = 0

live ↗
InClausenCl(1,0)\mathrm{ClausenCl}(1, 0)Out∞∞
About
Examples9
Checked againstWolfram Language 7 agree2 differmpmath 8 agree1 error
CrosswalkWikipediaMathWorldWikidata

Implementation

referenceenginenotatio

Cl_n cuts Li_n(e^{iθ}) in two by parity: the even orders are the sine series (its imaginary part), the odd orders the cosine series (its real part).

nativeenginetypescriptpackages/ce-patches/src/compute-engine/numerics/clausen.ts
mappedwolframpackages/oracle/src/mappings.ts

No built-in Clausen head; the Wolfram Function Repository's own ResourceFunction["ClausenCl"] matches ours -- Catalan at (2, π/2), 0 at (2, π), -3/4 ζ(3) at (3, π), DirichletBeta[4] at (4, π/2), 1.0149416064096535 at (2, 1.047…). Needs network access to the Function Repository to run. Known quirk: at (3, 0) it returns an unevaluated If[OddQ, Zeta[3], 0] -- a bug in the repository function, not ours -- so that example's oracle verdict should read as inconclusive, not disagree.

mappedmpmathpackages/oracle/src/mappings.ts

clsin(n, θ) for even n, clcos(n, θ) for odd n. Wolfram has no head; Im/Re PolyLog[n, E^(I θ)] instead.

See also: PolyLog, DirichletBeta, DirichletEta, Zeta