Integrate x dx/(1-x). I have proceeded thus-
Int xdx/(1-x)=int -(x-1+1)/(x-1)
=-Int dx-Int dx/(x-1)
=-x-log(x-1). On differentiating, we get original expression-
However, the answer in the book is
-x-log(1-x)and differentiating this also we get same expression-
There is no problem of constants of integration in this example as is clear from back differentiation, and log(1-x)is not=log(x-1), then where is the anomaly?
In integrating the function 1/x, students often mistaken (due to laziness and sloppiness) the answer as log(x). But if one looks closely at the domain of these two functions, the first is defined for all real number x except zero while the second is only defined for positive values of x (i.e. x>0).
In order to be precisely correct, the correct answer should be log (|x|), sometimes written log |x| (it should be the natural logarithm of the absolute value of x).
Now both functions have the same domain ( all real number x except zero) and you can check for both x > 0 and x < 0, the derivative of log (x) and log (-x) (this is for x < 0 as |x| = -x on this set of numbers) are both equal 1/x.
So if you are writing log|1-x| as your answer for the anti-derivative of 1/(x-1) you will have no problem as both log |1-x| and log |x-1| are the same function.