Repository navigation
Read a vanishing factor by its order in l'Hôpital's quotient at a point - #2406
Merged
Merged
Conversation
At a finite point the rule reads the quotient it gets term by term, as a value or a pole, but a factor that was a sum or vanished there stopped the reading. ln(cos(x) * sqrt(x)) / (1 / (e^(2x) - 1)) steps to a quotient with x^(-1/2) * cos(x) / 2 - sqrt(x) * sin(x) and (e^(2x) - 1)^2 in it, of orders -1/2 and 2, and was left unevaluated. Such a factor is now read as its leading term: a sum by its terms of the lowest order, a function that vanishes by its first derivative that does not. The reading is also asked before another step, not only once the step has grown: tanh(x) * ln(cos(x) * sqrt(x)) at 0 from the right reached the rule with e^(2x) + 1 taken out, so the step did not count as grown, and the descent through the quotient ran out of time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2406 +/- ##
==========================================
- Coverage 86.81% 86.78% -0.03%
==========================================
Files 312 312
Lines 69345 69387 +42
Branches 20238 20254 +16
==========================================
+ Hits 60199 60220 +21
- Misses 4920 4939 +19
- Partials 4226 4228 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
At a finite point, when l'Hôpital's rule gets a quotient back, it can read that quotient term by term as a value or a pole instead of taking another step. The reading stopped at any factor that was a sum or that vanished at the point.
ln(cos(x) * sqrt(x)) / (1 / (e^(2x) - 1))at 0 from the right steps toand was left unevaluated. That quotient has a sum of order -1/2 in it and
(e^(2x) - 1)^2, of order 2, so its order is 1 and it tends to 0. Such a factor is now read by its leading term:The reading goes through derivatives only where the factor is smooth at the point, so not through an abs, and a step in the quotient stops it.
The reading is also tried before another step, not only once the step has grown.
tanh(x) * ln(cos(x) * sqrt(x))reaches the rule withe^(2x) + 1taken out. So the step did not count as grown, and the descent through the quotient ran out of time. The fix is inItsValueOrPoleAtandApplylHopitalRuleImplinTransformations.cs.Answered, where master declines:
(cos(x) * sqrt(x)) ^ arctan(tanh(x)), righttanh(x) * ln(cos(x) * sqrt(x)), rightsinh(x) * ln(cos(x) * sqrt(x)), righttanh(erf(x)) ^ x, each sidearcsin(erf(x)) ^ x, each side(x^3 - arcsin(x)) ^ x, each sidearctan(sinh(x)) ^ x^(2 pi), right(arcsin(1) ^ x^3) ^ ln(arcsin(x)), each sidelog(arcsin(x), cos(x) / x), rightlog(arctan(tanh(x)), x), right and two-sidedlog(tanh(tanh(x)), arcsin(sinh(x))), each side and two-sidedlog(2 pi, log(arctan(x), tanh(x))), right2.6.0 answers none of these, so no answer changes against it and there is no BREAKING-CHANGES entry.
Faster, same answer:
1/x^2 - 1/sin(x)^2at 0 goes from 0.7 s to 0.2 s.Still unevaluated here and on master:
(x - sin(x)) * ln(x) / x^3at 0 from the right(e^x - 1 - x) * ln(cos(x) * sqrt(x)) / x^2at 0 from the rightThe calculus tests pass, and so do the full suite (19252), the MCP, terminal, interactive and F# suites, the AOT build and every harness. limitcheck against master over all seeds moves only the rows above: one row it timed out on, and twenty that were unevaluated. None of them disagrees with the values.
New test:
AVanishingFactorIsReadByItsOrderTest.🤖 Generated with Claude Code