Menu

#3275 integrate(log(1-x^2)/x, x) looks invalid

None
not-a-bug
nobody
5
2024-10-27
2017-01-17
No

integrate(log(1-x^2)/x, x); used to give no terms with log(x) and log(-x), but now, while formally correct, numerically this makes no sense:

(%i4) integrate(log(1-x^2)/x, x);
(%o4) log(-x)*log(x+1)+li[2](x+1)+log(1-x)*log(x)+li[2](1-x)

Edited by David Scherfgen: Fixed formatting.

Discussion

  • David Scherfgen

    David Scherfgen - 2017-01-20

    I think the answer should be -li[2](x^2)/2.

     
  • Robert Dodier

    Robert Dodier - 2024-10-27

    For the record, I get the same result as %o4 above with a current (post-5.47) build.

    It appears to me that %o4 is the same as -li[2](x^2)/2 plus a constant (which appears to be complex, but that's OK) to judge by some plots.

    I will try to work out the details, but it seems like it's worth a try to apply some identities (as shown e.g. by https://en.wikipedia.org/wiki/Dilogarithm) to show that the observed result is equal to -li[2](x^2)/2 plus a constant.

    If that works out, then I would say the result is correct, although ideally of course it would be great if the identities were applied automatically and the simpler result returned.

     
  • Robert Dodier

    Robert Dodier - 2024-10-27
    • labels: --> integrate, dilogarithm
     
  • Robert Dodier

    Robert Dodier - 2024-10-27
    • status: open --> not-a-bug
     
  • Robert Dodier

    Robert Dodier - 2024-10-27

    OK, I've verified that I can get the desired result via the identities in https://en.wikipedia.org/wiki/Dilogarithm , namely

    Li[2](z) + Li[2](-z) = Li[2](z^2)/2
    

    and

    Li[2](z) + Li[2](1 - z) = (%pi^2)/6 - log(z)*log(1 - z)
    

    What I get is that the expression returned by integrate is equivalent to (%pi^2)/3 - li[2](x^2)/2, which is OK since it differs from the expected result by a constant.

    At this point I think that shows the result is not a bug, so I'll close this ticket. I agree that it would be great if Maxima could apply the identities automatically -- if someone is interested, maybe they could create a feature request to implement dilogarithm identities and maybe another one to apply them to the result of integrate automatically.

    It occurs to me that applying identities automatically is a delicate process since it might make an expression more complex instead of less. I won't try to sort out how that could be handled automatically.

     

Log in to post a comment.

MongoDB Logo MongoDB