Repository navigation
A conditional expression is differentiated where its condition holds - #1685
Merged
Rafael-SOWNet merged 1 commit intoOct 2, 2026
Merged
Rafael-SOWNet merged 1 commit into
Rafael-SOWNet merged 1 commit into
Conversation
`F provided P` is differentiated with P known to hold, and so is each case of a piecewise, since the derivative is claimed only there. A power whose base what is known keeps positive is read as real, so under a strict bound such as `x > 0` the sign, the modulus, max and min of an expression in a root of x differentiate as on the real line: sgn(x^(1/3) + 2) provided x > 0 is 0 there, where it was left as written. Without the bound nothing changes, since for x < 0 the roots are complex. Part of #718. 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-conditional-answer-is-differentiated-under-its-condition
branch
October 29, 2026 00:43
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 #718.
F provided Pis differentiated withPknown to hold, and so is each case of a piecewise. The derivative is claimed only there anyway. A power whose base the known condition keeps positive is read as real. So under a strict bound such asx > 0, the sign, the modulus,maxandminof an expression in a root ofxdifferentiate as on the real line:sgn(x^(1/3) + 2) provided x > 0derivative(sgn(x ^ (1/3) + 2), x) provided x > 00 provided x > 0 and not x ^ (1/3) + 2 = 0abs(sqrt(x) - 1) provided x > 0derivative(abs(sqrt(x) - 1), x) provided x > 0sgn(sqrt(x) - 1) * 1/2 * x ^ (-1/2) provided ...:1/4at 4,-1at 1/4Without the bound nothing changes, since for
x < 0the roots are complex. Only a strict bound is read: underx >= 0there is no interval of positivexaround 0.This is what lets an answer of the form
sgn(x^(1/3) + a/b) F(x) provided x > 0be checked by differentiating it back. The next PR integrates such squares.Tests:
DerivativeGapsTest.UnderItsConditionARootIsReal(six rows, a piecewise andmaxamong them) andWithoutAStrictConditionARootIsNotReadAsReal(three).Measured on the Rubi corpus against master
fb520e20, with both builds side by side. Both arms run a corpus runner that differentiates an answer with its condition and strips it after; on master that is the same as stripping first:Two problems moved, one in family 3 and one in family 6, each past the budget on one build only. Re-run alone, both are past the budget on both builds, so the corpus does not change. That is expected of a change to differentiation: the integrals with such conditions in their answers are the next PR's.
The one wrong answer in family 7 is the same on both builds: 7.4.2's
e^(2 acoth(a x)) sqrt(c - a c x)/x, which #1682 fixed on master after this branch's base.The suite passes, 14,333 tests on a fresh build, and so does the allocation gate.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura