Skip to content

An even rational function with symbols skips the substitution search - #1830

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
even-rational-skips-substitution
Oct 9, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
even-rational-skips-substitution

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

(d + e x^2 + f x^4)/(x^4 (a + b x^2 + c x^4)^2) ran past the corpus's budget, with four more of Rubi's. In each the time went to SolveBySubstitution declining an even rational function with symbols in it. The half-angle tangent makes one of 1/((c + d sec(x))^3 sqrt(a + a sec(x))), (1 + x^2)^2/((c + d + (c + 3d) x^2 + 2d x^4)^3 (1 + 2x^2)). The search spent 31 seconds simplifying its quotient by each candidate's derivative, and the partial fractions after it answered in under one. The derivative of anything even is odd, so no polynomial candidate is the substitution for an even rational function. The search now skips one that holds a symbol and whose denominator is past a sextic as written.

integrand 2.5.0 master e7ef0b75 this
(d + e x^2 + f x^4)/(x^4 (a + b x^2 + c x^4)^2) declined past 60 seconds 3,715 characters, 1.1 s
(d + e x^2 + f x^4 + g x^6)/(x^4 (a + b x^2 + c x^4)^2) declined past 60 seconds 3,727 characters, 0.9 s
cos(x)^5/(a + b sec(x)^2)^3 declined past 60 seconds 27,944 characters, 0.7 s
1/((c + d sec(x))^3 sqrt(a + a sec(x))) declined 55 s the same answer, 4 s
1/((a + a sec(x))^(3/2) (c + d sec(x))^3) declined 41 s the same answer, 25 s

x stands for e + f x in the trigonometric rows, which is what was probed. Where master answers, the answer is the same. The last row's remaining time is the partial fractions over a symbolic quadratic to the third power.

Tests: AnEvenRationalFunctionIntegralTest, the first row and the half-angle tangent's rational function above, each differentiated back and compared at six points.

Measured on 14,109 corpus problems, every one whose integrand is a rational function and every one with a secant or a cosecant in it, at the corpus's 5-second budget, against master 61fb760b:

master this
solved 13889 13894
unevaluated 102 102
wrong 0 0
past the budget 108 103

Five problems are answered here and not on master, two of 1.2.2.6, two of 4.5.2.1 and one of 4.5.7, and none the other way. On the 13,889 both answer the time is 2,400 seconds on master and 2,371 here.

master this
family 0, independent suites (1814) 1782 1782
family 1, 40 a file (1381) 1341 1341
families 2 to 8, sampled (2410) 2330 2330

The harness counts no answer wrong in either. The five problems the builds disagreed on, run again one build at a time: master answers none within the budget, this all five.

The suite passes: 15,176 passed, 13 skipped, none failed. The allocation gate passes: every gated benchmark allocates what the baseline says. Merged with master: the library builds for every target.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 9, 2026 04:31
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
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 9, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 19c9f3f into master Oct 9, 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