Skip to content

A power of x beside a symbolic block, and blocks in one power of x, are split off - #1700

Merged
Rafael-SOWNet merged 14 commits into
masterfrom
a-power-of-x-beside-a-symbolic-block
Oct 3, 2026
Merged

Rafael-SOWNet merged 14 commits into
masterfrom
a-power-of-x-beside-a-symbolic-block

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Part of #718.

N/(x^k B), where the block B has a symbol in it and a constant term that isn't zero, is split at the power of x. The first k terms of the power series of N/B at 0 are the part over x^k, and the rest is a polynomial over B exactly:

N/(x^k B) = P/x^k + R/B,    P = first k terms of N/B at 0,    R = (N - P B)/x^k

P/x^k integrates term by term, and R/B goes to the rules for a binomial and the rest, unchanged. The split over written factors took linear and quadratic blocks only, so 1/(x (x^3 + c)) was declined where 1/(x (x^3 + 2)) was answered:

2.5.0 and master this
1/(x (x^3 + c)) declined ln(x)/c - ln(c x^3 + c^2)/(3 c)
1/(x^4 (a + b x^3)) declined -1/(3 a x^3) - b ln(x)/a^2 + b ln(a^2 b x^3 + a^3)/(3 a^2)
1/(x (a + b x^5)) declined ln(x)/a - ln(a b x^5 + a^2)/(5 a)
1/(x^2 (x^3 + c)) declined a logarithm and an arctangent in c^(1/3), beside -1/(c x)

The constant term is divided by, which is the generic case, as everywhere in the integrator. Each part is integrated again, so the split applies only to the shape it is for: where x doesn't divide N as well, where a factor of B is past the second degree (linear and quadratic ones are the written-factor split's), and for the question asked or one substitution below it. Inside a search, a part integrated again is paid for every candidate the search tries.

And blocks that are each a polynomial in one power x^n, linear or quadratic in it, are split in u = x^n, for n >= 3, or n = 2 with two blocks or more. The split over written factors reads them there as linear or quadratic factors. It goes one residue of the numerator's powers modulo n at a time, so x^r stays outside the split, which is exact. 1/((a + b x^3)(c + d x^3)) and 1/((a + b x^4)(c + d x^4)) were declined. Beside a power of x, both splits apply in turn: 1/(x^8 (a + b x^3)(c + d x^3)) answers. One block quadratic in u becomes two at its roots, as a + b x^2 + c x^4 already did: 1/(a + b x^3 + c x^6) and (1 + x^4)/(1 + b x^4 + x^8). That split is the last rule tried. The roots are complex where b^2 < 4ac, and a rule after the split that branches on the sign of a root has no branch for a complex one, so whatever answers the block whole goes first. A block that x divides, b x^2 + c x^4, is left to the content: read as quadratic in x^2 its roots would include a zero not recognised as one.

And a quotient with x below a bar inside it is written over one bar first, where both sides are then polynomials, since every rule after it reads polynomials, and the power of x that cleared the bars is taken out of both sides again: the partial fractions read the two sides as coprime. 1/(a + b/x) was declined where x/(a x + b) was answered, and so was the numeric 1/(2 + 3/x^2)^3.

And a product of sums in x^n with a symbol for n, (a + b x^n)(c + d x^n)^3, is written out, as a power of one already was. Each term is a power of x, answered at once. Like the rule for a power, it runs last, so a product that a rule answers in its own terms is not written out; and only for the question asked, and only where each sum is of powers of x. A sum of exponentials is a sum too, and integration by parts on x^2 Shi(a + b x) sinh(a + b x) leaves a run of them.

On the 33 problems of Rubi's 1.1.3 that master leaves unsolved in the corpus's sample of 40 a file, 18 now answer, checked by differentiating back, and none is answered wrongly. One of the 18 takes seven seconds. Of the 133 that master leaves unsolved in the same sample of Rubi's 1.2, the trinomials, 30 now answer, none wrongly. And x^(3/2), x^(9/2) and the like over rational functions of x^2, Rubi's 1.1.2.4, come to blocks in t^4 under x = t^2: of the 40 problems of 1.1.2.4 in the sample, five more answer, four of them of that shape.

Tests: SymbolicFactorsPartialFractionsTest.APowerOfXBesideASymbolicBlock (eight rows), SymbolicBlocksInOnePowerOfX (nine), OneBlockWhoseRootsAreComplex (three, pinned where b^2 < 4ac), AQuotientWithXBelowABarInsideIt (six), AProductOfSumsInASymbolicPowerOfX (two) and WhatTheSplitsLeaveWhole (two, a numerator that x divides and sec(c + d x)^8/(a + i a tan(c + d x))^4, which run past twenty seconds where the splits take them), each differentiated back with its symbols pinned.

Measured on the Rubi corpus against master fb520e20, which has the same library as this branch's base 6d753000, with both builds side by side:

master this
family 0, independent suites (1814) 1758 1758
family 1, 40 a file (1381) 1118 1177
families 2 to 8, sampled (2586) 2365 2376

One answer is wrong on both builds, the same one, e^(2 acoth(a x)) sqrt(c - a c x)/x in 7.4.2, which #1682 has fixed on master since, and nothing else on either.

Eighty problems moved between the two runs, so I re-ran each alone on both builds. This branch answers 72 of them and master two, which this branch answers too. Seven that neither answers now run to the five-second budget, where master declines them in 0.3 to 12 seconds: 1.1.3.8 410 and 486, 1.2.2.4 324, 1.2.2.6 49 and 96, 1.2.4.2 128 and 1.3.1 168.

The allocation gate passes on 2607ebe8, the commit measured. Master 504a5570 is merged in since, with #1699's rule for a power of a binomial past the cube kept beside this one where both were added, and the suite passes on the merge, 14,467 tests. Together they answer the four 1.1.3.8 problems that each declined alone, (c + d x + e x^2)/(x^k (a + b x^3)^4) for k from 1 to 4: the split takes x^k off, and that rule takes what is left down the powers. Each differentiates back, in five to eight seconds under load.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 12 commits October 2, 2026 10:57
…plit off

N/(x^k B), where the block B has a symbol in it and a constant term that is not zero, is split at
the power of x: the first k terms of the power series of N/B at 0 are the part over x^k, and the
rest is a polynomial over B exactly, which the rules for a binomial and the rest read. The split
over written factors took linear and quadratic blocks only, so 1/(x (x^3 + c)) was declined where
1/(x (x^3 + 2)) was answered.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Blocks that are each a polynomial in one power x^n, n >= 3, linear or quadratic in it, with a symbol
among them, are split in u = x^n by the split over written factors, one residue of the numerator's
powers modulo n at a time, and each fraction back in x is over one block, which the rule for a
binomial reads. 1/((a + b x^3)(c + d x^3)) was declined: over the rationals it does not factor, and
a block of the third degree is nothing the split over written factors reads.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Every rule the partial fractions try reads the numerator and the denominator as polynomials, and
`a + b/x` is not one, so 1/(a + b/x) was declined where x/(a x + b) was answered, and so was the
numeric 1/(2 + 3/x^2)^3. Such a quotient is written over one bar first.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
(a + b x^n)(c + d x^n)^3 had no antiderivative, and written out it is eight powers of x, each
answered at once: no rule reads a power of x whose exponent is a symbol as a polynomial, and the
rule that writes out a power takes one power and not a product of them. A product whose factors
with x in them are sums, positive whole powers of sums and powers of x is written out now, as late
as that rule and for the same reason.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Writing 1/((a + c/x^2 + b/x) x (d + e x)^2) over one bar clears its bars with a power of x, and
leaves x^3/(x^2 Q L^2): the rules after it read the two sides as coprime, and answered that
wrongly. The greatest power of x dividing both is taken out of each, the denominator's factors kept
as written.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
a + b x^n + c x^(2n), n >= 3, with a symbol in it, is c (u - r_1)(u - r_2) in u = x^n, and the split
in u takes the two factors as it takes two blocks, each then a binomial in x: 1/(a + b x^3 + c x^6)
and (1 + x^4)/(1 + b x^4 + x^8) were declined, where a + b x^2 + c x^4 was answered that way already.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
The split over written factors reads a block of x^2 only while it is quadratic in x, so
1/(x^4 (d + e x^2)(a + c x^4)) was declined. The split in u = x^n takes n = 2 as well where there
are two blocks or more; one quadratic in x^2 alone stays the biquadratic rule's.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
… as one list

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
The roots of a + b u + c u^2 are complex where b^2 < 4ac, and every
fraction after the split is over a binomial x^n - r with one in it. A
rule after the split that branches on the sign of r has no branch for a
complex one: (d + e x^4)/(x^3 (a + b x^4 + c x^8)) came to x/(x^4 - r),
and the table's piecewise on the sign of r had no value at any point,
where the substitution v = x^2 answers the block whole.

The split of one block is now its own rule, after every other, so that
whatever answers the block whole answers first. The examples it was for
are still answered, at either sign of the discriminant.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Each of these splits integrates its parts again, so where it fires
on a shape it was not written for, the whole question is asked a
level down, and inside a search that is paid for every candidate.

- A power of x beside a block is split off only where the quotient is
  in lowest terms in x, a factor of the block is past the second
  degree, and the question is the one asked or one substitution
  below it.
- Only a quotient of polynomials is written over one bar.
- A block that x divides is left to the content, where its roots
  would include a zero not recognised as one.
- A product of sums is written out only for the question asked, and
  only where each sum is of powers of x.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…expression

A collection expression for a List is lowered through CollectionsMarshal,
which is in System.Runtime.InteropServices, an assembly the kernel does
not reference.

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 and others added 2 commits October 2, 2026 23:04
…not deconstruct

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-a-symbolic-block

# Conflicts:
#	Sources/AngouriMath/Functions/Continuous/Integration/IndefiniteIntegralSolver.cs
@Rafael-SOWNet
Rafael-SOWNet merged commit 3fba4e5 into master Oct 3, 2026
34 checks passed
Rafael-SOWNet added a commit that referenced this pull request Oct 3, 2026
…root (#1706)

* A power of a linear beside a symbolic block is split at the linear's root

1/((x - c)(a + b x^3)) was declined: the split over written factors
takes linear and quadratic blocks only, and the split beside a block at
a power of x (#1700) is at 0. N/(L^k B) for a linear L = g + h x splits
the same way at L's root r: N/B has a power series in s = x - r, its
first k terms are the part over s^k, and (N - P B)/s^k is a polynomial
over the block exactly. The coefficients at the root are read by
Taylor's formula and the block is left as it is written, for the rules
that read it. Writing 1/(x (a + b (c + d x)^3)) in c + d x makes this
shape, as Rubi's 1.3.1 does.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

* The breaking-changes entry names the split beside another linear

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

* A block that is a polynomial in a power of the linear is left to the substitution of the linear

1/((c + d x)^2 (a + b (c + d x)^3)^2) is a function of c + d x, which the
substitution of it reads. Split at the root of the linear, the rest would
go back over the block written in x, which the rules over x search for
20 s. The block is shifted and read before the numerator, so such a
question is declined before the numerator is shifted.

Part of #718

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>
@Rafael-SOWNet
Rafael-SOWNet deleted the a-power-of-x-beside-a-symbolic-block branch October 29, 2026 00:43
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