Skip to content

dilog

specfun · scripts/specfun/dilog.m

: y = dilog (x)

Dilogarithm (Spence) function matching MATLAB R2026a Symbolic Math dilog: dilog (x) = Li2 (1 - x) = integral_1^x log (t) / (1 - t) dt

Numeric inputs are evaluated element-wise. Real inputs whose results are real within a tiny imaginary residual return a real array; otherwise the result is complex. Single inputs yield single outputs.

Known values include dilog (0) = pi^2/6, dilog (1) = 0, dilog (1/2) = pi^2/12 - log(2)^2/2, dilog (2) = -pi^2/12.