Skip to content

A whole power of a perfect square in a power of the variable is written as a power of its root - #1494

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
whole-power-of-a-square
Sep 26, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
whole-power-of-a-square

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

1/(a^2 + 2 a b x^2 + b^2 x^4)^2 was left unevaluated. The quartic is b^2 (x^2 + a/b)^2, so a whole power of it is (b^2)^n (x^2 + a/b)^(2n), exactly and with no sign. The rational integrator reads a power of x^2 + a/b where it declined the quartic. This extends #1491, which read half-odd powers of the same squares, to whole ones.

It applies at the question asked, to a square with a symbol in it, where x is below the bar. Two more restrictions each come from a measurement:

  • Not in a polynomial. x (a^2 + 2 a b x^2 + b^2 x^4)^2 is answered as a polynomial already, and written as a power of x^2 + a/b it only changed form.
  • Only a square written out as a sum. The hyperbolic-tangent substitution asks its integrand as the same question, and for Rubi 6.5.7's coth(c + d x)^2/(a + b sech(c + d x)^2)^2 that integrand holds ((a + b - b u^2)^2)^(-1), a square already written as one. Expanded and rewritten, it went from 842 ms to over 60 s.

Two answers that came out in the expanded square before now come out in x^2 + a/b; they're in the changelog with their 2.5.0 values.

Measured

before after
Rubi 1.2.2.2, 1.2.2.4, 1.2.2.7 and 1.2.3.2: the 574 problems that count with a perfect square written in symbols 388 409, no row lost, 9 timeouts either way
Rubi families 1, 4–7, the 7.1 files and the 1774-problem suite — unchanged, row for row
unit suite 12,724 12,727 (three cases added), 0 failed, run to completion
allocation gate — PASSED on all 19 gated benchmarks

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…en as a power of its root

1/(a^2 + 2 a b x^2 + b^2 x^4)^2 was left unevaluated. The quartic is
b^2 (x^2 + a/b)^2, so a whole power of it is (b^2)^n (x^2 + a/b)^(2n),
exactly and with no sign, and the rational integrator reads a power of
x^2 + a/b where it declined the quartic. At the question asked, for a
square written out as a sum with a symbol in it and x below the bar: not
in a polynomial, and not where the square is already written as a power,
which the hyperbolic tangent's integrand for Rubi 6.5.7's
coth(x)^2/(a + b sech(x)^2)^2 holds.

Rubi's 1.2.2.x and 1.2.3.2 perfect squares: 388 to 409 of 574, no row lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit 856831c into master Sep 26, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant