Skip to content

A root of a rational function of coth(x) is integrated by the hyperbolic half-angle - #1463

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
coth-half-angle-with-roots
Sep 22, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
coth-half-angle-with-roots

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

coth(x)^3/sqrt(a + b coth(x)^2) was a search past the budget (17–50 s, unevaluated). SolveARationalFunctionOfTheHyperbolicTangent refused the half-angle — u = tanh(x) for an integrand written in e^(2x) — whenever a root was in the integrand, because for sqrt(sinh(x)) the half makes a root of 2u/(1 - u^2) where u = e^x answers with a root of a polynomial. With a root it now takes the half where every radicand comes out over a power of u: a + b coth(x)^2 is (b + a u^2)/u^2, whose root is sqrt(b + a u^2)/|u|, and |u|^k for the bare square is sgn(u) u^k at every depth — the one half-odd power SolveByTakingARootOfAPerfectSquare (#1462) takes beyond the square root, with the radicand restricted to x^2 so the (1 + 2u + u^2)^(5/2) case that PR measured stays untouched. The halved argument goes through Simplify (InnerSimplified left 2x/2 in the answer).

Measured (final build; the suite and gate ran on a build that also carried the inert dispatcher trace, AM_TRACE_CHAIN unset, stripped before the commit; the three test classes were re-run on the stripped build, 17 passed):

  • Family 6 (familycap.sh 6 20): 335 → 344/417, 0 wrong, timeouts 42 → 34 — the nine coth^m (a + b coth²)^(p/2) rows of 6.4.7, nothing lost.
  • Family 7: 215/270, 0 wrong, unchanged. 1774-problem suite: 1707, 0 wrong, 0 timeout, wall 85 s, unchanged.
  • Unit suite: 12,600 tests, 0 failed. bench.sh: PASSED on all 19 gated benchmarks.
  • Each new row verified by quadrature (IP_QUAD=1) as well as by the pinned differentiate-back test.

BREAKING-CHANGES.md carries the entry with the 2.5.0 column measured on a 2.5.0 build.

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…lic half-angle

`coth(x)^3/sqrt(a + b coth(x)^2)` was a search past the budget: the
rational-in-tanh route refused the half-angle -- u = tanh(x) for an
integrand written in e^(2x) -- whenever a root was in the integrand,
because for sqrt(sinh(x)) the half makes a root of 2u/(1 - u^2) where
u = e^x answers with a root of a polynomial. With a root it now takes the
half where every radicand comes out over a power of u: a + b coth(x)^2 is
(b + a u^2)/u^2, whose root is sqrt(b + a u^2)/|u|, and |u|^k for the bare
square is sgn(u) u^k at every depth -- the one half-odd power the
perfect-square rule takes beyond the square root. The halved argument is
simplified (InnerSimplified left `2x/2` in the answer).

Family 6 of the Rubi suite: 335 -> 344 of 417, 0 wrong, timeouts 42 -> 34;
family 7 215/270 and the 1774-problem suite 1707 unchanged. Suite 12600
passed; allocation gate passed on all 19 gated benchmarks.

Part of #718.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit 139423a into master Sep 22, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant