Skip to content

A term with a power of x is integrated by parts with the rest of the sum in its remainder - #1860

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
a-term-integrated-by-parts-takes-the-rest-of-the-sum
Oct 12, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
a-term-integrated-by-parts-takes-the-rest-of-the-sum

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sqrt(csc(x)) (x cos(x) - 4 sec(x) tan(x)), Rubi's 4.7.7 #1129, is (2 x sqrt(sin(x)) - 4 sin(x)^(3/2)/cos(x))', and neither of its terms is elementary alone. Where a sum's terms are not integrated one by one, at the question asked, a term x^k f is integrated by parts against x^k. The leftover, -k x^(k-1) F, is then asked together with the other terms. If that leftover is zero, the parts are the answer, as for (x^2 e^sin(x))'. When the leftover is a sum of c sin^a cos^b over one argument, the least powers are taken out. It closes as K sin^(a+1) cos^(b+1) when it is one.

Each limit comes from a measurement. On the first corpus run, the suite hung on (c + d x) erfc(a + b x)^2. (x^2 + 3)^2/(x + sqrt(x^2 + 3)) went from a 0.5 s decline to past two minutes, and (a + b atanh(c x^2))^2/x^5 doubled to 37 s:

  • the rule does not fire inside its own questions;
  • f must have x only inside transcendental functions;
  • a term whose F keeps a polynomial in x goes into the remainder untouched, since asking that remainder again would not get any simpler.

Measured on a4993e6 (master) and on 2.5.0:

Integrand 2.5.0 master a4993e6 this branch
sqrt(csc(x))*(x*cos(x) - 4*sec(x)*tan(x)) declined declined 72 characters
x*cos(x)/sqrt(sin(x)) - 4*sqrt(sin(x))/cos(x)^2 declined declined 61
x*sin(x)/sqrt(cos(x)) + 4*sqrt(cos(x))/sin(x)^2 declined declined 62
sqrt(csc(2*x + 1))*(x*cos(2*x + 1) - 2*sec(2*x + 1)*tan(2*x + 1)) declined declined 94
x*cos(x)*e^sin(x) + e^sin(x) declined declined x * e ^ sin(x)
x^2*cos(x)*e^sin(x) + 2*x*e^sin(x) declined declined x ^ 2 * e ^ sin(x)
(c + d*x)*erfc(a + b*x)^2 erfc read as a symbol declined, 13 s 1,196 characters, 7 s; differentiates back in SpecialFunctionsByPartsTest

Corpus chain against master a4993e6:

  • 4.7.7 pocket plus families 0–8: one move, 1129 gained; 0 wrong answers.
  • Allocation gate: passed.
  • Suite: 15,271 passed.

The every-target build succeeds with 0 warnings.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 12, 2026 12:04
A sum whose terms are not elementary apart is integrated by parts against the
power of x in each term that has one, and what parts leaves is asked together
with the other terms, read as powers of the sine and the cosine with the least
powers taken out, or closed as the derivative of one such product. Rubi's
4.7.7 sqrt(csc(x)) (x cos(x) - 4 sec(x) tan(x)).

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

Asked again inside its own questions, the rule hung (c + d x) erfc(a + b x)^2;
beside an algebraic or rational cofactor it turned half-second declines into
minutes. Only cofactors with x inside transcendental functions alone, and only
where the antiderivative leaves no polynomial in x beside it.

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

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 12, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 99fbaa7 into master Oct 12, 2026
34 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the a-term-integrated-by-parts-takes-the-rest-of-the-sum branch October 12, 2026 17:36
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