Why is it okay to do this: $\int \frac{1}{x-2}dx = \ln(x-2)$
but not this: $\int \frac{1}{1-x^2}dx = \ln(1-x^2)$
Why is it okay to do this: $\int \frac{1}{x-2}dx = \ln(x-2)$
but not this: $\int \frac{1}{1-x^2}dx = \ln(1-x^2)$
On
The first integral can be solved by linear substitution $z = x - 2$.
The second one is non-linear and does not work. Instead you have $-2 \, \int x/(1-x^2) = \mathrm{ln}(1-x^2) + C$. See https://en.wikipedia.org/wiki/Integration_by_substitution.
The chain rule is the difference. Note that $\int\frac{du}{u}=\ln|u|$. So, you must have a fraction of the form $u$ on the bottom and the derivative of $u$ on the top. For your second example, $u=1-x^2$, but $du=-2xdx$ is not the numerator.