A root of a square inside a sum is integrated on each side of the square's zero - #1726
Merged
Rafael-SOWNet merged 2 commits intoOct 4, 2026
Merged
Conversation
…are's zero 1/(1 + (x^2)^(3/2)) is 1/(1 + x^3) for a positive x and 1/(1 - x^3) for a negative one, and x/(x + sqrt(x^6)) is 1/(1 + x^2) and 1/(1 - x^2). The rules for a root of a perfect square and for a square factor taken out of a root wrote the sign of the modulus out in front of the integral, which holds for a factor of the integrand and not inside a sum, so the answer was the positive side's on both. A sign goes in front only where every occurrence of the root is a factor; otherwise the integrand is integrated with the sign 1 and with it -1, and the answer is the piecewise of the two. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…of-a-square-inside-a-sum
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/(1 + (x^2)^(3/2))is1/(1 + x^3)for a positivexand1/(1 - x^3)for a negative one. The rule for a root of a perfect square writes(x^2)^(3/2)assgn(x) x^3and took the sign out in front of the integral, which holds where the root is a factor of the integrand and not inside a sum: the answer wassgn(x)times the first one's, right for a positivexand wrong for every negative one. The rule that takes a square factor out of a root did the same withsqrt(x^6). 2.5.0 declined all of these. Checked with points on both sides of zero,x = ±0.4, ±1.3, ±2.7:959c2d2e1/(1 + (x^2)^(3/2))x > 0, wrong for everyx < 01/(1 + sqrt(x^2))x > 0, wrong for everyx < 0x/(x + sqrt(x^6))x > 0, wrong for everyx < 01/(2 + sqrt(x^2 + 2x + 1))x > -1, wrong belowsqrt(x^2)/(1 + x)What changes. A sign goes in front of the integral only where every occurrence of the root is a factor of the integrand, as before. Where one stands inside a sum, the root is written with a sign of its own, the integrand is integrated with it
1and with it-1, and the answer is the piecewise of the two on the sign of the root's linear. More than one such linear, and the rule declines. A root that is a factor keeps its answer:sqrt(x^2)/(1 + x)issgn(x) (x - ln(1 + x))as it was.Tests:
RootOfAPerfectSquareIntegralTest.ARootOfASquareInsideASumIsIntegratedOnEachSide, seven rows, each differentiated back at four negative points and three positive ones; all seven fail on master.Measured first with the corpus's check of the negative side switched on (
IB_BOTHSIDES=1), on the 616 problems with a root of a written square in them, at the corpus's 5-second budget, against master51cb049a, the branch then on it:The five are
1/(1 + (x^2)^(3/2))from 1.1.3.2 and four of 1.3.2's withsqrt(x^6)in a sum,x/(x + sqrt(x^6))among them, each right for a positivexonly. The sixth answered is one master ran out of time on.Measured then on the Rubi corpus against master
8f3757cd, the branch's base:No answer is wrong in the sample on either build. The six problems the two builds disagreed on, run again one build at a time, come out the same on both: four answered and two declined.
The suite passes on the commit measured,
4667b70e, 14,598 tests of 14,611 with 13 skipped, run under a 4 GB heap limit, and so does the allocation gate. Master959c2d2eis merged in since, without conflicts; the calculus tests pass on the merge, 4,010 of 4,011, the other the 30-second clock on decliningsin(x)/(x^3 + 1)^2, which ran past it under the machine's load and passes on its own in 4 s, and every row above is as the table says on it.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura