Skip to content

clausen

specfun · scripts/specfun/clausen.m

: y = clausen (x)

Clausen function of order 2 Cl2 (x) = sum_k sin (k*x) / k^2 for real x. The function is odd and 2\pi-periodic, with Cl2 (0) = Cl2 (pi) = 0 and Cl2 (pi/2) equal to Catalan’s constant. Evaluation uses the Koelbig Chebyshev expansions of Cl2.

Single inputs yield single outputs. +/-Inf map to NaN.