A root of a rational function of coth(x) is integrated by the hyperbolic half-angle - #1463
Merged
Merged
Conversation
…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
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.
coth(x)^3/sqrt(a + b coth(x)^2)was a search past the budget (17–50 s, unevaluated).SolveARationalFunctionOfTheHyperbolicTangentrefused the half-angle —u = tanh(x)for an integrand written ine^(2x)— whenever a root was in the integrand, because forsqrt(sinh(x))the half makes a root of2u/(1 - u^2)whereu = e^xanswers with a root of a polynomial. With a root it now takes the half where every radicand comes out over a power ofu:a + b coth(x)^2is(b + a u^2)/u^2, whose root issqrt(b + a u^2)/|u|, and|u|^kfor the bare square issgn(u) u^kat every depth — the one half-odd powerSolveByTakingARootOfAPerfectSquare(#1462) takes beyond the square root, with the radicand restricted tox^2so the(1 + 2u + u^2)^(5/2)case that PR measured stays untouched. The halved argument goes throughSimplify(InnerSimplifiedleft2x/2in the answer).Measured (final build; the suite and gate ran on a build that also carried the inert dispatcher trace,
AM_TRACE_CHAINunset, stripped before the commit; the three test classes were re-run on the stripped build, 17 passed):familycap.sh 6 20): 335 → 344/417, 0 wrong, timeouts 42 → 34 — the ninecoth^m (a + b coth²)^(p/2)rows of 6.4.7, nothing lost.bench.sh: PASSED on all 19 gated benchmarks.IP_QUAD=1) as well as by the pinned differentiate-back test.BREAKING-CHANGES.mdcarries 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