Skip to content

DirichletEta ​

The Dirichlet eta function η(s)=∑n≥1(−1)n−1n−s=(1−21−s) ζ(s)\eta(s) = \sum_{n\ge1} (-1)^{n-1} n^{-s} = (1 - 2^{1-s})\,\zeta(s), the alternating zeta — entire, with η(1)=ln⁡2\eta(1) = \ln 2.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaDirichlet eta functionMathWorldDirichletEtaFunctionWikidataQ973313DLMF25.2Wolfram LanguageDirichletEta!
DirichletEta(s)the Dirichlet eta function η(s)\eta(s).
SymPydirichlet_eta(s)mpmathaltzeta(s)Juliaenumeratio_ball(s -> -polylog(s, CC(-1)), s)
Typed signatures
TypePackageApplies
(complex | infinity) -> numberanalyticreplaces compute-enginealways
(complex | infinity) -> numbercompute-enginealways

Domain: Special functions

Details
  • η(s)=(1−21−s)ζ(s)\eta(s) = (1 - 2^{1-s})\zeta(s): the alternating series converges for Re⁡(s)>0\operatorname{Re}(s) > 0, and the factor cancels ζ\zeta's pole, so η\eta is entire with η(1)=ln⁡2\eta(1) = \ln 2.
  • Integer values follow from Zeta's: η(2)=π2/12\eta(2) = \pi^2/12, η(0)=12\eta(0) = \tfrac12, η(−1)=14\eta(-1) = \tfrac14, and η(3)=34ζ(3)\eta(3) = \tfrac34\zeta(3) stays in terms of ζ(3)\zeta(3).
  • Zeros: the nontrivial zeros of ζ\zeta, plus those of 1−21−s1 - 2^{1-s} on the line Re⁡(s)=1\operatorname{Re}(s) = 1.
  • Plain evaluation reduces exact integer ss through ζ\zeta; other exact ss stays symbolic (as in Wolfram) until N() or a floating-point argument. Numerically, complex ss is supported; within 0.250.25 of s=1s = 1 the alternating series is summed directly (Euler transform, via LerchPhi) so no pole is cancelled.

Plot

ComplexPlot
real slice

Examples

Basic #

η(1)=ln⁡2\eta(1) = \ln 2 — the alternating harmonic series

live ↗
InDirichletEta(1)\mathrm{DirichletEta}(1)Outln⁡(2)\ln(2)

η(2)=π2/12\eta(2) = \pi^2/12

live ↗
InDirichletEta(2)\mathrm{DirichletEta}(2)Outπ212\frac{π^2}{12}

η(3)=34ζ(3)\eta(3) = \tfrac34\zeta(3) — no closed form beyond Apéry's constant

live ↗
InDirichletEta(3)\mathrm{DirichletEta}(3)Out3ζ(3)4\frac{3ζ(3)}{4}

On the critical line — through (1−21−s)ζ(s)(1 - 2^{1-s})\zeta(s), so it carries the engine's working precision

live ↗
InDirichletEta(0.5)\mathrm{DirichletEta}(0.5)Out0.604 898 643 421 630 370 2450.604\,898\,643\,421\,630\,370\,245

Numeric for a floating-point argument

live ↗
InDirichletEta(1.5)\mathrm{DirichletEta}(1.5)Out0.765 147 024 625 407 945 3670.765\,147\,024\,625\,407\,945\,367
Scope #

Complex arguments

live ↗
InDirichletEta(3.5+2.5i)\mathrm{DirichletEta}(3.5+2.5i)Out1.000 109 727 804 697 8+0.078 128 912 041 483 16i1.000\,109\,727\,804\,697\,8+0.078\,128\,912\,041\,483\,16i

Threads elementwise over an array

live ↗
InDirichletEta([[12,−1],[0,12]])\mathrm{DirichletEta}(\bigl\lbrack\bigl\lbrack\frac{1}{2}, -1\bigr\rbrack, \bigl\lbrack0, \frac{1}{2}\bigr\rbrack\bigr\rbrack)Out[[DirichletEta(12),14],[12,DirichletEta(12)]]\bigl\lbrack\bigl\lbrack\mathrm{DirichletEta}(\frac{1}{2}), \frac{1}{4}\bigr\rbrack, \bigl\lbrack\frac{1}{2}, \mathrm{DirichletEta}(\frac{1}{2})\bigr\rbrack\bigr\rbrack

η(s)→1\eta(s) \to 1 as s→∞s \to \infty

live ↗
InDirichletEta(∞)\mathrm{DirichletEta}(∞)Out11

Interval arithmetic over an increasing stretch

live ↗
InDirichletEta(Interval(1.5,1.6))\mathrm{DirichletEta}(\mathrm{Interval}(1.5, 1.6))OutInterval(0.765 147 024 625 407 8,0.777 722 726 661 128 8)\mathrm{Interval}(0.765\,147\,024\,625\,407\,8, 0.777\,722\,726\,661\,128\,8)

Uncertainty propagation: η(2±0.01)=0.82247±0.00101\eta(2 \pm 0.01) = 0.82247 \pm 0.00101

live ↗
InDirichletEta(Around(2,0.01))\mathrm{DirichletEta}(\mathrm{Around}(2, 0.01))OutAround(0.822 467 033 424 113 2,0.001 013 165 781 635 045)\mathrm{Around}(0.822\,467\,033\,424\,113\,2, 0.001\,013\,165\,781\,635\,045)

To 30 significant digits, the last one correctly rounded

live ↗
InN(DirichletEta(12),30)N(\mathrm{DirichletEta}(\frac{1}{2}), 30)Out0.604 898 643 421 630 370 247 265 914 2360.604\,898\,643\,421\,630\,370\,247\,265\,914\,236
Properties #

Nonpositive integers: η(−n)=(2n+1−1) Bn+1/(n+1)\eta(-n) = (2^{n+1} - 1)\,B_{n+1}/(n+1), rational

live ↗
InDirichletEta([0,−1,−2,−3])\mathrm{DirichletEta}(\bigl\lbrack0, -1, -2, -3\bigr\rbrack)Out[12,14,0,−18]\bigl\lbrack\frac{1}{2}, \frac{1}{4}, 0, -\frac{1}{8}\bigr\rbrack

η(4)=78ζ(4)=7π4/720\eta(4) = \tfrac78\zeta(4) = 7\pi^4/720

live ↗
InDirichletEta(4)\mathrm{DirichletEta}(4)Out7π4720\frac{7π^4}{720}

Rewriting in terms of Zeta with FunctionExpand: η(s)=(1−21−s)ζ(s)\eta(s) = (1 - 2^{1-s})\zeta(s)

live ↗
InFunctionExpand(DirichletEta(s))\mathrm{FunctionExpand}(\mathrm{DirichletEta}(s))Out(1−21−s)ζ(s)(1-2^{1-s})ζ(s)
Possible issues #

An exact non-integer argument stays symbolic until N()

live ↗
InDirichletEta(12)\mathrm{DirichletEta}(\frac{1}{2})OutDirichletEta(12)\mathrm{DirichletEta}(\frac{1}{2})
About
Examples15
Checked againstWolfram Language 11 agree4 differSymPy 12 agree1 differmpmath 12 agreeJulia 11 agree1 error
CrosswalkWikipediaMathWorldWikidataDLMFWolfram LanguageSymPympmathJulia

Implementation

referenceenginenotatio

The defining identity — except at s = 1, where the native kernel sums the alternating series instead.

nativeenginetypescriptpackages/ce-patches/src/compute-engine/numerics/dirichlet.ts
mappedexternalwolfram / mpmathpackages/oracle/src/mappings.ts

DirichletEta[s]; mpmath.altzeta(s).

mappedsympypackages/oracle/src/mappings.ts
mappedmpmathpackages/oracle/src/mappings.ts
mappedjuliapackages/oracle/src/mappings.ts

See also: Zeta, DirichletBeta, LerchPhi, PolyLog