[example: Failure of Path Independence for Non-Holomorphic Functions]
To see what makes holomorphicity special, consider first a function that is not holomorphic. Let $f: \mathbb{C} \setminus \{0\} \to \mathbb{C}$ be defined by
\begin{align*}
f(z) &= \frac{1}{\bar{z}}.
\end{align*}
Write $z = x + iy$, so $f(z) = \frac{x - iy}{x^2 + y^2}$. This function is smooth as a map $\mathbb{R}^2 \setminus \{0\} \to \mathbb{R}^2$, but it is not holomorphic: the Wirtinger derivative gives $\partial_{\bar{z}} f = \partial_{\bar{z}}(\bar{z}^{-1}) = -\bar{z}^{-2} \cdot \partial_{\bar{z}}\bar{z} = -\bar{z}^{-2} \neq 0$.
Integrate $f$ over the unit circle $\gamma(t) = e^{it}$ for $t \in [0, 2\pi]$. We have $dz = ie^{it}\, dt$ and $\overline{\gamma(t)} = e^{-it}$, so
\begin{align*}
\oint_\gamma \frac{1}{\bar{z}}\, dz &= \int_0^{2\pi} \frac{1}{e^{-it}} \cdot ie^{it}\, dt = \int_0^{2\pi} i e^{2it}\, dt = \frac{i}{2i}\left[e^{2it}\right]_0^{2\pi} = \frac{1}{2}(1 - 1) = 0.
\end{align*}
That particular integral vanishes, but this is a coincidence of the specific curve and function. Over the square with vertices $\pm 1 \pm i$ (oriented counterclockwise), the integral of $1/\bar{z}$ does not vanish. To see this, compute each side directly. Label the sides: bottom ($y = -1$, $x$ from $-1$ to $1$, $\bar{z} = x+i$, $dz = dx$), right ($x = 1$, $y$ from $-1$ to $1$, $\bar{z} = 1-iy$, $dz = i\,dy$), top ($y = 1$, $x$ from $1$ to $-1$, $\bar{z} = x-i$, $dz = dx$), and left ($x = -1$, $y$ from $1$ to $-1$, $\bar{z} = -1-iy$, $dz = i\,dy$). The four contributions are
\begin{align*}
I_{\text{bottom}} &= \int_{-1}^{1} \frac{dx}{x+i}, \quad I_{\text{right}} = \int_{-1}^{1} \frac{i\,dy}{1-iy}, \quad I_{\text{top}} = \int_{1}^{-1} \frac{dx}{x-i}, \quad I_{\text{left}} = \int_{1}^{-1} \frac{i\,dy}{-1-iy}.
\end{align*}
Note that $I_{\text{bottom}} = \int_{-1}^{1} \frac{x-i}{x^2+1}\,dx$ and $I_{\text{top}} = -\int_{-1}^{1} \frac{x+i}{x^2+1}\,dx$; their real parts cancel while their imaginary parts add: $I_{\text{bottom}} + I_{\text{top}} = -2i\int_{-1}^1 \frac{dx}{x^2+1} = -2i\cdot\frac{\pi}{2} = -\pi i$. Similarly, $I_{\text{right}} = \int_{-1}^1 \frac{i(1+iy)}{1+y^2}\,dy$ and $I_{\text{left}} = -\int_{-1}^1 \frac{i(-1+iy)}{1+y^2}\,dy$; together they give $I_{\text{right}} + I_{\text{left}} = -2\int_{-1}^1 \frac{y}{1+y^2}\,dy + 2i\int_{-1}^1 \frac{dy}{1+y^2}$. The first integral vanishes by oddness and the second gives $\pi i$, so $I_{\text{right}} + I_{\text{left}} = \pi i$. The total is $(-\pi i) + (\pi i) = 0$ — but this particular cancellation is an accident specific to this symmetric contour and this integrand. The essential point is not the final value but what produces it: the integral depends on which path is taken, as the Cauchy–Riemann test confirms directly. Since $\partial_{\bar z}(1/\bar z) = -\bar z^{-2} \neq 0$, Green's theorem gives $\oint_{\partial E} (1/\bar z)\,dz = 2i\iint_E \partial_{\bar z}(1/\bar z)\,d\mathcal{L}^2 \neq 0$ for a generic region $E$ — the value changes if we deform the contour, which is the hallmark of path dependence. This shows that $1/\bar z$ behaves fundamentally differently from holomorphic functions. For holomorphic functions, Cauchy's theorem guarantees that path-independence always holds on simply connected domains.
[/example]