Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Logarithms and online integrators

  1. Oct 21, 2009 #1
    The integral of ln(1-x) is -(1-x)ln(1-x)-x, when 0<=x<=1.

    So for example:

    [tex]\int_{0}^{1} ln (1-x)dx= (-(1-x)ln(1-x)+x)_{0}^{1}=-1 [/tex]

    However, going to an online integrating site:


    they give the integral of ln(1-x) as x*(-1 + ln[1 - x]) - ln[-1 + x].

    So according to them:

    [tex]\int_{0}^{1} ln (1-x)dx=(x*(-1 + ln[1 - x]) - ln[-1 + x])_{0}^{1} =
    1(-1+ln(0))-ln(0)-0+ln(-1)=-1+ln(-1) [/tex]

    For ln(-1), aren't you supposed to take the value [tex]i\pi[/tex]?

    So do online integrators arbitrarily change signs of the argument in ln(), and give you an answer, with the understanding that it's only correct up to an imaginary part that's the result of assigning a sign to the argument of the ln()? Are they careful when you multiply ln()s, like ln(x)*ln(1-x), where multiplying two imaginary numbers gives a real number, so you can't tell if a term is due to assigning the argument of a logarithm a certain sign?
  2. jcsd
  3. Oct 21, 2009 #2


    User Avatar
    Science Advisor

    Then integral of ln(x) is NOT "ln(x)". It is ln(|x|). Since x is between 0 and 1, x- 1 is negative so |x-1|= 1- x and that integral, from the website, should be x(ln(1- x)- 1)- ln(1- x)= x ln(1-x)- ln(1-x)- x= (x- 1)ln(1-x)- x.

    The sign was not "arbitrarily changed". The online integrator did not know whether you mean x to be larger than or less than 1 and so could not know whether 1- x would be positive or negative. Certainly, the online integrator should have said "ln(|1- x|).

    And, since the absolute value is a positive real number, no there are no imaginary numbers involved.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook