Skip to content

Take a constant out of a fractional power of a nowhere-positive sum negated, for every real constant - #1990

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
take-a-constant-out-of-a-nowhere-positive-sum-negated
Oct 21, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
take-a-constant-out-of-a-nowhere-positive-sum-negated

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

(a - a sec(c + d x)^2)^(n/2) is real only for a < 0, because 1 - sec^2 is nowhere positive. DistributeAFractionalPower took a out as a^(n/2) provided a > 0, so the answer said nothing anywhere the integrand is real.

Where the constant is symbolic and the rest is a nowhere-positive p - q sec^2 or p - q csc^2 (numbers, with q > 0 and q >= p), the rule now writes (-c)^b (-g)^b. That holds for every real c, so no condition is attached. The new helper is TheNegationOfANowherePositiveSum. This sits before #1986's negative arm in the same function. It is exact, so that arm is not tried when it applies.

Rubi's 4.5.7:257–264, at a = -1.3:

Master Branch
Probe verdict PART ×8 (provided a > 0 only) OK ×8
Answer length 93–205 characters 73–187 characters, each shorter

They are also OK at a = +1.3. On this build, #1986's (a + b tan(x))/sqrt(-k tan(x)) is still answered at k = ±1.3, and the two PRs' 427 tests pass together.

Measured on 8270086f, branch against master:

Run Problems Master Branch
Pocket: Rubi's 4.1, 4.3 and 4.5, sampled 2,144 1,996 solved 1,996 solved
Family 1, 40 a file 1,381 1,368 1,368
Family 0, whole 1,814 1,789 1,789
Families 2 to 8, sampled 2,410 2,380 2,381

The corpus harness does not see the gain: it pins a positive, where these integrands are complex everywhere, and 4.5.7:264 reads unverified on both builds. The one move, 7.4.1:369, is answered on both builds when run alone. Of 70 sampled family-4 rows with fractional powers of a ± a trig or b trig, every one answers as before, character for character. One non-corpus variant, (a - 2a sec^2)^(3/2), is longer, 323 → 409 characters: it used to answer only for a > 0, and now answers for every a, including the a < 0 where it is real. No run had a wrong answer.

ANowherePositiveSumUnderAFractionalPowerIntegralTest differentiates the answers back at both signs. BREAKING-CHANGES.md has the entry, with the 2.5.0 column measured on v2.5.0.

Part of #233.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…egated, for every real constant

(a - a sec(c + d x)^2)^(n/2) is real only for a < 0, since 1 - sec^2 is
nowhere positive, and DistributeAFractionalPower took a out as
a^(n/2) provided a > 0: the answer said nothing wherever the integrand is
real. Where the constant is symbolic and the rest is a nowhere-positive
p - q sec^2 or p - q csc^2 (numbers, q > 0, q >= p), the rule now writes
(-c)^b (-g)^b, which holds for every real c, and attaches no condition.

Rubi's 4.5.7:257-264 are answered for a < 0, where the integrand is real,
and for a > 0, all shorter than master's one-arm answers. 70 sampled family-4
rows with fractional powers of a +- a trig or b trig answer as before,
character for character.

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 Rafael-SOWNet added this to the 2.6.0 milestone Oct 21, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 46be7fc into master Oct 21, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 21, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the take-a-constant-out-of-a-nowhere-positive-sum-negated branch October 29, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant