Skip to content

lim x->-oo of ln(x) + ln(x+1) - ln(x^2+x) is 0; it is 2 pi i, and master answers it only by reusing a simplification across limit approaches #2022

Closed

Description

@Rafael-SOWNet

For real x < -1, ln(x) + ln(x+1) - ln(x^2 + x) is the constant 2 pi i: each of ln(x) and ln(x+1) carries i pi, and ln(x^2 + x) is real. 2.5.0 answers its limit at -oo with 0:

.Simplify() of 2.5.0 master f705d99 (before #2015) master f7f2a7a
limit(ln(x) + ln(x+1) - ln(x^2+x), x, -oo) 0 0 2 * ln(-1)
limit(ln(x) + ln(x) - ln(x^2), x, -oo) 0 0 2 * ln(-1)
limit(x*(ln(x) + ln(x+1) - ln(x^2+x)), x, -oo) 0 0 unevaluated

2*ln(x) - ln(x^2), which Simplify makes of the second row, gives 2 * ln(-1), which is right. ln(x) + ln(x+1) alone at -oo gives +oo and drops its 2 pi i. Simplify on its own leaves all of these unchanged, so the 0 comes from the limit machinery. I have not found which step; SolveAsDifferenceOfInfinities and MayGatherLogarithmsHere look sound.

Master is right only by accident. #2015 keeps nested Simplify results for the outermost call, keyed by the tree, the level and the settings, for "elementary" trees, Logf included. But a logarithm's simplification also reads LimitFunctional's current approach: MayGatherLogarithmsHere and MayTakeLogOfPowerHere fire only while one is being read. So a result worked out on one approach, or on none, can be handed back on another. Here that hides the wrong 0. In general it is unsound.

Bypassing the memo while an approach is read restores 2.5.0's 0 on all three. That fix is on the local branch keep-no-simplification-across-a-limit-approach (LimitFunctional.IsReadingAnApproach, one condition in Simplificator.Simplify). It should land together with the fix for the limit, not before it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Activity

  1. added this to the 2.6.0 milestone on Oct 21, 2026
  2. moved this from Todo to In Progress in AngouriMathon Oct 21, 2026
  3. moved this from In Progress to Done in AngouriMathon Oct 21, 2026
  4. added a commit that references this issue on Nov 4, 2026
    2e3078d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions