0

I have $\int -\frac{x}{1-x^2}dx$. I can solve it two ways: either $$\int -\frac{x}{1-x^2}dx = -\int \frac{x}{1-x^2}dx$$ and then letting $u = -x^2 + 1 $ resulting in $\frac{1}{2}\ln(1-x^2) +C_1$ or by doing $$\int -\frac{x}{1-x^2}dx = \int \frac{x}{x^2 - 1}dx$$ and letting $u = x^2 - 1$, resulting in $\frac{1}{2}\ln(x^2 - 1) + C_2$

I have seen Two different solutions to integral but cannot see how that applies in this case. I tried doing

$$\ln(1-x^2) = \ln((-1)(-1)(1-x^2)) = \ln(-1) + \ln(x^2-1)$$ but that doesn't work. Why are the solutions different and do they only differ in the constant?

hur
  • 107

1 Answers1

1

Depending on the value of $x$, one of the solutions is wrong because the argument of the logarithm may not be negative.

In fact you have observed that due to the singularity at $|x|=1$, you may not "cross" these points. Hence the antiderivative is made of independent sections.


Some guys will tell you that the general solution is

$$\log|x^2-1|+C.$$

But in reality, it is

$$f(x)=\begin{cases}|x|<1\to\log(1-x^2)+C_0,\\|x|>1\to\log(x^2-1)+C_1.\end{cases}$$