Skip to content

A square of a special function of a shifted argument is asked term by term - #1643

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-shifted-square-is-asked-term-by-term
Oct 1, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-shifted-square-is-asked-term-by-term

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

#1639 asked the remainder of a special function's square term by term only for an argument b x. For a + b x, the remainder divided by the linear, and its terms were the exponentials a hyperbolic function is written as, each a harder question than the whole. With the constant of integration matched to the linear (#1642), the linear cancels and the terms are the case without the offset. So the asking is now offered for any linear argument, with one exception.

The exception is an error function beside anything but itself. Its derivative is a Gaussian of the shifted argument rather than a quotient by it, so a polynomial beside it stays in every term. Asking them took the decline of (c + d x) erf(a + b x)^2 from six seconds to twenty-four, and answered nothing.

Measured

Input Was (2.5.0) Now
"Shi(a+b*x)^2".Integrate("x") Shi * (a + b * x) ^ 3 / 3 / b + C, with Shi a variable an antiderivative in Shi(a + b x), Ei(2 (a + b x)) and Ei(-2 (a + b x))
"x^2*Ei(a+b*x)^2".Integrate("x") a ^ 2 * Ei * x ^ 3 / 3 + a * b * 2 * Ei * x ^ 4 / 4 + b ^ 2 * Ei * x ^ 5 / 5 + C, with Ei a variable an antiderivative in Ei(a + b x) and Ei(2 (a + b x))
"erf(a+b*x)^2".Integrate("x") UnrecognizedFunctionParseException: there is no function erf an antiderivative in erf
  • Rubi, master at 16203aa6 and this change on it, run side by side, 0 wrong everywhere:
    • Family 8: 380 → 394 of 420, 0 timeout. The fourteen:
      • erf, erfc and erfi of a + b x, squared;
      • Si and Ci of a + b x squared, beside x and beside x^2;
      • Ei, Shi and Chi of a + b x squared, beside x^2;
      • Shi(a + b x)^2 and Si(a + b x)^2;
      • x^2 Ci(a + b x) cos(a + b x) and x^2 cos(a + b x) Si(a + b x).
    • Family 2: 544 of 650 on both.
    • The independent suites: 1756 of 1814 on both.
    • Families 1 and 3–7 at five a file: 800 of 897 on both.
  • Run alone, the fourteen are 0 of 14 on master and 14 of 14 here.
  • With the error functions not excepted, measured the same way, family 8 was the same 394 with six more timeouts: the error functions of a + b x squared beside c + d x or its square. Families 0–7 moved nowhere.
  • The unit tests pass: 14,265, none failed (net10.0). The native AOT publish of the C++ wrapper builds with no trim or AOT warnings.
  • The performance gate passes on ec42a120. Allocation matches the baseline on all 19 gated benchmarks.

SpecialFunctionsByPartsTest has four more rows with a shifted argument, each differentiated back with its parameters pinned.

Part of #1501.

🤖 Generated with Claude Code

… term

#1639 asked the remainder of a special function's square term by term only for an argument b x.
For a + b x, the remainder divided by the linear, and its terms were the exponentials a hyperbolic
function is written as, each a harder question than the whole. With the constant of integration
matched to the linear (#1642), the linear cancels and the terms are the case without the offset,
so the asking is offered for any linear argument now. The exception is an error function beside
anything but itself. Its derivative is a Gaussian of the shifted argument rather than a quotient by
it, so a polynomial beside it stays in every term: asking them took the decline of
(c + d x) erf(a + b x)^2 from six seconds to twenty-four, and answered nothing.

Measured on the Rubi corpus, master at 16203aa and this change on it, run side by side: family 8
380 -> 394 of 420, 0 timeout (erf, erfc and erfi of a + b x squared; Si and Ci of a + b x squared
beside x and x^2; Ei, Shi and Chi of a + b x squared beside x^2; Shi(a + b x)^2 and Si(a + b x)^2;
x^2 Ci(a + b x) cos(a + b x) and x^2 cos(a + b x) Si(a + b x)); family 2 544 of 650, the independent
suites 1756 of 1814 and families 1 and 3 to 7 at five a file 800 of 897, on both. 0 wrong
everywhere. Run alone, the fourteen are 0 of 14 on master and 14 of 14 here. Measured the same way
with the error functions not excepted, family 8 was the same 394 with six timeouts more, and
families 0 to 7 moved nowhere. The unit tests pass, 14,265, and the performance gate passes on
ec42a120: allocation is what the baseline says on all 19 gated benchmarks.

SpecialFunctionsByPartsTest has four more rows with a shifted argument, each differentiated back
with its parameters pinned.

Part of #1501.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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