Skip to content

Keep the sign of a half-odd power of a negative multiple through the long division - #1957

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-half-odd-power-of-a-negative-multiple-keeps-its-sign
Oct 20, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-half-odd-power-of-a-negative-multiple-keeps-its-sign

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The polynomial reader took (c x)^r apart as c^r x^r for any constant c and a power r that is not whole. That holds for c > 0. For c < 0, c x is positive where x < 0, and c^r and x^r are both imaginary there, so the answer comes out with the wrong sign. Such a power now comes apart over a positive number only. The limits at +oo read the variable as positive and tell the reader so.

Wrong answers in 2.5.0, each the negative of the right value for every x < 0, where the integrand is real:

2.5.0 Now
sqrt(-x)*(x+1)/x, Integrate 2i * (sqrt(x)) ^ 3 / 3 + 2i * sqrt(x) + C (sqrt(-x) * x / (3/2) + sqrt(-x) / (1/2) provided not x = 0) + C
sqrt(-x)*(x+1)/x, Simplify i * (sqrt(x) + x ^ (-1/2)) unchanged
(-3*x)^(5/2)*(x+1)/x, Integrate (-3)^(5/2) x^(7/2)/(7/2) + … ((-3) x)^(5/2) x/(7/2) + …

Answered as a result, with b under the power and right for either sign of b:

  • (b x)^(5/2) (x^2 - 1)/x;
  • Rubi's 4.3.0 (b sec(x))^m tan(x)^3 and cot(x)^3 (b csc(x))^m at a half-odd m.

Measured on 8a1ef454, branch against master:

Run Problems Master Branch
Pocket: the files that reach the reader 6,815 6,758 solved 6,757 solved
Family 1, 40 a file 1,381 1,362 1,362
Family 0, whole 1,814 1,789 1,789
Families 2 to 8, sampled 2,410 2,362 2,361

Two problems moved. Both time out on both builds when re-run alone, so they are load noise. No run had a wrong answer. Gate and suite (15,618) pass.

AHalfOddPowerOfANegativeMultipleIntegralTest checks both signs of b and of the variable. BREAKING-CHANGES.md has the entry.

Part of #233.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…long division

The polynomial reader took `(c x)^r` apart as `c^r x^r` for any constant c and
a power r that is not whole. That holds for c > 0 and not for c < 0, where c x
is positive and c^r and x^r are both imaginary. So `sqrt(-x) (x + 1)/x` was
integrated as `2i sqrt(x)^3/3 + 2i sqrt(x)` and simplified to
`i (sqrt(x) + x^(-1/2))`, each the negative of the right value for every x < 0,
where the integrand is real. Such a power now comes apart over a positive
number only. The limits at +oo read the variable as positive, and they say so
to the reader.

Answered as a result, with b under the power and right for either sign of b:
- `(b x)^(5/2) (x^2 - 1)/x`;
- Rubi's 4.3.0 `(b sec(x))^m tan(x)^3` and `cot(x)^3 (b csc(x))^m` at a
  half-odd m.

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 20, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 27e6514 into master Oct 20, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 20, 2026
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