Repository navigation
acsch(c x) and asech(c x) are integrated with a symbolic c, and |c| differentiates to 0 in x - #1451
Merged
Merged
Conversation
…ifferentiates to 0 in x x acsch(2 x) was answered and x acsch(c x) declined, for four reasons: (c x)^2 was read as a power of something that is not a polynomial where (2 x)^2 had been folded -- a whole power of a product with a symbolic constant beside the variable is written as the product of the powers, as a rule of its own; the root of (1 + c^2 x^2)/(c^2 x^2) was not written apart because c^2 is not a number -- a parameter's even power is taken for positive, the answer says so with provided c^2 > 0, and (c^2)^(-1/2) is written 1/|c|; the step by parts differentiated |c| to derivative(|c|, x) -- the modulus, the sign, the floor and their kin, and any node with no rule of its own, differentiate to 0 where they do not mention the variable; and q^(-1/2) above and sqrt(q) below were two atoms to the cancellation -- a negative fractional power goes below the bar where the same radicand also stands under a positive one. SolveAsPolynomialTerm gathers constants from any position among the factors once the two-operand reading has declined. Rubi's family 7: 162 -> 187 of 270, 0 wrong; the 1774 unchanged at 1706, 0 wrong, 0 timeout. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Sep 21, 2026
…onstant in the derivative (#1455) Two findings of the workspace harnesses against 04a5dd4, both from work merged today: - crashcheck: `"x subset 2".ToEntity().Solve("x")` threw InvalidCastException. The solver answers `{ x : x subset 2 }`; the predicate is NaN, since 2 is not a set, and a NaN predicate made the whole set-builder NaN, which Solve then cast to a set. A predicate that is NaN holds nowhere, so the set-builder is the empty set -- which is what the solver already answered for `1/0 = x`, and what `{ x : 1/0 = x }` now evaluates to as well (was NaN in 2.5.0; recorded). - docsamples: `"{ 1, 2 } + sin(x)".Differentiate("x")` printed `cos(x)` where the wiki's Differentiation page says `{ cos(x) }`. #1451 made the base derivative of a node that does not mention the variable zero; a set is not a constant in the variable whatever it mentions, so a set keeps the derivative node, which reaches the elements. Part of #1409. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Opus 5 (1M context) <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.
Rubi's 7.5.1 and 7.6.1 —
u (a + b asech(c x))^nandu (a + b acsch(c x))^n— stood at 2/15 and 1/15, and the reason was one symptom with four causes:x acsch(2 x)was answered andx acsch(c x)declined (a numeric coefficient hiding a symbolic defect, again). The parser spellsacsch(c x)asln(1/(c x) + sqrt(1/(c x)^2 + 1)), and:(c x)^2was read as a power of something that is not a polynomial, where(2 x)^2had been folded to4 x^2.SolveByDistributingWholePowersOfProductswrites a whole power of a product with a symbolic constant beside the variable as the product of the powers and asks the question again. Symbolic only: for a numeric constant the rules fold it already, and rewriting for it re-asked every sub-integrand with a(2 u)^3in it — Welz's 67 went from 4 s to 34 s in the first version.(1 + c^2 x^2)/(c^2 x^2)was not written apart becausec^2is not a number.SolveByWritingAPowerOfAQuotientApartnow takes a parameter's even power for positive (IsPositiveForARealParameter) and the answer says so:provided c^2 > 0, which holds exactly for a real non-zeroc.(c^2)^(-1/2)is written1/|c|, one atom wherever it stands.|c|toderivative(|c|, x), since the modulus rule asks whether its argument is real before it asks whether the argument mentions the variable — and every rule downstream then read a function ofx. The modulus, the sign, the floor, the ceiling, the rounding, a limit, a sum, a product, an applied function and any node with no rule of its own differentiate to0where they do not mention the variable, with no condition; a node with a rule of its own keeps it (d/dy piecewise(x provided a, 1/x)still says where1/xexists).floor(c) + xno longer carriesprovided not c in ZZ. A first version made every constant0and broke that piecewise pin andd/dx 21^NaN, which isNaN.q^(-1/2)above andsqrt(q)below were two indeterminates to the cancellation, so the remainder by parts was never read as the rational function ofxand one root that it is. A negative fractional power goes below the bar before the cancellation — only where the same radicand also stands under a positive one, since moving every reciprocal root multiplied the other quotients through and fed a search (x^5 atanh(x sqrt(p)/sqrt(d + p x^2))went from a decline in 4 s to none).And
SolveAsPolynomialTermgathers the constant factors from every position among the factors once the two-operand reading has declined:x^2 (a + b L)splits intoa x^2andx^2 * b * L, whosebsat inside the left product and was integrated around (five minutes where the row withouta + btook one second). Gathering first sent1/((a + b x)^2 (c + d x)^(3/2))down another path and its answer grew from 700 characters to 24,000, whichSymbolicFactorsPartialFractionsTestcaught.The rows that moved from unevaluated to timeout are acsch rows that now solve in 5–30 s, over the harness's 5 s budget (
x^2 (a + b acsch(c x))is 4.7 s,(a + b acsch(c x))/x^326 s);x^5 atanh(x sqrt(p)/sqrt(d + p x^2))is the one row whose decline became a search — its remainder, once read, isx^6/sqrt(d + p x^2)up to a constant, which is the cost of the capability rather than of the step.InverseHyperbolicSecantIntegralTest(differentiates back at five points withc = 3/2, and pins thec^2 > 0condition), eleven derivative rows inModulusPhaseTest;BREAKING-CHANGES.md. Full suite 12358 passed; the allocation gate passes on all 19 gated benchmarks.Part of #718.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura