Skip to content

A quotient of polynomials in x and the functions of x in it is cancelled with those functions as indeterminates, and its denominator written in square-free factors the same way - #1319

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
functions-as-indeterminates
Sep 13, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
functions-as-indeterminates

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Bronstein's (x^2 + 2x ln(x) + ln(x)^2 + (1 + x) sqrt(x + ln(x)))/(x^3 + 2x^2 ln(x) + x ln(x)^2)
is 1/x + (1 + x)/(x (x + ln(x))^(3/2)), which is ln(x) - 2/sqrt(x + ln(x)),
and had no antiderivative: split, its four terms are not elementary apart
-- the first three are 1/x only together -- and as it stands nothing
reads a quotient of polynomials in a logarithm. With L for the logarithm
the three are (x + L)^2 over x (x + L)^2, and that is a cancellation
by the greatest common divisor over Q[x, L], which the library has.

So: the functions of x in a quotient that are not polynomials in it -- a
logarithm, an exponential, a trigonometric function, a root -- are taken
for indeterminates, the quotient is cancelled by the gcd as a polynomial
in x and those, and the denominator is written in its square-free
factors the same way (Yun's, from the same gcds), each sum written back
in the order the integrand already writes it, since the factor
ln(x) + x beside the root of x + ln(x) is not the substitution the root
is and the same sum is. Exact in the generic case, as everywhere in this
integrator: the cancelled factor is taken nonzero, and the identity
ln(x) = L is not used, a cancellation valid for every L being valid for
that one.

Two places use it. The expanding split gathers its terms by what is not
polynomial in them, and what is polynomial in a term is now what has no
root of the variable in it, so the three terms of Bronstein's gather and
the fourth stands alone; each group's quotient is cancelled and factored
before it is asked, and the fourth's denominator x (x + ln(x))^2 is then
the shape the substitution u = x + ln(x) reads. And a quotient that is
one such cancellation whole, with no radical to gather by --
(x^2 + 2x sin(x) + sin(x)^2)/(x + sin(x))^2 is 1 -- is a rule of its
own, before the split, which asks only where the writing changed
something: nothing cancelled and nothing factored hands back the quotient
as it was and not the same quotient respelled, which was asked again as
itself and searched to the depth limit before that was so.

Rubi sample (463 problems, 5 s budget), against the #1317 master this branch is cut from:

master at #1317     408/463, 0 wrong, 0 timeouts, ~98 s
with this           409/463, 0 wrong, 0 timeouts, 97 s

One more, nothing lost: Bronstein 21, in 3.2 s (three of which the general substitution spends declining the whole before the split gets it). Moses 136 goes from 0.8 s to 0.2 s and Charlwood 128, declined, from 1.3 s to 0.8 s; nothing else moved by more than noise. Independent of #1318, merged meanwhile.

The five test suites are green.

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…led with those functions as indeterminates, and its denominator written in square-free factors the same way

Bronstein's `(x^2 + 2x ln(x) + ln(x)^2 + (1 + x) sqrt(x + ln(x)))/(x^3 + 2x^2 ln(x) + x ln(x)^2)`
is `1/x + (1 + x)/(x (x + ln(x))^(3/2))`, which is `ln(x) - 2/sqrt(x + ln(x))`,
and had no antiderivative: split, its four terms are not elementary apart
-- the first three are `1/x` only together -- and as it stands nothing
reads a quotient of polynomials in a logarithm. With `L` for the logarithm
the three are `(x + L)^2` over `x (x + L)^2`, and that is a cancellation
by the greatest common divisor over `Q[x, L]`, which the library has.

So: the functions of `x` in a quotient that are not polynomials in it -- a
logarithm, an exponential, a trigonometric function, a root -- are taken
for indeterminates, the quotient is cancelled by the gcd as a polynomial
in `x` and those, and the denominator is written in its square-free
factors the same way (Yun's, from the same gcds), each sum written back
in the order the integrand already writes it, since the factor
`ln(x) + x` beside the root of `x + ln(x)` is not the substitution the root
is and the same sum is. Exact in the generic case, as everywhere in this
integrator: the cancelled factor is taken nonzero, and the identity
`ln(x) = L` is not used, a cancellation valid for every `L` being valid for
that one.

Two places use it. The expanding split gathers its terms by what is not
polynomial in them, and what is polynomial in a term is now what has no
root of the variable in it, so the three terms of Bronstein's gather and
the fourth stands alone; each group's quotient is cancelled and factored
before it is asked, and the fourth's denominator `x (x + ln(x))^2` is then
the shape the substitution `u = x + ln(x)` reads. And a quotient that is
one such cancellation whole, with no radical to gather by --
`(x^2 + 2x sin(x) + sin(x)^2)/(x + sin(x))^2` is `1` -- is a rule of its
own, before the split, which asks only where the writing changed
something: nothing cancelled and nothing factored hands back the quotient
as it was and not the same quotient respelled, which was asked again as
itself and searched to the depth limit before that was so.

Rubi sample: +1 (Bronstein 21), 0 wrong, 0 timeouts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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