You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
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:
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.
Activity
Read a limit at -oo on the approach it is rewritten to, and simplify …