Repository navigation
Integrate a symbolic power of a monomial on both sides of 0, for a constant of either sign - #2012
Merged
Rafael-SOWNet merged 1 commit intoOct 21, 2026
Conversation
…nstant of either sign DistributeAFractionalPower wrote (c x^n)^b as c^b x^(n b), on the premise that a symbolic n leaves the integrand real only for x > 0. That is false for an even n: (x^m)^p at m = 2 is real for every x, and x^(m p + 1)/(m p + 1) is its antiderivative on x > 0 only. The same answer was wrong for (ln(a x^n)^m)^p/x wherever the logarithm is negative, for (b x^m)^p, for (sin^m)^p cos where the sine is, and for Rubi's 4.3.0 and 4.3.7 (b tan^n)^(1/n) shapes wherever the tangent is. Where n is symbolic and the power is a factor of the integrand, it is now written K x^(n b) with K = (c x^n)^b / x^(n b), constant wherever the power is continuous for every c, n and b: K is integrated as a constant and written back. The answers are Rubi's -- x (x^m)^p/(m p + 1), ln(a x^n) (ln(a x^n)^m)^p/((m p + 1) n), x (c x^n)^b/(b n + 1) -- with no condition on c. Inside a sum the old split is kept: K as a symbol there made a 568-character piecewise of 1/(1 + 4 (x^(2n))^(1/n)). On 551 rows with a symbolic power of a power: 12 wrong -> 4 (those four are F^(f (a + b ln(...))^2), whose values pass the evaluator's range), checked at m = 2, p = 1/2 against mpmath on both sides of 0. In 1.1.3.2, 47 answers lose a `provided b > 0`. Chain against master a567c8b: pocket of 1,933 rows, allocation over those solved on both identical (457.5 GB); samples unchanged; no other row moved. Part of #233. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 21, 2026
…ower of u The rule that reads an exponential's exponent P as the variable, beside its derivative, wrote P as u only where it stood as written. Taking the leading coefficient's power out of a power below the bar hands on e^P P'/(P/c)^k, where P/c is another polynomial, so e^(a + b x + c x^2) (b + 2 c x)/(a + b x + c x^2)^3 went on to the ansatz and ran out of time, where it is e^u/u^3. A polynomial equal to k P coefficient by coefficient is now read as k u, and a whole power of one as the power of k times the power of u. Rubi's 2.3: the cube, past 60 s on master f7f2a7a, is answered in 27 ms (197 characters); the square, 14.4 s and 9.9 GB there, takes 0.3 s and 7 MB (114 characters, carrying a factor that is 1). 2.5.0 declined both. Of the other 21 rows the branch's chain moved against 4877ed2, 18 answer identically on master f7f2a7a and here, and 3 are declined or past 20 s on both: #2005 and #2012 have since written the other mechanisms this branch had, and those are not part of it any more. Part of #233. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 21, 2026
…ower of u The rule that reads an exponential's exponent P as the variable, beside its derivative, wrote P as u only where it stood as written. Taking the leading coefficient's power out of a power below the bar hands on e^P P'/(P/c)^k, where P/c is another polynomial, so e^(a + b x + c x^2) (b + 2 c x)/(a + b x + c x^2)^3 went on to the ansatz and ran out of time, where it is e^u/u^3. A polynomial equal to k P coefficient by coefficient is now read as k u, and a whole power of one as the power of k times the power of u. Rubi's 2.3: the cube, past 60 s on master f7f2a7a, is answered in 27 ms (197 characters); the square, 14.4 s and 9.9 GB there, takes 0.3 s and 7 MB (114 characters, carrying a factor that is 1). 2.5.0 declined both. Of the other 21 rows the branch's chain moved against 4877ed2, 17 answer identically on master f7f2a7a and here, and 4 are declined or past 20 s on both: #2005 and #2012 have since written the other mechanisms this branch had, and those are not part of it any more. Part of #233. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 21, 2026
…ower of u (#2020) The rule that reads an exponential's exponent P as the variable, beside its derivative, wrote P as u only where it stood as written. Taking the leading coefficient's power out of a power below the bar hands on e^P P'/(P/c)^k, where P/c is another polynomial, so e^(a + b x + c x^2) (b + 2 c x)/(a + b x + c x^2)^3 went on to the ansatz and ran out of time, where it is e^u/u^3. A polynomial equal to k P coefficient by coefficient is now read as k u, and a whole power of one as the power of k times the power of u. Rubi's 2.3: the cube, past 60 s on master f7f2a7a, is answered in 27 ms (197 characters); the square, 14.4 s and 9.9 GB there, takes 0.3 s and 7 MB (114 characters, carrying a factor that is 1). 2.5.0 declined both. Of the other 21 rows the branch's chain moved against 4877ed2, 17 answer identically on master f7f2a7a and here, and 4 are declined or past 20 s on both: #2005 and #2012 have since written the other mechanisms this branch had, and those are not part of it any more. Part of #233. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 21, 2026
… and a sine raised from nothing as a derivative (#2031) - A sum of powers of one sine, cosine, secant or cosecant of a linear, the powers not whole and two apart, by the reduction formula from the highest down; each power alone is elliptic. Beside x, by parts once. - The derivative of a sine raised from nothing times powers of the cosine and sums in it, or of a cosine beside the sine. - A cosine beside a function of the sine with a power of it that is not rational, in s = sin(x). - (c sin(a + b x)^n)^(1/n) as a constant times sin(a + b x) between the zeros of the sine, and so for the cosine. - Under the homogeneous substitution, factors written alike on both sides cancelled; under the tangent, a whole power of a product distributed; and the root of 1 - cos(x)^2 beside a root of 1 - cos(x) as the product of the roots of 1 - cos(x) and 1 + cos(x). Chain against master f7f2a7a: pocket of 2,005 rows, 1,979 -> 1,998 solved, 0 wrong; family 4's sample 1,025 -> 1,026, the others unchanged; the 19 rows that moved, alone, 0 -> 19 solved; 7,510 rows compared for allocation, none grew past 55 MB. The new test that the power-of-x case is left to the rules before it pinned `c > 0` in the answer to (c x^n)^(1/n), as those wrote it before #2012; master writes x (c x^n)^(1/n)/2, whose derivative is the integrand on every branch since d/dx (c x^n)^(1/n) = (c x^n)^(1/n)/x, and the test pins that. Part of #233. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Opus 5.5 (1M context) <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.
Part of #233. Fixes wrong answers.
DistributeAFractionalPower(SolveByDistributingAPowerOfAMonomial) wrote(c x^n)^basc^b x^(n b). Its stated premise was that a symbolicnleaves the integrand real only forx > 0. That is false for an evenn. Atm = 2,(x^m)^pis real for every x, whilex^(m p + 1)/(m p + 1)is its antiderivative onx > 0only. The same defect gave wrong answers for:(ln(a x^n)^m)^p/x, wherever the logarithm is negative (Rubi's 3.5:189 and 191);(b x^m)^p;(sin^m)^p cos, wherever the sine is negative;(b tan^n)^(1/n)shapes, wherever the tangent is negative.The harness does not see these, because its pins make
mnon-integer, so the integrand is complex where the base is negative and those points are skipped. They were found and checked atm = 2, p = 1/2with mpmath, on both sides of 0.Where
nis symbolic and the power is a factor of the integrand, it is now writtenK x^(n b), withK = (c x^n)^b / x^(n b).Kis constant wherever the power is continuous, for everyc,nandb. It is integrated as a constant and written back. The answers become Rubi's, with no condition onc:x (x^m)^p/(m p + 1);ln(a x^n) (ln(a x^n)^m)^p/((m p + 1) n);x (c x^n)^b/(b n + 1).Inside a sum the old split is kept:
Kas a symbol there made a 568-character piecewise of1/(1 + 4 (x^(2n))^(1/n)).Measured with the probe against master a567c8b:
The 4 remaining WRONG are the same rows on both builds:
F^(f (a + b ln(...))^2), whose values at the probe's pins are 1e277 to 1e992, past the evaluator's range. The harness judges them Solved. In 1.1.3.2, 47 answers lose aprovided b > 0.Chain against master a567c8b, with the harness at its current revision on both arms:
Tests: a new class pinned at
m = 2, p = 1/2and atm = 2.3, p = 1.44, on both sides of 0.ExponentialOfALogarithmIntegralTest.APowerOfAMonomialIsDistributed, which pinned the oldprovided c > 0, now asserts no condition and checksc < 0andx < 0too.One wrong answer remains, unchanged by this PR:
1/(1 + (x^n)^(1/n))givesln(x + 1), wrong atn = 2forx < 0.The BREAKING-CHANGES.md entry gives 2.5.0's answer, which was a decline for every input, and the unreleased master's.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura