Solution (source code)

= Solution

Put $w=\operatorname{artanh}z$. The <hyperbolic tangent> identity $z=(e^{2w}-1)/(e^{2w}+1)$ gives $e^{2w}=(1+z)/(1-z)$. Taking a compatible branch of the <complex logarithm> gives
$$
\boxed{\operatorname{artanh}z=\frac12\log\frac{1+z}{1-z}.}
$$
As an identity for a single-valued <inverse hyperbolic tangent>, this requires consistent <branch cuts>; one cannot choose unrelated logarithm branches on the two sides. Near $z=0$ the branch with value zero is fixed by $\operatorname{artanh}0=0$. The full inverse relation also allows $w\mapsto w+i\pi k$, $k\in\mathbb Z$, and $z=\pm1$ are singular points.