Repository navigation
Integrate the polygamma functions, and give an odd order its exact values - #2073
Merged
Merged
Conversation
…lues Each order integrates to the one before, int psi^(n)(u) = psi^(n - 1)(u), and the digamma function to ln Gamma(u) = ln((u - 1)!), for an argument linear in the variable; the integrator reads them from the table it reads the other special functions from. An odd order at a whole or half-whole argument is exact: psi^(n)(1) = n! zeta(n + 1) and psi^(n)(1/2) = (2^(n + 1) - 1) n! zeta(n + 1) (DLMF 5.15.2, 5.15.3), with zeta(2m) a rational times pi^(2m) from the exact Bernoulli numbers, and the recurrence moves the argument to either: polygamma(1, 1) is pi^2/6 and polygamma(1, 3) is pi^2/6 - 5/4. An even order wants zeta at an odd number or Euler's constant, and stays as written. Each exact value is checked against the numerical one. Part of #171. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #171. Follows #2068.
int psi^(n)(u) = psi^(n - 1)(u), and the digamma function toln Gamma(u) = ln((u - 1)!), for an argument linear in the variable. The integrator reads them from the table it uses for the other special functions. WhereGammais negative,ln Gammaisi pimore, which is a constant on each interval between the poles.pi^(n + 1)plus a rational.psi^(n)(1) = n! zeta(n + 1)andpsi^(n)(1/2) = (2^(n + 1) - 1) n! zeta(n + 1)(DLMF 5.15.2, 5.15.3).zeta(2m)comes from the exact Bernoulli numbers, and the recurrence moves the argument to 1 or 1/2.polygamma(1, 1)ispi^2/6,polygamma(1, 3)ispi^2/6 - 5/4, andpolygamma(3, 5/2)ispi^4 - 2624/27.zetaat an odd number, or Euler's constant, so they stay as written.PolygammaTestgains three groups:x = 7/3.Results:
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura