Skip to content

Integrate the polygamma functions, and give an odd order its exact values - #2073

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
polygamma-integrals-and-exact-values
Oct 22, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
polygamma-integrals-and-exact-values

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #171. Follows #2068.

  • Integrals. 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 uses for the other special functions. Where Gamma is negative, ln Gamma is i pi more, which is a constant on each interval between the poles.
  • Exact values.
    • When. An odd order at a whole or half-whole argument is a rational times pi^(n + 1) plus a rational.
    • How. 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). zeta(2m) comes from the exact Bernoulli numbers, and the recurrence moves the argument to 1 or 1/2.
    • Examples. polygamma(1, 1) is pi^2/6, polygamma(1, 3) is pi^2/6 - 5/4, and polygamma(3, 5/2) is pi^4 - 2624/27.
    • Even orders. They want zeta at an odd number, or Euler's constant, so they stay as written.

PolygammaTest gains three groups:

  • six exact values, each checked against its numerical value;
  • three values that stay as written;
  • four integrals, each differentiated back and compared at x = 7/3.

Results:

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Oct 22, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit d8b8903 into master Oct 22, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 22, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the polygamma-integrals-and-exact-values branch October 29, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant