Repository navigation
Reduce a rational function over a power of a symbolic quadratic a power at a time - #1891
Merged
Rafael-SOWNet merged 4 commits intoOct 15, 2026
Conversation
… a time A rational function over a whole power of a symbolic quadratic, beside at most one linear, is taken apart at the linear's root -- through Q - Q(p) = (x - p)(c (x + p) + b), so that every piece stays a short polynomial over a power of L and of Q -- and the power of the quadratic is lowered by the recurrence for the integral of 1/Q^k, down to the first, which is written in closed form. The discriminant, Q(p) and p are named while it runs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…partial fractions b^2 - 4ac a square is a quadratic over two linears, which the partial fractions take apart cheaply: (d + e x)^10/((d + e x)(a e + c d x))^4 went from 2 seconds past the budget here. And below a substitution the routes this pre-empts answered shorter. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…e rules before 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
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
1/((d + e x)(a + b x + c x^2)^4),x^8/(a + b x + c x^2)^4and their kin in Rubi's 1.2.1 ran past a minute. The partial fractions take a symbolic quadratic apart over its roots, and its powers with it. The newSolveARationalFunctionOverAPowerOfASymbolicQuadraticnever takes the quadratic apart:p. UsingQ - Q(p) = (x - p)(c (x + p) + b),N/(L^j Q^k)becomesN(p)/(Q(p)^k L^j), plus short polynomials over lower powers ofLandQ. The terms are kept in a worklist keyed by those two powers, so each stays of small degree.P = S Q + alpha Q' + beta,alpha Q'/Q^kintegrates directly, andbeta/Q^kfollows the recurrenceintegral 1/Q^k = (2 c x + b)/((k - 1) D Q^(k - 1)) + 2 c (2 k - 3)/((k - 1) D) integral 1/Q^(k - 1), withD = 4 a c - b^2.alpha ln Qplusbetatimes the table'sintegral 1/Q.D,Q(p)andpare named atoms while it runs, and the answer is checked by its derivative.It applies to the question asked only, with one linear at most. It declines in three cases, each of which a chain caught:
b^2 - 4 a cis a polynomial square, so the quadratic factors over linears1/(x^2 (d + e x)^4 (d^2 - e^2 x^2)^(7/2))went from 943 characters to 22KTrigonometricOfAnImaginaryLogarithmIntegralTestfailedQhas noxterm and there is no linear (a binomial in x^2)x^22/(a + b x^2)^10ran past the budgetMeasured
intbench, this branch against master 37b4798, 5 s budget. The pocket was 1.2.1.2–1.2.1.4, 1.2.1.9, 1.3.1, 1.2.2.2 and 1.2.2.3 in full (7,020 rows), plus the usual family sample:
Seven rows moved, all to solved, and all held when re-run alone (master solves none of them):
Every new answer was checked exactly with
exactcheck(exact pins, 50 and 2,000 digits, four points, three pin sets): 192 of 192 diff 0. The gate and the suite pass (15,401).The answers are 8.5K to 26K characters, in under 0.4 s each. Much of the length is the table's
integral 1/Q, which is a piecewise on the sign of the discriminant.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura