Branch cut (source code)

= Branch cut
{wiki}

A <branch cut> is a removed curve or collection of curves used to choose a single-valued <branch of a multivalued function> of a multivalued complex expression. On $\mathbb C\setminus(-\infty,0]$, choosing $-\pi<\arg z<\pi$ gives the <principal logarithm> $\operatorname{Log}z=\log|z|+i\arg z$ and hence $\sqrt z=\exp(\operatorname{Log}z/2)$.

The limiting values on opposite sides of the negative <real axis> differ: for $r>0$, the two square-root values approach $i\sqrt r$ and $-i\sqrt r$. The original algebraic relation $w^2=z$ has no discontinuity; the discontinuity belongs to the selected <branch of a multivalued function>. Tracking that distinction prevents sign errors in <contour integration> and motivates a <Riemann surface>.