Skip to content

A power of a multiple of a quadratic's derivative beside a power of the quadratic is a binomial - #1691

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
the-derivative-of-a-quadratic-as-the-variable
Oct 2, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
the-derivative-of-a-quadratic-as-the-variable

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

Rubi's 1.2.1.2 has 344 problems of the form (b d + 2 c d x)^m (a + b x + c x^2)^p, a power of a multiple of the quadratic's derivative beside a power of the quadratic. With a power that is not whole these were declined or ran out of time, since nothing saw that the linear is a multiple of the derivative.

Under t = b d + 2 c d x the quadratic is (t^2/d^2 - (b^2 - 4 a c))/(4 c). The substitution is affine, so this holds exactly, and the integrand is a binomial in t. The new rule, SolveByTheDerivativeOfAQuadraticAsTheVariable, does that:

  • It writes the quadratic in t from its coefficients. Substituting instead would leave a linear term that is zero as a value and not as written.
  • It names each constant of the binomial that is a compound of the coefficients by a symbol of its own, and writes it back into the answer. The binomial rules answer t^(-7) sqrt(c t^2 + k) in 63 ms, and with a - b^2/(4 c) written for k they ran past twenty seconds.
  • It leaves a quadratic with no linear term alone, since that is a binomial already, and taken in t it would be the same question with t scaled.
integrand master this
(a + b x + c x^2)^(3/2)/(b d + 2 c d x)^3 declined 0.8 s
(a + b x + c x^2)^(1/2)/(b d + 2 c d x)^7 declined 0.8 s
(a + b x + c x^2)^(5/2)/(b d + 2 c d x)^5 declined 0.8 s
(b d + 2 c d x)^(5/2)/(a + b x + c x^2)^3 declined after 26 s 0.9 s

Master is e33fbab2, and the times include checking the answer at six points.

On the whole 1.2.1.2 pocket against master be009d56, the 234 of those 344 problems whose answers are in functions the library has, each run alone at the corpus's 5-second budget: 160 solved on master, 211 here, none wrong on either, and 13 timeouts where master has 17.

Tests: DerivativeOfAQuadraticAsTheVariableTest, the four rows above, differentiated back with the symbols pinned, on both sides of the derivative's root wherever the integrand is real.

Measured on the Rubi corpus against master be009d56, with both builds side by side:

master this
family 0, independent suites (1814) 1757 1758
family 1, 40 a file (1381) 1113 1117
families 2 to 8, sampled (2586) 2362 2362

Both builds give the same three wrong answers: two in family 1, 1.2.1.1's roots of negative squares, which #1672 fixed on master after this branch's base, and one in family 7, e^(2 acoth(a x)) sqrt(c - a c x)/x, which #1682 fixed.

Six problems moved between the two runs, so I re-ran each alone on both builds. This branch answers three that master declines or runs out of time on, and none that master answers is lost: from 1.2.1.2, sqrt(c d^2 + 2 c d e x + c e^2 x^2)/(d + e x)^4, sqrt(a + b x + c x^2)/(b d + 2 c d x) and 1/((b d + 2 c d x)^3 (a + b x + c x^2)^(3/2)).

The suite passes, 14,316 tests on a fresh build, and so does the allocation gate. Master e33fbab2 is merged in since, without conflicts; the four rows above were measured on that merge, and its tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 2, 2026 09:07
…he quadratic is a binomial

Rubi's 1.2.1.2 (b d + 2 c d x)^m (a + b x + c x^2)^p, with a power that
is not whole, was declined or ran out of time: no substitution the
search tried saw that the linear is a multiple of the quadratic's
derivative. Under t = b d + 2 c d x the quadratic is
(t^2/d^2 - (b^2 - 4 a c))/(4 c), exactly, since the substitution is
affine, and the integrand is a binomial in t.

The quadratic is written in t from its coefficients rather than by
substituting, which would leave a linear term zero as a value and not
as written; and each constant of the binomial that is a compound of
the coefficients is named by a symbol of its own and written back into
the answer. The rules answer t^(-7) sqrt(c t^2 + k) in 63 ms, and
with a - b^2/(4 c) for k they ran past twenty seconds. A quadratic with
no linear term is a binomial already and is left alone, else the rule
would ask its own question with t scaled.

Part of #718.

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 2, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 61de03d into master Oct 2, 2026
34 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