Skip to content

A Gaussian below the bar is read as its negated exponent above it - #1641

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-gaussian-below-the-bar
Oct 1, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-gaussian-below-the-bar

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

e^(-x^2)/x^2 was integrated by the Gaussian's moments, and 1/(e^(x^2) x^2), the same function, was not: the rule for the moments took the exponential from above the bar only. By parts writes the factor beside erf(b x) in erf(b x)/(e^(b^2 x^2) x^2) the second way, and that integral was declined for want of it. A Gaussian below the bar is read as the exponential of its negated exponent now.

Measured

Input Was (2.5.0) Now
"1/(e^(x^2)*x^2)".Integrate("x") integral(1 / (e ^ x ^ 2 * x ^ 2), x) -1 / x * e ^ (-x ^ 2) + (-2) * pi ^ (1/2) / 2 * erf(x) + C
"erf(b*x)/(e^(b^2*x^2)*x^2)".Integrate("x") UnrecognizedFunctionParseException: there is no function erf an antiderivative in erf and Ei(-2 b^2 x^2)
  • Rubi, master at 2db42780 and this change on it, run side by side, 0 wrong everywhere:
    • Family 8: 367 → 371 of 420. The four are erf and erfc of b x over e^(b^2 x^2) x^2 and over e^(b^2 x^2) x^4.
    • Family 2: 544 of 650 on both.
    • The independent suites: 1756 of 1814 on both.
    • Families 1 and 3–7 at five a file: 799 of 897 on both.
  • Run alone, the four are 0 of 4 on master and 4 of 4 here. Each is answered in 0.2 to 0.9 s, where master declined it in 2.4 to 10.5 s.
  • The unit tests pass: 14,249, none failed (net10.0). On master with An exponential or a hyperbolic function over several linears is split into partial fractions #1640 the classes this touches pass (125), and the native AOT publish of the C++ wrapper builds with no trim or AOT warnings.
  • The performance gate passes on c6024927, which is this change on 2db42780. Allocation matches the baseline on all 19 gated benchmarks.

GaussianIntegralTest has two rows with the Gaussian below the bar, each differentiated back.

Part of #1501.

🤖 Generated with Claude Code

e^(-x^2)/x^2 was integrated by the Gaussian's moments, and 1/(e^(x^2) x^2), the same function, was
not: the moment rule took the exponential from above the bar only. By parts writes the factor
beside erf(b x) in erf(b x)/(e^(b^2 x^2) x^2) the second way, and that integral was declined for
want of it. A Gaussian below the bar is read as the exponential of its negated exponent now.

Measured on the Rubi corpus, master at 2db4278 and this change on it, run side by side: family 8
367 -> 371 of 420, erf and erfc of b x over e^(b^2 x^2) x^2 and over e^(b^2 x^2) x^4; family 2 544
of 650, the independent suites 1756 of 1814 and families 1 and 3 to 7 at five a file 799 of 897, on
both. 0 wrong everywhere. Run alone, the four are 0 of 4 on master and 4 of 4 here, each answered in
0.2 to 0.9 s where master declined it in 2.4 to 10.5 s. The unit tests pass, 14,249.

The performance gate passes on c6024927, which is this change on 2db4278: allocation is what the
baseline says on all 19 gated benchmarks.

GaussianIntegralTest has two rows with the Gaussian below the bar, each differentiated back.

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