A constant of integration is matched to a linear divisor with a symbol in it - #1642
Merged
Merged
Conversation
…l in it By parts against a polynomial chooses the polynomial's antiderivative so that what the other factor's derivative divides by divides it too: against x ln(1 + x) the antiderivative of x is (x^2 - 1)/2, and the remainder is a polynomial. That was done where the division left a number over, and a + b x leaves a symbol: x^2/2 over a + b x leaves a^2/(2 b^2), so x Shi(a + b x)^2 kept x^2/(a + b x) in its remainder and nothing read it. The antiderivative less its value at the root, -a/b, is divisible by the linear, and it is written now as the linear times the quotient, so that the linear cancels as written: x Shi(a + b x)^2 and x Ei(a + b x)^2 are two rounds of parts each. Measured on the Rubi corpus, master at 6c94652 and this change on it, run side by side: family 8 373 -> 376 of 420 (x Ei, x Shi and x Chi of a + b x, squared); family 2 544 of 650, the independent suites 1756 of 1814 and families 1 and 3 to 7 at five a file 800 of 897, on both. 0 wrong everywhere. Run alone, the three are 0 of 3 on master and 3 of 3 here; the fourth problem that moved, 2.3 #622, is 22 s unevaluated on both. The unit tests pass, 14,259. The performance gate passes on d480366e, which is this change on 6c94652: allocation is what the baseline says on all 19 gated benchmarks. SpecialFunctionsByPartsTest has two rows with a shifted argument, each differentiated back with its parameters pinned. Part of #1501. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 1, 2026
… term (#1643) #1639 asked the remainder of a special function's square term by term only for an argument b x. For a + b x, the remainder divided by the linear, and its terms were the exponentials a hyperbolic function is written as, each a harder question than the whole. With the constant of integration matched to the linear (#1642), the linear cancels and the terms are the case without the offset, so the asking is offered for any linear argument now. The exception is an error function beside anything but itself. Its derivative is a Gaussian of the shifted argument rather than a quotient by it, so a polynomial beside it stays in every term: asking them took the decline of (c + d x) erf(a + b x)^2 from six seconds to twenty-four, and answered nothing. Measured on the Rubi corpus, master at 16203aa and this change on it, run side by side: family 8 380 -> 394 of 420, 0 timeout (erf, erfc and erfi of a + b x squared; Si and Ci of a + b x squared beside x and x^2; Ei, Shi and Chi of a + b x squared beside x^2; Shi(a + b x)^2 and Si(a + b x)^2; x^2 Ci(a + b x) cos(a + b x) and x^2 cos(a + b x) Si(a + b x)); family 2 544 of 650, the independent suites 1756 of 1814 and families 1 and 3 to 7 at five a file 800 of 897, on both. 0 wrong everywhere. Run alone, the fourteen are 0 of 14 on master and 14 of 14 here. Measured the same way with the error functions not excepted, family 8 was the same 394 with six timeouts more, and families 0 to 7 moved nowhere. The unit tests pass, 14,265, and the performance gate passes on ec42a120: allocation is what the baseline says on all 19 gated benchmarks. SpecialFunctionsByPartsTest has four more rows with a shifted argument, each differentiated back with its parameters pinned. Part of #1501. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
By parts against a polynomial chooses the polynomial's antiderivative so that what the other factor's derivative divides by divides it too. Against
x ln(1 + x), the antiderivative ofxis(x^2 - 1)/2, and the remainder is a polynomial. That was done only where the division left a number over.a + b xleaves a symbol:x^2/2overa + b xleavesa^2/(2 b^2). Sox Shi(a + b x)^2keptx^2/(a + b x)in its remainder, and nothing read it.The antiderivative less its value at the root
-a/bis divisible by the linear, and it is now written as the linear times the quotient. The linear then cancels as written, andx Shi(a + b x)^2andx Ei(a + b x)^2are two rounds of parts each, asx Shi(b x)^2is (#1639).A number left over is read as before, so the constant changes only for a linear divisor with a symbol in it. The answers it touches are special functions of
a + b xbeside a power ofx:x Ei(a + b x)readsEi(a + b x) (a + b x)(x/(2b) - a/(2b^2)) - ..., the same function as before.Measured
"x*Shi(a+b*x)^2".Integrate("x")a ^ 2 * Shi * x ^ 2 / 2 + a * b * 2 * Shi * x ^ 3 / 3 + b ^ 2 * Shi * x ^ 4 / 4 + C, withShia variableShi(a + b x)andEi(2 (a + b x)),Ei(-2 (a + b x))"x*Ei(a+b*x)^2".Integrate("x")a ^ 2 * Ei * x ^ 2 / 2 + a * b * 2 * Ei * x ^ 3 / 3 + b ^ 2 * Ei * x ^ 4 / 4 + C, withEia variableEi(a + b x)andEi(2 (a + b x))6c94652fand this change on it, run side by side, 0 wrong everywhere:x Ei,x Shiandx Chiofa + b x, squared.d480366e, which is this change on6c94652f. Allocation matches the baseline on all 19 gated benchmarks.SpecialFunctionsByPartsTesthas two rows with a shifted argument, each differentiated back with its parameters pinned.Still declined, 18 problems of family 8's shifted squares:
Shi(a + b x)^2,Si(a + b x)^2, anderf,erfcanderfiofa + b xsquared.x:x Si(a + b x)^2andx Ci(a + b x)^2.x^2:Ei,Shi,Chi,SiandCiofa + b xsquared.(c + d x)and(c + d x)^2: the error functions ofa + b xsquared.The term-by-term asking of #1639 is held to a multiple of
x, and these need it, or the polynomial divided by the linear first.Part of #1501.
🤖 Generated with Claude Code