Repository navigation
Hold an answer through a root taken real where a second root makes the integrand real - #2017
Merged
Rafael-SOWNet merged 1 commit intoOct 21, 2026
Conversation
…e integrand real Three places take a root as a nonnegative real u and attach `radicand >= 0` to the answer: the factoring in SolveByLinearRadicalSubstitution and the "as the root" and factored branches of SolveBySubstitution. Where a second root is imaginary on the same side, the integrand is real there as a product of two imaginary roots, and the answer said nothing. Timofeev 926 and 927, asec(x) beside sqrt(x^2 - 1), are real on 0 < x < 1; Rubi's sqrt(cot) (a + b tan)^(k/2) and its kin in 4.3.2.1 and 4.3.3.1 are real where tan < -a/b. ConditionedOnTheRadicand, where the answer holds an even root besides, asks PartialFractions.WhereTheDerivativeHoldsBeyondTheRadicand. That sorts 15 points per sign pattern by interval arithmetic on the integrand and the radicand, and only where one is real beyond the zero differentiates the answer, lazily and real points first. An answer that holds at every real point there, beside exactly one other half-odd root, carries the integrand's real domain -- `tan(c + d x) >= 0 or a + b tan(c + d x) <= 0`; one that also holds at every complex point carries no condition; anything else keeps the old one, and so does an integrand real nowhere beyond the zero. 40 answers on part of the line -> whole (26 of 4.3.3.1, 12 of 4.3.2.1, Timofeev 926, 927), each checked with mpmath on both sides; the condition grows 28-60 characters. Chain against master a567c8b (base a4e7656): pocket of 2,104 rows, exactly those 40 Partial -> Solved, 0 wrong; samples unchanged in verdicts. The check costs 24-111 MB on the rows it changes; Bondarenko 22 and 23, which the first version re-answered at 2.4x the allocation, are master's again, byte for byte, at 0.582 and 0.505 GB. Part of #233. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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.
Part of #233. Fixes answers that held on only part of the real line.
Three places take a root as a nonnegative real
uand attachradicand >= 0to the answer:SolveByLinearRadicalSubstitution;SolveBySubstitution;SolveBySubstitution.Where a second root is imaginary on the same side, the integrand is real there as a product of two imaginary roots, and the answer said nothing:
asec(x)besidesqrt(x^2 - 1), are real on0 < x < 1, where the arcsecant and the root are both imaginary.sqrt(cot) (a + b tan)^(k/2)and its kin in 4.3.2.1 and 4.3.3.1 are real wheretan < -a/b.The harness now counts such an answer as Partial: right wherever it has a value, and without one at points where the integrand is real.
The change.
ConditionedOnTheRadicandacts where the answer holds an even root besides. It asksPartialFractions.WhereTheDerivativeHoldsBeyondTheRadicand, which works in two stages:The outcome sets the condition:
provided tan(c + d x) >= 0 or a + b tan(c + d x) <= 0;Results:
Chain against master a567c8b (this branch's base was a4e7656, one commit later, which touches 3.x only), with the harness at its current revision on both arms:
Rebased onto f705d99, which changes how constants differentiate (#2014): 2,312 related tests pass.
The BREAKING-CHANGES.md entry has 2.5.0's column measured.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura