Repository navigation
An answer that took an even root real without reading its sign says where it holds - #1594
Merged
Merged
Conversation
…here it holds The substitution for an even root, u = t^(1/q), conditions its answer on the radicand only where the answer below read a sign or a modulus of u. The rules below can take u real without either: SolveByCombiningRadicals writes sqrt(1 + 1/u^2) sqrt(1 - u^4) as sqrt(u^4 - u^8 + u^2 - u^6)/u^2, which reads sqrt(u^4) as u^2, the other root wherever u is imaginary. Where the radicand is negative u is imaginary, and the integrand can still be real there beside a second imaginary root: sqrt(cos(x))/sqrt(a + a sec(x)) under t = cos(x) and u = sqrt(t) came back negated wherever the cosine is negative. Where the answer below read no sign and the integrand holds a second even root, the answer is now differentiated and compared with the integrand at the default sampled points where the integrand is real; where it differs, it carries provided t >= 0, as the answers that read a sign already do. Measured with work/intbench against dd72825, 3 s a problem: a seeded twentieth of the problems holding half-odd powers of two different bases, the only ones the check reaches, 273 statable: no verdict moves, same time. Closes #1581. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #1581: an answer through an even root that took the root real without reading its sign is checked where the integrand is real, and says where it holds when it is not the antiderivative there.
SolveBySubstitutionconditions its answer on the radicand after an even rootu = t^(1/q), but only when the answer below heldsgn(u)or|u|. The rules below can takeureal without either.SolveByCombiningRadicalswritessqrt(1 + 1/u^2) sqrt(1 - u^4)assqrt(u^4 - u^8 + u^2 - u^6)/u^2, which is right for a realu, wheresqrt(u^4) = u^2, and negated for an imaginary one. Where the radicand is negativeuis imaginary, and the integrand can still be real there beside a second imaginary root.sqrt(cos(x))/sqrt(a + a sec(x))undert = cos(x)andu = sqrt(t)came back negated wherever the cosine is negative, and so did six of its kin in Rubi's 4.5.1.2 and 4.5.3.1.The check. Where the answer below read no sign and the integrand holds a second even root, which is the only way it can be real where the radicand is negative, the answer is differentiated with the symbols pinned and compared with the integrand at the default sampled points where the integrand is real (
DiffersWhereReal, #1572's). Where it differs, it carriesprovided t >= 0, as the answers that read a sign already do. Where it does not, the answer is as it was. Conditioning every answer through an even root, which the issue tested, would also condition the answers that hold on both sides.sqrt(x)/(sqrt(1/x + 1)*sqrt(1 - x^2))integral(...)(-1, 0)provided x >= 0sqrt(cos(x))/sqrt(1 + sec(x))integral(...)provided cos(x) >= 0LinearRadicalSubstitutionIntegralTest.AnEvenRootTakenRealWithoutASignSaysWhereItHoldsdifferentiates both back inside the condition and checks that the answer claims nothing outside it, where the integrand is real.Measured with
work/intbenchagainst master atdd728251, the commit this is cut from, 3 s a problem:dd728251: 793 → 804 and 1752 → 1753. Re-run on each branch alone, none of the twelve moves is this branch's, and none is a loss.The unit tests pass on a build with this branch and two others of mine merged (net10.0, 13,685), and every target builds.
🤖 Generated with Claude Code