Skip to content

Read a grown derivatives' quotient's value at the point once expanded - #2391

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
feature/limit-of-a-vanishing-power-base
Nov 8, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
feature/limit-of-a-vanishing-power-base

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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, because x^(-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.

Limit at 0 from the right 2.6.0 master this PR
(sqrt(x) cos x)^x unevaluated unevaluated 1
x ln(sqrt(x) cos x) unevaluated unevaluated 0
ln(sqrt(x) cos x) / (1/x) unevaluated unevaluated 0

Before this change, the same limits with x^(1/3), sqrt(x) cosh x or sqrt(x) e^x in place of sqrt(x) cos x were already answered. The two-sided limit of (sqrt(x) cos x)^x is 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

Rafael-SOWNet and others added 2 commits November 8, 2026 14:40
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>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 8, 2026
@codecov

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.80%. Comparing base (6a14757) to head (6a90a67).

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
cpp 37.77% <ø> (-1.54%) ⬇️
csharp 87.34% <100.00%> (+0.01%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ath/Functions/Continuous/Limits/Transformations.cs 89.10% <100.00%> (+0.02%) ⬆️

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit 3c2951c into master Nov 8, 2026
35 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/limit-of-a-vanishing-power-base branch November 8, 2026 16:34
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant