Can an integral of a function be multi-valued? Consider $f(z) = \int_0^1 \frac{1}{x - z} dx$, where $z \in \mathbb{C} \setminus [0, 1]$. The usual calculation gives us $f(z) = \log |\frac{1 - z}{-z}|$, but the $\log$ function on the complex plane is multi-valued unless we specify a branch. But this seems weird, as I have never heard that the integral of a function can be multi-valued.
 A: Let $f(z)$ be given by the integral $f(z)=\int_0^1 \frac1{x-z}\,dx$ where the path of integration is on the line segment $[0,1]$.
If $z\in \mathbb{R}$, with $z>1$ or $z<0$, then
$$f(z)=\log\left|\frac{1-z}{-z}\right|$$
If $z\in \mathbb{R}$, and $z\in [0,1]$, then the integral fails to exist.  For $z\in (0,1)$, the Cauchy Principal Value of the integral does exist.
If $z\in \mathbb{C}$, and $\text{Im}(z)\ne 0$, then we have
$$\begin{align}
\int_0^1 \frac{1}{x-z}\,dx&=\int_0^1 \frac{x-\text{Re}(z)}{x^2+|z|^2-2x\text{Re}(z)}\,dx+\int_0^1 \frac{i\text{Im}(z)}{x^2+|z|^2-2x\text{Re}(z)}\,dx\\\\
&=\log\left(\frac{|1-z|}{|z|}\right)\\\
&+i\text{sgn}(\text{Im}(z))\left(\arctan\left(\frac{1-\text{Re}(z)}{|\text{Im}(z)|}\right)-\arctan\left(\frac{-\text{Re}(z)}{|\text{Im}(z)|}\right)\right)
\end{align}$$
Alternatively, we have in terms of the multi-valued logarithm
$$\begin{align}
\int_0^1\frac{1}{x-z}\,dx&=\log(1-z)-\log(-z)\\\\
&=\log(|1-z|)+i\arg(1-z)-\log(|-z|)-i\arg(-z)\\\\
&=\log\left(\frac{|1-z|}{|z|}\right)+i\left(\arg(1-z)-\arg(-z)\right)
\end{align}$$

**NOTE:**While $\arg(z)$ is multivalued, the difference $\arg(1-z)-\arg(-z)$ is not multivalued and does not depend on the choice of branch.  This is because the branch cut cannot pass through the line segment $[0,1]$.

