Repository navigation
Read a grown derivatives' quotient's value at the point once expanded - #2391
Merged
Merged
Conversation
l'Hopital's rule declined a quotient that grew too much to differentiate again unless it had a value at the point. The product rule makes ln(sqrt(x) cos(x)) / (1 / x)'s quotient -x^(3/2) (x^(-1/2) cos(x) / 2 - sqrt(x) sin(x)) sec(x), which has none at 0 as written, since x^(-1/2) has none. So x ln(sqrt(x) cos(x)) and (sqrt(x) cos(x))^x at 0 from the right were left unevaluated, where x^(1/3) cos(x) in their place was answered. The value is now also read from the quotient expanded, which gathers the powers of x and is 0 there. Taking the grown quotient's limit with the rule suppressed answered the same rows but cost seconds a step: x^(tanh(x)^3) at 0 went from 2.5 s to 18 s, and one row from 1.7 s to over 30 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hange Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2391 +/- ##
==========================================
+ Coverage 86.78% 86.80% +0.01%
==========================================
Files 312 312
Lines 69233 69225 -8
Branches 20186 20186
==========================================
+ Hits 60086 60090 +4
+ Misses 4931 4918 -13
- Partials 4216 4217 +1
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.
l'Hôpital's rule stops when the quotient of the derivatives has grown too much to differentiate again. At that point it used the quotient's value at the point, or declined if there was none.
For
ln(sqrt(x) cos x) / (1/x), the product rule gives-x^(3/2) (x^(-1/2) cos x / 2 - sqrt(x) sin x) sec x. It has no value at 0 as written, becausex^(-1/2)has none there. Expanded, the powers of x combine into-x cos x sec x / 2 + x^2 sin x sec x, which is 0 at 0. The value is now also read from the expanded quotient.(sqrt(x) cos x)^x1x ln(sqrt(x) cos x)0ln(sqrt(x) cos x) / (1/x)0Before this change, the same limits with
x^(1/3),sqrt(x) cosh xorsqrt(x) e^xin place ofsqrt(x) cos xwere already answered. The two-sided limit of(sqrt(x) cos x)^xis unchanged.Alternative tried: taking the limit of the grown quotient with l'Hôpital suppressed. It answered the same limits but made others much slower:
x^(tanh(x)^3)at 0 went from 2.5 s to 18 s, and one row from 1.7 s to over 30 s. Expanding and substituting kept every timed row at master's speed.Recorded in BREAKING-CHANGES.md. Test
AGrownQuotientIsStillReadTest.The full check passed: unit, MCP, terminal, interactive and F# suites, AOT, and the ten harnesses. A limitcheck A/B against master changed no row.
🤖 Generated with Claude Code