Skip to content

An odd rational function with symbols in it is integrated in the square of the variable - #1842

Merged
Rafael-SOWNet merged 4 commits into
masterfrom
an-odd-rational-function-in-the-square
Oct 10, 2026
Merged

Rafael-SOWNet merged 4 commits into
masterfrom
an-odd-rational-function-in-the-square

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Part of #718.

A rational function with symbols in it, past the third degree below the bar, is now integrated in u = x² before the partial fractions run, when one side holds only odd powers of x and the other only even ones. x N(x²)/D(x²) dx becomes N(u)/(2 D(u)) du, and N(x²)/(x D(x²)) dx becomes N(u)/(2u D(u)) du. Factors written below the bar keep their shape. Where the odd side has an odd power of x among its written factors, one x is taken off that factor, so x^5 (d + g x²)(a + b x² + c x⁴) is read as x · u² (d + g u)(a + b u + c u²) rather than as a sextic in u that nothing factors.

Before this, partial fractions ran over the full polynomial in x, with symbolic coefficients. Twelve corpus rows timed out at 5 s on master 3c86dda7. They now answer:

integrand Rubi length time
1/(x^5 (a + b x²)^10) 1.1.2.2 652 0.36 s
1/(x^7 (a + b x²)^10) 1.1.2.2 697 0.04 s
1/(x (a + b x² + c x⁴)³) 1.2.2.2 3,106 0.17 s
1/(x³ (a + b x² + c x⁴)³) 1.2.2.2 3,490 0.18 s
(A + B x²)/(x (a + b x² + c x⁴)³) 1.2.2.4 3,250 0.19 s
(A + B x²)/(x³ (a + b x² + c x⁴)³) 1.2.2.4 4,189 0.31 s
1/(x (d + g x²)(a + c x⁴)²) 1.2.2.4 2,870 0.09 s
1/(x^5 (d + g x²)(a + b x² + c x⁴)) 1.2.2.4 3,045 0.05 s
(d + g x² + f x⁴)/(x³ (a + b x² + c x⁴)²) 1.2.2.6 2,657 0.16 s
(d + g x² + f x⁴)/(x^5 (a + b x² + c x⁴)²) 1.2.2.6 3,893 0.16 s
1/((d + g x)³ (a + b (d + g x)² + c (d + g x)⁴)³) 1.2.3.2 4,042 0.10 s
1/((d f + g f x)³ (a + b (d + g x)² + c (d + g x)⁴)³) 1.2.3.2 4,072 0.11 s

Lengths are characters of Stringize(). All twelve ran in one process, in this order.

Rubi corpus, both arms built from 3c86dda7, fix against master:

  • Files 0–8, plus a 16,099-row pocket drawn mostly from families 1 and 4: the pocket goes from 15,858 to 15,870 solved, and its timeouts fall from 94 to 82. Family 1 gains one row; the other files have the same counts in both arms. Both arms have 0 wrong.
  • Rows that moved: the twelve above. A rerun of only those rows gives 12/12 solved on this branch, graded by differentiating back, and 12 timeouts on master.
  • Allocation gate: passed.
  • Unit suite: 15,198 passed, 0 failed, 13 skipped (net10.0).

Where master already answered, the answers get shorter: (A + B x²)/(x³ (a + b x²)) goes from 656 characters to 174. In a 150-row sample of answers that changed, 15 got two to three times shorter and none changed verdict. BREAKING-CHANGES.md has an entry, An odd rational function with symbols in it is integrated in the square of the variable. AnOddRationalFunctionInTheSquareIntegralTest integrates three of the rows and checks each answer differentiates back.

This also takes the slowest named remainder in #718's renaming work, (k x + m x³ + n x⁵)/((d + g x²)(a + b x² + c x⁴)), from 19.7 s to 0.5 s. That branch waits for this one.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 4 commits October 10, 2026 11:49
…re of the variable

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
… sizes

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 10, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 2be3573 into master Oct 10, 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