Repository navigation
A root of a power is not read as the power, and two proportional radicals are not a quotient of two - #1388
Merged
Conversation
…ower, and two proportional radicals are not a quotient of two The first sample of Rubi's family 4 found seven wrong answers, and six were one shape: a fractional power of an even power of a trigonometric function, (sin^2)^(3/2), which is |sin|^3 and was read as sin^3 by two readers. The polynomial parser read (x^q)^v as x^(q v) for any v, and through the long-division rule Simplify made u^2 of (u^2)^(3/2)/u and -1 of sqrt(u^2)/(-u), wrong for every negative u -- which is how (sin(x)^2)^(3/2) under u = cos(x) was integrated as sin^3. A whole v still multiplies, since (x^q)^3 is x^q x^q x^q however x is signed, and a fractional v over a first power is still read, (a x)^(3/2) as a^(3/2) x^(3/2), the generic reading every rule uses; over any other power it is refused. The sin^p cos^q reader multiplied the same way for its own powers, and a fractional power of anything holding an even whole power of a trigonometric function is refused there too. Two of the six are now answered with the sign in them, (a sin^2)^(5/2) and 1/sqrt(a cot^2) by the sign-of-the-complement route, and four are declined, the modulus of a trigonometric function being a class with no rule yet (#1387). The seventh was a zero: sin(a + b (c + d x)^(1/3))/(c e + d e x)^(1/3) came back as `0 provided ...`, a claim, from the rule that rationalises two fractional powers of different linears by the quotient of their roots. The two linears here are proportional, their determinant is zero, the second written in t was 0/(a - c t^q), and everything it multiplied vanished before anything was asked in t. A determinant that is zero, exactly or once simplified, declines (#1386). Two answers on the independent suites go with the sign error: asin(sqrt(1 - x^2))/sqrt(1 - x^2), whose answer was right for x > 0 and off by a sign for x < 0 -- the same identity, through sqrt(x^2) -- and asin(x/a)^(3/2)/sqrt(a^2 - x^2), whose derivative-divides step collected a sqrt(1 - x^2/a^2) to sqrt(a^2 - x^2) through (a^2)^(1/2) = a, which is the identity taken on a symbol and is not taken now either. Recorded in BREAKING-CHANGES.md with the six. The independent suites: 1706 -> 1705, 0 wrong. Four suites green. Part of #718. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…amily-4 answers the strict reading costs are recorded (u^3)^(3/2) is i at u = -1 and u^(9/2) is -i there, so the reading (x^q)^v = x^(q v) is refused for every q but one when v is fractional, not only for an even q -- the parity-only guard was tried and gave u^(7/2) for (u^3)^(3/2)/u, which is the same class of wrong answer one sign further along. Rubi's (b tan^3)^(3/2) was integrated as b^(3/2) tan^(9/2) by that reading, wrong wherever the tangent is negative, and the corpus counted it solved because its sample points all had the tangent positive; it is the eighth wrong answer of the first family-4 sample and is declined now. The test for the parser checks the odd cases at negative u, and the integrator's test checks the tangent at points on both sides of its zero. The other answer the sample loses is sec(c+dx)^(3/2)/(b sec(c+dx))^(5/2), which was simplified to cos/(b^(5/2) d) through (1/cos)^(3/2) = cos^(-3/2), wrong for every negative cosine and cancelling against the same wrong step on the denominator. The answer it reached is right for b > 0 and not otherwise, like the asin row already recorded, so both stand in BREAKING-CHANGES.md as the cost, with the reading that produced them. The whole-number test is a helper over the three primitive types rather than a primitive built to compare against. Part of #718. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This was referenced Sep 16, 2026
…, not as a wrong answer, and the suite figures are against the same harness (b tan^3)^(3/2) is real only where the tangent is positive, and there b^(3/2) tan^(9/2) agrees with it; the two differ where the tangent is negative, where the integrand is complex-valued and the answer is off the principal branch. An answer is wrong where it differs on the integrand's real domain, which this one never did, so it stands with the asin(x/a) and sec rows as what the strict odd-power reading costs. The independent-suite figure is 1707 to 1705 measured with one harness, the two asin rows; 1706 was the previous harness's count of master. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Sep 23, 2026
…e same function (#1481) `sqrt(b sec(x))/sec(x)^(7/2)` was left as written: the two powers of the secant are one function to the power -3, which the rules for the secant answer, and they could not see it while one of them was written over `b sec(x)`. `(c f)^b` is `c^b f^b` for a positive real `c` and any `f`, so a symbolic constant gives the answer `provided c > 0` -- a condition 2.5.0 omitted for `sec(x)^(3/2)/(b sec(x))^(5/2)`, whose answer is wrong wherever `b` and the secant are both negative, and which #1388 withdrew for that reason. The constant is taken out only of a single factor in which `x` enters only through trigonometric functions (a constant written in every term of such a sum counts: `a - a sin(x)^2` is `a (1 - sin(x)^2)`), never of an even power, and only after the rules that answer the same shapes for any real constant -- the even power with its sign, the half angle of `a +- a sin`. The rule declines where its rewrite simplifies back to the question it was asked: its first version rewrote `x/csch(x)^(3/2)` into itself through a constant built as `1 * 1`, re-asked it at the same depth at every level, and hung the test run. Rubi family 4 goes from 290 to 309 of 422 with five fewer timeouts, family 6 from 377 to 378, with no row lost in families 1, 4, 5, 6 or 7; the 1774-problem suite stays at 1707 with no wrong answer, error or timeout, and the unit suite runs to completion, 12,677 tests. Part of #718. Co-Authored-By: Claude Opus 5.5 <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.
Two wrong-answer classes found by the first sample of Rubi's family 4 (trigonometric functions), both on master, both fixed here; #1386 and #1387 are the issues. Cut from
master; touchesPolynomialSolver.ParseMonomial, thesin^p cos^qreader and the two-linear-radicals rule, and nothing the other open PRs touch.#1387 — a root of a power is not the power.
(sin^2)^(3/2)is|sin|^3, and two readers took it forsin^3:(x^q)^vasx^(q v)for anyv, so throughSimplify's long division(u^2)^(3/2)/ubecameu^2andsqrt(u^2)/(-u)became-1— wrong for every negativeu, and aSimplifyresult, not only an integrator's. A wholevstill multiplies ((x^q)^3isx^q x^q x^qhoweverxis signed); a fractionalvover a first power is still read ((a x)^(3/2)asa^(3/2) x^(3/2), the generic reading every rule uses); over any other power it is refused — an odd one too, since(u^3)^(3/2)isiatu = -1whereu^(9/2)is-i. The parity-only guard was tried and rejected: it gaveu^(7/2)for(u^3)^(3/2)/u, the same class of wrong answer one sign along.sin^p cos^qreader multiplied the same way; a fractional power of anything holding an even whole power of a trigonometric function is refused.Six family-4 answers were wrong by it, on every other half-turn. Two are now answered with the sign in them (
(a sin^2)^(5/2),1/sqrt(a cot^2)—sgn(sin x) …, by the sign-of-the-complement route) and four are declined: the modulus of a trigonometric function is a class with no rule yet, and unevaluated beats wrong.#1386 —
sin(a + b (c + d x)^(1/3))/(c e + d e x)^(1/3)integrated to0 provided …. The rule that rationalises two fractional powers of different linears by the quotient of their roots took two proportional linears; their determinant is zero, the second linear intwas0/(a − c t^q), and everything it multiplied vanished before anything was asked int. A zero determinant, exactly or once simplified, declines.Recorded in
BREAKING-CHANGES.md, with a seventh wrong answer on the independent suites —asin(sqrt(1 − x^2))/sqrt(1 − x^2)was answered−asin(…)^2/2, right forx > 0and off by a sign forx < 0, the same identity throughsqrt(x^2)— and the three answers the strict reading costs, each right where the integrand is real or for a positive symbol, and only there:(b tan^3)^(3/2), integrated asb^(3/2) tan^(9/2)(the odd-power reading;(u^3)^(3/2)isiatu = -1whereu^(9/2)is-i, so the two agree only where the tangent is positive, which is where the integrand is real);asin(x/a)^(3/2)/sqrt(a^2 − x^2), whose derivative-divides step collecteda sqrt(1 − x^2/a^2)tosqrt(a^2 − x^2)through(a^2)^(1/2) = a; andsec(c+dx)^(3/2)/(b sec(c+dx))^(5/2), whichSimplifytook tocos/(b^(5/2) d)through(1/cos)^(3/2) = cos^(-3/2), wrong for every negative cosine and cancelling against the same wrong step on the denominator. The reader that could restore the last two soundly is a numeric proportionality check in the substitution search rather than a symbolic collection, which is a follow-up.The independent suites: 1707 → 1705 (the two
asinrows), 0 wrong, 0 timeouts. Family 4's sample (422 problems at 6 per file): 7 wrong → 0 wrong, 220 → 220 solved (the two answered with the sign against the three recorded), 48 → 49 timeouts. Four suites green; the new tests check each of the six and the tangent at points on both sides of a zero of the function, and theSimplifyrows at negativeu.Part of #718.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura