Skip to content

Leave a definite integral as written where a bound's limit is not decided - #2101

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-definite-integral-with-an-undecided-bound-is-left-as-written
Oct 23, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-definite-integral-with-an-undecided-bound-is-left-as-written

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Fixes #2081.

Where an antiderivative is undefined at a bound, the integral takes its limit from inside the range. When that limit could not be decided, the integral came out NaN, which says it does not exist. It is now left as written.

2.6.0 now
integral(ln(x) * erf(x), x, 0, 1) NaN integral(erf(x) * ln(x), x, 0, 1), value −0.2613…
integral(ln(x) * Si(x), x, 0, 1) NaN integral(Si(x) * ln(x), x, 0, 1), value −0.2466…
integral(sin(x), x, 0, +oo) NaN NaN: the limit is decided, and does not exist

The budget. Once the integral is left as written, Simplify evaluates it again for every spelling of the integrand it tries. At 0, one spelling of ln(x) Si(x)'s antiderivative sent the limit engine through more than 38,000 nested limits in forty seconds without deciding. So the limit at a bound is now asked within a budget of 2,000 limits (LimitFunctional.WithinABudget); past it, the limit is undecided. Each limit is remembered under the settings it was taken in. The most any decided limit at a bound took in the tests is 957.

What it costs. Leaving the integral as written is slower than 2.6.0's NaN, because Simplify keeps trying other spellings instead of stopping at a NaN. Each distinct antiderivative spends up to the budget:

each in a fresh process 2.6.0 now, on a quiet machine now, beside a corpus run
ln(x) erf(x) 2.4 s (NaN) 7 s 13 s
ln(x) Si(x) 0.2 s (NaN) 2.2 s 2.2 s

The test asserts termination with a wall of five minutes, which cannot fire unless the budget stops bounding the work. A wall of sixty seconds fired in the full suite on a loaded machine.

Corpus (the full fair Rubi corpus, against master at 9cec2d5b): 49,010 → 49,010 solved of 49,052, no row moved, 0 wrong. Allocation per stream 1.0000 / 1.0000 / 0.9999; times +8–10%, with builds running beside it, which allocation does not show. Indefinite integration does not reach the change.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 23, 2026 22:59
…ided

Where the antiderivative is undefined at a bound, its limit from inside the range is taken, and
where that limit could not be decided the integral was NaN, which says it does not exist. The
integral of ln(x) erf(x) over [0, 1] was NaN where it is -0.2613, and of ln(x) Si(x) where it is
-0.2466. It is left as written now.

Left as written, Simplify evaluates it again for each spelling of the integrand it tries, and one
spelling of ln(x) Si(x)'s antiderivative at 0 sent the limit engine through more than 38,000
nested limits in forty seconds without deciding. So the limit at a bound is asked within a budget
of 2,000 limits taken along the way, past which it is undecided, and each is remembered under the
settings it was taken in. The most a decided limit at a bound took in the tests is 957. The two
simplifications end in 2.2 and 7 s.

Fixes #2081.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
The limit budget bounds the work; the sixty-second wall measured the machine,
and fired in the full suite on a loaded one, where the erf integral takes about
nine seconds alone.

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 23, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit e1fe08c into master Oct 23, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 23, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-definite-integral-with-an-undecided-bound-is-left-as-written branch October 24, 2026 20:26
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.

A definite integral through a special function's limit is NaN where it has a value

1 participant