Skip to content

Read a sum as the derivative of a lower power of a linear beside a function - #2106

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-sum-that-is-the-derivative-of-a-lower-power-beside-a-function
Oct 24, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-sum-that-is-the-derivative-of-a-lower-power-beside-a-function

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #2075.

psi_1(a + b x)/x^2 - b psi_2(a + b x)/x (Rubi 8.6:281) is (-psi_1(a + b x)/x)', and neither of its terms is elementary, so splitting the sum declined it. Parts against the powers of x went the wrong way for it: that route integrates the function and differentiates the power, which raises a negative power rather than lowering it.

This adds parts the other way, for a term c L^(-k) F with k >= 2, one linear L, and a function F that has x only inside transcendental functions. The power is integrated, Q = -c/((k - 1) L' L^(k - 1)), and F is differentiated. Where what that leaves, -Q F', cancels against the other terms, the sum is (Q F)'.

Only some of the terms may be such steps. In psi_1(x)/(a + b x)^3 - psi_2(x)/(2 b (a + b x)^2) the second term has a power of −2 as well, and it is what the first term leaves. So each set of steps is tried, smallest first, and rejected at a point by adding precomputed values before anything is expanded. Nothing is asked: a remainder that does not cancel declines.

integrand now
polygamma(1, a + b*x)/x^2 - b*polygamma(2, a + b*x)/x (8.6:281) -polygamma(1, a + b * x) / x
polygamma(n, a + b*x)/x^2 - b*polygamma(1 + n, a + b*x)/x (8.6:282) -polygamma(n, a + b * x) / x
polygamma(1, x)/x^2 + polygamma(2, x)/x left as written: not a derivative

What the route does not take. A function with a sign, a modulus, a piecewise or a condition in it is not a step, because (Q F)' is Q' F + Q F' only where F is differentiable. Where the point gives no value, only a remainder of complexity at most 120 is expanded and simplified. The first chain lost two rows to timeouts, 5.5.1:83 and 5.6.1:71, (a + b asec(c x))/(d + e x)^3. Parts there left sgn(c x) ln(c x + sqrt(c^2 x^2 - 1)), which had no value at the point, so it went to Expand and Simplify at eight seconds a time. Both rows are back to the base's 4.8 s and 1.4 s.

8.6:282 has a symbolic order, which the harness cannot evaluate at its pinned points, so the corpus counts only 281.

Corpus (the full fair Rubi corpus, rebased onto 191510f3, against master's composite at 9cec2d5b): 49,010 → 49,047, none lost, 0 wrong, 0 timeouts. 36 of the 37 gains are #2098's, #2100's, #2103's and #2105's, so this run is also the composite of master with this change, and it lands exactly on their sum plus 8.6:281; 8.6:282 is unverified. Allocation per stream 1.0011 / 1.0022 / 0.9823. The one row flagged, 8.4:174, allocates the same 0.85 GB alone with and without the change. The full suite passes.

Tests: ASumThatIsTheDerivativeOfALowerPowerBesideAFunctionTest (6).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 24, 2026 01:28
…nction

psi_1(a + b x)/x^2 - b psi_2(a + b x)/x is (-psi_1(a + b x)/x)', and neither
of its terms is elementary, so splitting the sum declined it, and parts against
the powers of x went the other way -- it integrates the function and
differentiates the power, which raises a negative power rather than lowering it.

Parts the other way in a term c L^(-k) F, k >= 2, for one linear L and a
function F with x only inside transcendental functions: the power integrated,
Q = -c/((k - 1) L' L^(k - 1)), and F differentiated. Where what that leaves,
-Q F', cancels against the other terms, the sum is (Q F)'. Only some of the
terms may be such steps -- in psi_1(x)/(a + b x)^3 - psi_2(x)/(2 b (a + b x)^2)
the second has a power of -2 as well and is what the first leaves -- so each
set of them is tried, smallest first, rejected at a point by adding numbers
before anything is expanded. Nothing is asked: a remainder that does not cancel
declines.

Part of #2075.

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

The route timed out two arcsecant and arccosecant integrals the chain had
solved, (a + b asec(c x))/(d + e x)^3 among them: parts leaves
sgn(c x) ln(c x + sqrt(c^2 x^2 - 1)) over a power of the linear, a function
with no value at the sampled point, so the remainder went to Expand and
Simplify, eight seconds a time. A function with a sign, a modulus, a piecewise
or a condition in it is not differentiable across its jump, and (Q F)' is
Q' F + Q F' only where it is; such a term is no longer a step. And where the
point gives no value, only a remainder of complexity at most 120 is expanded
and simplified, which the symbolic order of polygamma(n, a + b x) needs.

Part of #2075.

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.7.0 milestone Oct 24, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 218acb6 into master Oct 24, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 24, 2026
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