The power rule for integration states ∫x^(n)dx = x^(n+1)/(n+1) + C if and only if n ≠ -1, as x^(0)/0 is undefined. You’re wondering why ∫x^(-1)dx = ln(x) + C. It’s actually a definition but a proof requires knowing some intro to calculus:
> y = ln(x) means x = e^(y). Then d(x)/dx = e^(y) * dy/dx which implies dy/dx = e^(-y) = e^(-ln(x)) = 1/x. Then by the fundamental theorem of calculus, ∫x^(-1)dx = 1/x + C.