Is $\int\frac{\mathrm d \, x}{x^2-1}= \operatorname{arctanh} ~x + C = \operatorname{arccoth} ~x + K$ correct? My professor gave us an integral but I think it's incorrect.
Is this correct?
$$
\DeclareMathOperator\arctanh{arctanh}
\DeclareMathOperator\arccoth{arccoth}
\int\frac{\mathrm d \, x}{x^2-1}= \arctanh ~x + C = \arccoth ~x + K$$

It is useful to rewrite $\DeclareMathOperator\arctanh{arctanh}\DeclareMathOperator\arccoth{arccoth} \arccoth x$ as an inverse function. In this case, let $f(x)=\coth x=\frac{e^x+e^{-x}}{e^x-e^{-x}}=\frac{e^{2x}+1}{e^{2x}-1}$. To determine the inverse, just solve for $x$ in the equation $y=\frac{e^{2x}+1}{e^{2x}-1}$. 
\begin{align*}
y&=\frac{e^{2x}+1}{e^{2x}-1}\\
e^{2x}y-y&=e^{2x}+1\\
e^{2x}(y-1)&=y+1\\
e^{2x}&=\frac{y+1}{y-1}\\
2x&=\ln\left(\frac{y+1}{y-1}\right)\\
x&=\frac{1}{2}\ln\left(\frac{y+1}{y-1}\right)\\
\arccoth x&=\frac{1}{2}\ln\left(\frac{x+1}{x-1}\right)
\end{align*}
You will get something similar for $\arctanh x$!
\begin{equation*}
\arctanh x=\frac{1}{2}\ln\left(\frac{x+1}{1-x}\right)
\end{equation*}
For the integral, use partial fractions. The rewrite is
\begin{equation*}
\frac{1}{x^2-1}=\frac{1}{2}\left(\frac{1}{x-1}-\frac{1}{x+1}\right)
\end{equation*}
\begin{equation*}
\int\frac{1}{x^2-1}\mathrm{d}x=\frac{1}{2}\left(\ln\left|\frac{x-1}{x+1}\right|\right)+C
\end{equation*}
Your lecturer was close! for $|x|>1$, we have $\int\frac{1}{x^2-1}\mathrm{d}x=-\arccoth x+C$ and for $|x|<1$, we have $\int\frac{1}{x^2-1}\mathrm{d}x=-\arctanh x+C$.
I hope this helps (and is all correct)!
