Skip to content

The limit of ln(x) cos(x) - ln(x) at 0+ is not found, though ln(x) (cos(x) - 1) gives 0 #2690

In review

Description

@Rafael-SOWNet

On master (0b1b7d7), the limit at 0+ of ln(x) cos(x) - ln(x) stays unevaluated, while the same expression with ln(x) factored out has a limit:

limit at 0+ master
ln(x) * cos(x) - ln(x) limitright(ln(x) * cos(x) - ln(x), x, 0)
ln(x) * cos(x) + ln(1/x) unevaluated
ln(x) * (cos(x) - 1) 0
ln(x) * exp(x) - ln(x) 0
ln(x) * sin(x) - ln(x) * x 0

The limit is 0, because cos(x) - 1 is about -x^2/2, and x^2 ln(x) tends to 0.

This gap is what keeps integral(ln(x) * Si(x), x, 0, 1) and the ln(x) * erf(x) spelling of ImproperIntegralTest.ABoundWhoseLimitIsNotDecidedLeavesTheIntegralAsWritten unanswered. Their antiderivatives reduce to this form at the lower bound. Both integrals have closed forms. mpmath gives 1 + eulergamma - Si(1) - cos(1) - Ci(1) = -0.24657363423475800640 for the first. It also makes that test's Si row about 0.6 s slower since #2687: its search there runs 675 limits, against 101 before.

Found while fixing #2661 (#2687).

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions