How to calculate $\int \frac{1}{x^{2}-1}dx$ I got different answers when I use substitution of $x=\sec(t)$ or split the term. Also as I calculated, the answer is $\frac{1}{2}(\ln(x-1)-\ln(x+1))+c$, while the answer given by Wolfram Alpha is $\frac{1}{2}(\ln(1-x)-\ln(x+1))+c$. Where is the problem? Thanks!

In real calculus, $\displaystyle\int\frac1{x-a}=\ln|x-a|+K$
and we know $\displaystyle|b|=|-b|$ for any real $b$
