Skip to content

A rational function of the tangent of a linear argument with symbols in it is not simplified under the linear substitution - #1731

Merged
Rafael-SOWNet merged 5 commits into
masterfrom
a-linear-substitution-is-not-simplified
Oct 4, 2026
Merged

Rafael-SOWNet merged 5 commits into
masterfrom
a-linear-substitution-is-not-simplified

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

The substitution search reaches tan(g + h x) through u = g + h x, and simplified the integrand's quotient by h, written in u, 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:

integrand 2.5.0 master ba8eb99b this
(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 declined after 26 s 28.7 s 4.5 s
(a + b tan(g + h x)) (A + B tan(g + h x))/(c + d tan(g + h x))^2 declined after 3.5 s 2.2 s 1.5 s
(A + B tan(g + h x) + K tan(g + h x)^2)/((a + b tan(g + h x)) (c + d tan(g + h x))) declined after 4 s 2.9 s 0.8 s

Timed one integrand at a time, beside other work on the machine.

What changes. Under a linear candidate, whose quotient in u is free of x, 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 x for the argument, since e is 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:

master this
solved 263 281
wrong 0 0
past the budget 136 118

Measured then on the Rubi corpus against master 8f3757cd:

master this
family 0, independent suites (1814) 1766 1766
family 1, 40 a file (1381) 1296 1297
families 2 to 8, sampled (2410) 2215 2222

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))^3 among them, 4.3.3.1's sqrt(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))^2 is 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. Master ba8eb99b is 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

Rafael-SOWNet and others added 5 commits October 3, 2026 14:00
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
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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 4, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 06070d2 into master Oct 4, 2026
34 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