as you can see, -ln(x-1), and -ln(-x+1) have different domains.

the first function is only defined for x > 1, and the second is only defined for x < 1.

to circumvent these difficulties, one often sees the antiderivative as -ln|x-1|, which is defined for all x ≠ 1.