Skip to content

A power of x times a half-odd power of a logarithm is integrated onto the Gaussian's moments - #1518

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
half-odd-log-powers
Sep 27, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
half-odd-log-powers

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Part of #1501.

x^p F^n, where F is ln x or A + B ln(c x^r) and n is half an odd number, is now integrated onto the Gaussian's moments, which #1512 answers.

With t = sqrt(F) and F' = s/x, dx = 2 x t dt/s, and x^(p + 1) e^(-(p + 1) F/s) is constant. So the integral is that constant times 2/s times the integral of t^(2n + 1) e^((p + 1) t^2/s). That is an even moment of the Gaussian, so the table answers it. Beside 1/x it is elementary: F^(n + 1)/(s (n + 1)).

The constant is written x^(p + 1) e^(-(p + 1) F/s), as Rubi writes it, rather than with ln(c x^r) split into ln c + r ln x. That split holds only where c is positive. For ln x itself the constant is 1 wherever the logarithm is real, so it's left out.

integral master this PR
sqrt(ln(x)), 1/sqrt(ln(x)), ln(x)^(3/2) answered answered
x sqrt(ln(x)), x^2/sqrt(ln(x)), sqrt(ln(x))/x^2 unevaluated answered
sqrt(ln(x^2)), sqrt(ln(a x^n)), (a + b ln(c x^n))^(1/2) unevaluated answered
x^m/sqrt(ln(a x^n)), x^3 ln(a x^n)^(3/2), x^2/ln(a x^n)^(3/2) unevaluated answered
(f + g x)^2 sqrt(a + b ln(c (d + k x)^n)) unevaluated, after 21 s answered, in 20 ms

A polynomial beside the logarithm is summed a power at a time. The logarithm of a power of a linear, Rubi's 3.3, is the same question under u = d + e x. The first version had neither. The integrator then found the half-odd power integrable, took (f + g x) (a + b ln(c (d + e x)^n))^(3/2) by parts against that antiderivative, and gave up after up to 55 s. On Rubi's corpus, 18 problems went from a 50 ms decline to the 3 s budget, until the rule read those shapes itself.

Measured

Measured with the change on ca85d0c4, before the rebase onto #1514 to #1517. After the rebase, the logarithm, Gaussian, downcasting and definite-integral test classes pass (96).

  • Rubi's problems whose answer uses erf, erfc or erfi: 811 across families 0 to 7, at a 3 s budget. This PR solves 565, where The Gaussian, its even moments and the error functions are integrated #1512 alone solves 473, with 0 wrong and nothing lost. Both have 14 timeouts, and the total time goes from 609 s to 614 s. The 92 gained are 36 in 3.1.2, 50 in 3.3, 3 in 3.1.4 and 3 in 3.5, and every erf problem in those four sections is now solved: 36/36, 57/57, 3/3 and 7/7.
  • The textbook suites (family 0) are unchanged: 1723/1778, 0 wrong, 0 timeouts.
  • The unit suite passes on net10.0: 12896 passed, 14 skipped, none failed, of 12910.
  • The allocation gate passes on all 19 gated benchmarks, with no allocation moved.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits September 27, 2026 20:22
… the Gaussian's moments

x^p F^n, with F = ln x or A + B ln(c x^r) and 2n odd: under t = sqrt(F),
dx = 2 x t dt/s and x^(p + 1) e^(-(p + 1) F/s) is a constant, so the
integral is that constant times 2/s times the integral of
t^(2n + 1) e^((p + 1) t^2/s), an even moment of the Gaussian the table
answers; beside 1/x it is F^(n + 1)/(s (n + 1)). A polynomial beside it is
summed a power at a time, and the logarithm of a power of a linear is the
same question under u = d + e x, as Rubi's 3.3 reads it.

Part of #1501.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
netstandard2.0 has no KeyValuePair.Deconstruct, so the library did not build
for it; the local builds were net10.0 only.

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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant