We know that the derivative of ln(x) is 1/x, but that is only true for the interval (0, ∞); that means (ln(x) + C) is the antiderivative of 1/x only on that interval.
It would be better to say that the antiderivative of 1/x is (ln(|x|) + C), since that would work on any interval as long as x ≠ 0.