A rational function of the tangent of a linear argument with symbols in it is not simplified under the linear substitution - #1731
Merged
Conversation
The substitution search reaches tan(g + h x) through u = g + h x and simplified the quotient of the integrand by du/dx in u before asking for its integral. Under a linear candidate that quotient is the integrand with its argument renamed, over a constant, and holds nothing to simplify; with the nine symbols of Rubi's 4.3.4.2 in it the simplification took 28 of 32 s. It is handed on as it is: (a + b tan(g + h x))(A + B tan(g + h x) + K tan(g + h x)^2)/(c + d tan(g + h x))^2 is answered in 4.5 s where master took 38, and the cube over a cube in 18 s where master ran past a minute and a half. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…a linear substitution Measured one build at a time, seven integrands master answers ran out of time on the branch: beside a sine, a secant, a logarithm or the imaginary unit, the simplified form is what the rules after the substitution read, and cot(c + d x)^8/(a + a sin(c + d x)) went from one second to seventy without it. The quotient is handed on unsimplified only where every function of u in it is its tangent or cotangent and it holds no imaginary unit, which is 4.3.4.2's shape; the seven are back at master's times and 4.3.4.2's answers keep theirs. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
# Conflicts: # BREAKING-CHANGES.md
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura # Conflicts: # BREAKING-CHANGES.md
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 #718.
The substitution search reaches
tan(g + h x)throughu = g + h x, and simplified the integrand's quotient byh, written inu, before asking for its integral. With the nine symbols of Rubi's 4.3.4.2 in it that took about half a minute, for an expression that is the integrand with its argument renamed and holds nothing to simplify:ba8eb99b(a + b tan(g + h x)) (A + B tan(g + h x) + K tan(g + h x)^2)/(c + d tan(g + h x))^2(a + b tan(g + h x)) (A + B tan(g + h x))/(c + d tan(g + h x))^2(A + B tan(g + h x) + K tan(g + h x)^2)/((a + b tan(g + h x)) (c + d tan(g + h x)))Timed one integrand at a time, beside other work on the machine.
What changes. Under a linear candidate, whose quotient in
uis free ofx, the quotient is handed on as it is written, inner-simplified only, and not put through the simplifier's search. The partial-fraction rules after it read it as written.Tests:
LinearArgumentSubstitutionTest, three rows of 4.3.4.2's shapes, each answered and differentiated back with the symbols pinned;g + h xfor the argument, sinceeis Euler's number here.Measured first on 4.3.4.2 whole and every third problem of 4.3.3.1, 420 problems, at the corpus's 5-second budget, against master
8f3757cd, the branch's base:Measured then on the Rubi corpus against master
8f3757cd:No answer is wrong in the sample on either build. Of the 29 problems the two builds disagreed on, run again one build at a time, 21 ran out of time on master and are answered here: 19 of 4.3.4.2's,
(a + b tan(e + f x))^2 (A + B tan(e + f x) + C tan(e + f x)^2)/(c + d tan(e + f x))^3among them, 4.3.3.1'ssqrt(a + b tan(c + d x)) (A + B tan(c + d x))/tan(c + d x)^(9/2), and 1.2.1.9's(a + c x^2)^3 (A + B x + C x^2)/(d + e x)^3. 6.1.1's(c + d x)^3 (a + i a sinh(e + f x))^2is answered on both, in a form the harness could check at no point on master and checks here. The other seven came out the same on both builds: four answered after about twenty seconds on either, past the corpus's budget, two past it on both, and one declined on both.The suite passes on the commit measured,
490fc454, 14,594 tests with 13 skipped, and so does the allocation gate. Masterba8eb99bis merged in since, with one conflict, two entries at one anchor in BREAKING-CHANGES.md; the calculus tests pass on the merge, 4,031 of them, and every row above is as the table says on it.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura