Repository navigation
Leave a definite integral as written where a bound's limit is not decided - #2101
Merged
Rafael-SOWNet merged 2 commits intoOct 23, 2026
Conversation
…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
deleted the
a-definite-integral-with-an-undecided-bound-is-left-as-written
branch
October 24, 2026 20:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.integral(ln(x) * erf(x), x, 0, 1)NaNintegral(erf(x) * ln(x), x, 0, 1), value −0.2613…integral(ln(x) * Si(x), x, 0, 1)NaNintegral(Si(x) * ln(x), x, 0, 1), value −0.2466…integral(sin(x), x, 0, +oo)NaNNaN: the limit is decided, and does not existThe budget. Once the integral is left as written,
Simplifyevaluates it again for every spelling of the integrand it tries. At 0, one spelling ofln(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, becauseSimplifykeeps trying other spellings instead of stopping at aNaN. Each distinct antiderivative spends up to the budget:ln(x) erf(x)NaN)ln(x) Si(x)NaN)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