Repository navigation
Leave a hyperbolic rational function to the second pass where its question in s would need a sum over roots - #1981
Merged
Rafael-SOWNet merged 1 commit intoOct 20, 2026
Conversation
…stion in s would need a sum over roots #1961 asks a hyperbolic integrand as a trigonometric one in s. In the first pass, where the exponential substitution has declined because a sum over roots would be needed, the question in s took 2.5-7 s and declined too, and the second pass then answered in e^x as before: 1/(1 + sinh(x)^3) went from 0.21 GB to 4.98 GB for the same answer. With rationalToo set in the first pass and a sum over roots wanted, the rule now declines when the question in s is rational in cos(s) or sin(s) alone and either its denominator holds odd powers of the sine at degree 3 or more, or it has an irreducible factor of degree past 2 over Q (in y, or in y^2 where only even powers stand), which survives t = tan(s/2) or tan(s). 1/(1 + sinh(x)^3), 1/(1 - sinh(x)^3), 1/(1 + sinh(x)^5), 1/(1 + sinh(x)^8), 1/(1 + cosh(x)^8), 1/(1 - cosh(x)^5): the answers before #1961, character for character, at their cost before it. #1961's 30 gained rows answer as on master, and the seven where it wrote a closed form in place of a sum over roots keep it (6.1.7:305/314/318, 6.2.7:101/102/107, 6.7.1:1173). Part of #233. 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.
#1961 asks a hyperbolic integrand as a trigonometric one in
s. In the first pass, the exponential substitution declines these when a sum over roots would be needed. The question insthen took 2.5–7 s and declined too, and the second pass answered ine^xexactly as before #1961.1/(1 + sinh(x)^3)allocated 4.98 GB where it had allocated 0.21 GB, and gave the same answer.The rule now declines in the first pass, with
rationalTooset and a sum over roots wanted, when the question insis rational incos(s)orsin(s)alone and either:y, or iny^2where only even powers stand. That factor survivest = tan(s/2)ortan(s).A guard on the flag alone would also have taken back the seven rows where #1961 wrote a closed form in place of a sum over roots: 6.1.7:305, 314 and 318; 6.2.7:101, 102 and 107; and 6.7.1:1173. The factor test leaves all seven as they are on master, character for character.
Each problem alone, before #1961 → master → this branch (allocation, answer length):
1/(1+sinh(x)^3)1/(1-sinh(x)^3)1/(1+sinh(x)^5)1/(1+sinh(x)^8)1/(1-sinh(x)^5)1/(1+cosh(x)^5)1/(1+cosh(x)^8)1/(1-cosh(x)^5)The answers are identical in all three columns.
Measured on
8270086f, branch against master:Re-run alone, the three moves, 6.1.1:123, 6.7.1:929 and 7.4.1:369, come out the same on both builds: they are problems that take 15–25 s against a 5 s budget. #1961's 30 gained rows answer as on master. 6.1.5:94 reads wrong on both builds; that is the evaluator artefact of #1944. No answer changes, so
BREAKING-CHANGES.mdhas no entry.AHyperbolicIntegrandAsATrigonometricOneIntegralTestpins both sides.1/(1+sinh(x)^4),1/(1+cosh(x)^3)andsech(x)^2/(3-4*tanh(x)^3)keep the closed form, with nosum(.1/(1+sinh(x)^3)and1/(1+cosh(x)^8)are answered by the second pass, withsum(. Each is differentiated back at six points, negative x among them.Part of #233.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura