Skip to content

Integrate a polynomial beside a function of a shifted linear in that linear - #2087

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-polynomial-beside-a-function-of-a-shifted-linear
Oct 23, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-polynomial-beside-a-function-of-a-shifted-linear

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Integrates a polynomial beside a function of one shifted linear a + b x that parts cannot reach, by writing it in u = a + b x. Part of #2075.

The shapes:

  • a power that is not whole of something holding a logarithm of the linear, x (a + b ln(c (d + e x)))^p;
  • an exponential of a function of it that is not linear, x^2 f^(c (a + b x)^3).

In u the polynomial is one in u, and each of its terms beside the function is a gamma function of #2083's rules. This is the substitution SolveAPolynomialBesideErrorFunctionsOfAShiftedLinear already makes for error functions. In u the offset is zero, so the rule declines there and cannot recurse on its own output.

Rubi in u
x (a + b ln(c (d + e x)))^p 3.3 (u - d) (a + b ln(c u))^p / e^2
x (a + b ln(c (d + e sqrt(x))))^p 3.4 after the root substitution, a cubic in u
x^2 f^(c (a + b x)^3) 2.3 ((u - a)/b)^2 f^(c u^3) / b

The function is found by its shape first, before any factor is read as a polynomial, which expands it. The first version read the other way round, and asked of every product the algebraic files are, it was 5 to 10% of the corpus's time with no allocation to show for it. Read this way, time per stream is 0.97 to 1.01 of master's.

Measured on Rubi's suite, read with the harness that maps GAMMA, against master 3dbae246, the whole corpus each side:

master this
solved 48,875 of 49,052 48,907
wrong 0 0
solved rows lost 0
rows to a timeout 0

The gains are 18 in 3.4, 9 in 2.3 and 5 in 3.3. No answer's allocation grew.

By value:

this quadrature
integral(x*(1/3 + 2*ln(3/2*(1 + 2*x)))^(5/2), x, 1, 2) 47.0187310513846589616701… 47.01873105138465896167011
integral((1/3 + 2*ln(3/2*(1 + 2*sqrt(x))))^(5/2), x, 1, 2) 24.8155926461197117937625… 24.81559264611971179376254
integral(x^2*2^((1 + x/2)^3), x, 0, 1) 2.2029698172036954849810… 2.202969817203695484981035

The suite passes (16,944) and so do the MCP tests (329). The new tests differentiate four shapes back, one of them with a constant in front, which the first version dropped.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…linear

A polynomial beside a function of one shifted linear a + b x that parts cannot
reach -- a power that is not whole of something holding a logarithm of it, or an
exponential of a function of it that is not linear -- is written in u = a + b x,
as the rule for error functions of a shifted linear writes its integrand. The
polynomial is one in u there, and each of its terms beside the function is a
gamma function: x (a + b ln(c (d + e x)))^p becomes u (a + b ln(c u))^p and the
offset's own term, and x^2 f^(c (a + b x)^3) becomes powers of u beside f^(c u^3).
In u the offset is zero, and the rule declines there.

The function is found by its shape before any factor is read as a polynomial,
which expands it: asked of every product the algebraic files are, the reading
the other way round was five per cent of the corpus's time.

Rubi's suite on the harness that reads GAMMA, against master 3dbae24:
48,875 -> 48,907 of 49,052, 0 wrong, no solved row lost, no row to a timeout, no
answer's allocation grown; time per stream 0.97 to 1.01 of master's. The gains
are 18 in 3.4, 9 in 2.3 and 5 in 3.3. Three definite integrals agree with
quadrature to 25 digits.

Part of #2075.

Co-Authored-By: Claude Opus 5.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

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant