Skip to content

Take the limit under a condition that holds near the point as the expression's (#2652) - #2653

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
provided-limit-2652
Nov 29, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
provided-limit-2652

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

When a limit was taken of an expression under a condition, f provided c, the library never asked for the limit of f itself. ComputeLimitWithinApproach returns nothing for a node that is not continuous, and a condition is not one. The provided node's own descent read f term by term and never asked for its whole limit.

The antiderivative of ln(1 + 2x)/(1 + x)^2 carries the condition 2x + 1 != 0. Its limit at +oo is 2 ln(2), and without the condition it is answered in 0.3 s. With the condition it, and the integral over [0, +oo), were left unevaluated.

Where the condition holds near the point, on every side the limit approaches from, the limit is now the whole limit of f. That is a smaller question, since the condition is gone. Where the condition does not hold, nothing is claimed, as before.

2.10.0 / master this branch
integral(ln(1 + 2x)/(1 + x)^2, x, 0, +oo), simplified unevaluated 2 * ln(2), matches mpmath
integral(ln(1 + 3x)/(1 + x)^2, x, 0, +oo), simplified unevaluated 3/2 * ln(3), matches mpmath
limit(sin(x)/x provided not x = 0, x, 0) unevaluated 1
limit(1 provided x > 0, x, 0+) unevaluated 1
limit(1 provided x > 0, x, 0-) and two-sided unevaluated unevaluated

Checks:

  • Sweep. 580 integrands: definite ones checked against mpmath and indefinite ones checked by differentiating back. They cover exp, ln, radicals, rational-trigonometric and rational functions over infinite ranges. Results: 573 correct and 0 wrong. The 7 timeouts are the 1/(A + B sin x) class, which Take a limit over a constant as its dividend's limit over the constant (#2648) #2651 fixes separately.
  • List diff. 223 definite integrals against master, no changes.
  • New test. 7 cases.
  • Full UnitTests suite. 21860 passed, 0 failed, 13 skipped (net10.0).
  • Build. 0 errors on every target framework.

The change is in the limit layer (Solvers.Definition.cs, Limit.Classes.cs, and one helper made internal in Transformations.cs), so the chain's limit harnesses are the measurement to read. The hunk in Limit.Classes.cs is in Providedf, away from #2651's in Divf.

Closes #2652.

🤖 Generated with Claude Code

…ression's (#2652)

The limit of an expression under a condition, f provided c, was not
asked of f. The limit pipeline returns nothing for a node that is not
continuous, and a condition is not one. The provided node's own descent
read f term by term and never asked its whole limit. The antiderivative
of ln(1 + 2x)/(1 + x)^2 carries 2x + 1 != 0, so its limit at +oo was
left unevaluated where it is 2 ln(2), and the integral over [0, +oo)
was left unevaluated with it.

Where the condition holds near the point on every side the limit
approaches from, the limit is now the whole limit of f, which is a
smaller question. Where it does not, nothing is claimed, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.70%. Comparing base (ad57ae3) to head (871ae2d).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2653      +/-   ##
==========================================
- Coverage   86.71%   86.70%   -0.01%     
==========================================
  Files         346      346              
  Lines       75660    75661       +1     
  Branches    22118    22121       +3     
==========================================
- Hits        65608    65602       -6     
- Misses       5420     5428       +8     
+ Partials     4632     4631       -1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.20% <83.33%> (-0.01%) ⬇️
fsharp 32.79% <ø> (ø)
interactive 40.09% <ø> (ø)

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

Files with missing lines Coverage Δ
...ns/Continuous/Limits/Solvers/Solvers.Definition.cs 92.03% <100.00%> (-0.06%) ⬇️
...ath/Functions/Continuous/Limits/Transformations.cs 89.08% <ø> (+0.10%) ⬆️
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 78.06% <66.66%> (-0.48%) ⬇️

... and 6 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 cb48b8d into master Nov 29, 2026
37 of 38 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 29, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the provided-limit-2652 branch November 29, 2026 12:05
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.

A limit under a condition that holds near the point is not taken whole: integral(ln(1+2x)/(1+x)^2, x, 0, +oo) is left unevaluated

1 participant