Skip to content

A power of x with a symbol in its exponent comes out of a sum, and an odd one out of a root past a quadratic - #1782

Merged
Rafael-SOWNet merged 6 commits into
masterfrom
a-power-of-x-with-a-symbol-in-its-exponent-comes-out-of-a-sum
Oct 5, 2026
Merged

Rafael-SOWNet merged 6 commits into
masterfrom
a-power-of-x-with-a-symbol-in-its-exponent-comes-out-of-a-sum

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

The power of x common to the terms of a sum came out, since #1705, only where every exponent was a rational number and the sum's power was not whole, and an odd one not at all from a sum of whole powers. 1/(a x + b x^n), sqrt(c x)/(a x + b x^n)^(3/2) and x/sqrt(a x + b x^4) were declined, with 58 of the 59 problems of Rubi's 1.1.4.2 that master did not answer:

integrand 2.5.0 master f6e1e308 this
1/(a x + b x^n) declined declined 740 characters
sqrt(c x)/(a x + b x^n)^(3/2) declined declined 1,052 characters
1/sqrt(x^(2 - n) (a + b x^n)) declined declined 921 characters
x/sqrt(a x + b x^4) declined declined 507 characters
1/sqrt((a + b x^3)/x) declined declined 897 characters
(d x^3)^n declined declined 65 characters
x^(3/2 (n - 1))/(a x^(n - 1) + b x^n + c x^(n + 1))^(3/2) declined declined 221 characters

Each answer is differentiated back and compared with the integrand at six positive points, and the last at three negative ones as well, at n = 2.3.

What changes. SolveByTakingAPowerOfXOutOfAFractionalPower reads more:

  • An exponent of x that is a symbol, or a number that is not rational. The lowest power comes out where every exponent is a rational number, and the first written otherwise, and the sum's power may be whole, since nothing else reads such a sum: 1/(a x + b x^n) is 1/(x (a + b x^(n - 1))). The factor in front is written as for a number. A symbol in an exponent does not confine the integrand to a positive x: x^(3 (n - 1)/2)/(a x^(n - 1) + b x^n + c x^(n + 1))^(3/2) is real for a negative x and any n, the phases of the two principal powers cancelling to a sign, and the factor is that sign.
  • An odd power out of a sum of whole powers past x times a linear. A power of x comes out of a fractional power of a sum whose every term has it #1705 left every odd one as it was, so that x/sqrt(x^2 - 2x) stays the secant substitution's, real for x < 0 as well. That holds for x times a linear and a linear over x, and is kept for them, and for x times anything but one sum, where taking it out made the question no easier; past those nothing reads the sum as written, and the factor in front answers the negative side: x/sqrt(a x + b x^4) is real where x < -(a/b)^(1/3) too.
  • A power of a monomial beside the sum, (c x^e)^m for a whole e, as x^(e m) times c^q (c x^e)^r/x^(e r) for the whole part q and the rest r of m, a constant on either side of 0, and c^m for a positive x. And alone, past the first degree: (d x^3)^n. (c x)^m alone is a power of a linear, a substitution's, and a monomial in a power of x that is not whole is SolveByDistributingAPowerOfAMonomial's.
  • A sum inside a product: x (b x + a x^n) is x^2 (b + a x^(n - 2)).

The factor in front takes only the fractional part of the power, and over the integral for a factor below the bar. Every power of x is gathered into one exponent, and where the question is written matters: a negative whole power of x goes below the bar and the question is simplified, since x^(-1) sqrt(a + b x^m) was answered with 1/(1/x) in it where sqrt(a + b x^m)/x is not; any other number stays above and is simplified, since 1/(x^(11/2) sqrt(a + b x^3)) was answered for a positive x only where x^(-11/2)/sqrt(a + b x^3) is answered on both sides; and a symbol stays above unsimplified, where the rules for x^m (a + b x^n)^p read it. Exponents are simplified, so that 1 + n - 1 is n. Still at the top only: below it, integration by parts integrates the answer again, and x^2 sqrt(a x + b x^4), whose integral is not elementary, took half a minute to be declined through an unguarded copy of the rule, where it takes 0.4 s now as on master.

Tests: CombinedRadicalsTest.APowerOfXComesOutWhereAnExponentIsASymbol, seven rows differentiated back on both sides of 0 at n = 1.7; ASymbolInAnExponentLeavesTheNegativeSideReal, the two rows of 1.2.4.2 at n = 2.3, where the factor is -1 for a negative x; and AnOddPowerOfXComesOutOfARootPastAQuadratic, five on both sides of 0 -- one with a negative c, real for a negative x only. With 1 in front for a symbolic exponent, four of these fail.

Measured first on 1,830 problems with a power of a sum or product of powers of x, and all of 1.1.4, at the corpus's 5-second budget, against master 287c69a7, the branch's base:

master this
solved 1677 1760
wrong 0 0
past the budget 22 25

Measured then on the Rubi corpus against master 287c69a7:

master this
family 0, independent suites (1814) 1772 1773
family 1, 40 a file (1381) 1308 1317
families 2 to 8, sampled (2410) 2301 2300

The harness counts no answer wrong in either. The 94 problems the two builds disagreed on, pocket and sample together, run again one build at a time: master answers 4 and this 88 -- 85 that master does not -- and master answers one this does not, 7.1.5:207, (c e + d e x)(a + b asinh(c + d x))^3, at 19 seconds, which nothing here reaches. One more went from a decline in 4.7 s to past the budget: Welz's (2 - (1 + k) x)/(((1 - x) x (1 - k x))^(1/3) (1 - (1 + k) x)), the odd power taken out of x times two sums. The suite named two more of that kind, sqrt(x/(1 + x)^3) and x^2 sqrt(x/(1 + x)^3), answered for a positive x only. After the chain, #1705's exclusion holds again where what is left with the odd power out is not one sum past a linear: the three are as master has them, the Welz row declined in 6.8 s, and the 58 of 1.1.4.2 and the negative-side checks are unchanged. The figures above were measured with three other corpus runs on the machine.

Run on both sides of 0 before that, the pocket counted two answers wrong for a negative x: sqrt(x/(1 + x))/x, which the exclusion returns to master's answer, and 1.2.4.2's x^(3/2 (n - 1))/(a x^(n - 1) + b x^n + c x^(n + 1))^(3/2), which had 1 in front for its symbolic exponent and has the factor now. The pocket on both sides of 0 on the head, against master 092b2815, which it merges:

master 092b2815 this, 8b021ed8
solved 1670 1755
wrong 0 0
past the budget 34 33

This answers 85 of them that master does not, and master none that this does not.

The suite on the commit measured, db485dc4, failed on sqrt(x/(1 + x)^3) and x^2 sqrt(x/(1 + x)^3), fixed by 42c99c75, and on InverseTangentPowerByPartsTest.ANonElementaryRemainderIsDeclinedQuickly, which took 64 s with four corpus runs on the machine; run alone, it and IntegralAnswerCacheTest.AnIntegralWithNoAnswerStillFinishesQuickly take what they take on master, 11 and 10 s. The allocation gate passed. On 8b021ed8 the suite passes, 14,982 tests, and the library builds for netstandard2.0. The head here, ece7fba1, merges master f6e1e308 after correcting the breaking entry; the calculus and corpus tests pass on it, 4,284 tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 6 commits October 5, 2026 03:34
… odd one out of a root past a quadratic

The power of x common to the terms of a sum came out only where every
exponent was a rational number and the sum's power was not whole, and an
odd one not at all from a sum of whole powers. Now an exponent may be a
symbol or an irrational number, with the sum to any power: 1/(a x + b x^n)
is 1/(x (a + b x^(n - 1))), and the integrand is then real for a positive x
only, where the factor in front is 1. An odd power comes out of a root of a
sum of whole powers past x times a linear, which no rule reads as written,
and the factor in front answers the negative side as well. A power of c x
beside the sum is a power of x times c^q (c x)^r/x^r, constant on either
side of 0, and so is a power of a monomial past the first degree alone,
(d x^3)^n; the power comes out of a sum inside a product too.

Every power of x is gathered into one: a negative whole one below the bar,
any other number above it, and a symbol above it unsimplified, which is
where the rules for x^m (a + b x^n)^p read each. Exponents are simplified,
so that 1 + n - 1 is written n.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
The power of x comes out of a root of a sum of whole powers past x times a
linear, where nothing reads the sum as written. Out of x times more than one
factor, or a power of one, it made the question no easier and the answer no
truer: sqrt(x/(1 + x)^3) was answered for a positive x only, and
((1 - x) x (1 - k x))^(1/3) was a minute of search to be declined, where as
written it is five seconds. #1705's exclusion holds there again: what is left
with the odd power out must be one sum past a linear.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-symbol-in-its-exponent-comes-out-of-a-sum

# Conflicts:
#	BREAKING-CHANGES.md
x^(3/2 (n - 1))/(a x^(n - 1) + b x^n + c x^(n + 1))^(3/2) is real for a
negative x and any n: the phases of the two principal powers cancel to a
sign, -1 for n = 2.3, and an answer with 1 in front of the integral was the
integrand's negative there. The factor is constant on each interval whatever
the exponent, so it is written wherever the power is not whole.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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 5, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 9114959 into master Oct 5, 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