Let $\gamma_0$ and $\gamma_1$ be piecewise smooth curves defined on the interval $[a, b]$ with the same end points, i.e., $\gamma_0(a) = \gamma_1(a)$ and $\gamma_0(b) = \gamma_1(b)$. If $U \subset \mathbb{C}$ is an open set, then $\gamma_0$ and $\gamma_1$ are said to be homotopic in $U$ if there exists a continuous function $F : [0, 1] \times [a, b] \to U$ such that
\[
F(s, a) = \gamma_0(a) = \gamma_1(a), \qquad F(s, b) = \gamma_0(b) = \gamma_1(b)
\] for every $s \in [0, 1]$ and
\[
F(0, t) = \gamma_0(t), \qquad F(1, t) = \gamma_1(t)
\] for every $t \in [a, b]$. In this case we call $F$ a homotopy between $\gamma_0$ and $\gamma_1$ and $F(s, t)$ is usually denoted by $\gamma_s(t)$.
Theorem. Let $f$ be holomorphic on an open set $U$. If $\gamma_0$ and $\gamma_1$ are piecewise smooth curves that are homotopic in $U$, then
\[
\int_{\gamma_0} f = \int_{\gamma_1} f.
\]
Proof. Let $F$ be a homotopy between $\gamma_0$ and $\gamma_1$ as above. Then $F$ is continuous and so the image of $F$ is a compact set since image of a compact set under a continuous map is compact. Let us denote the image of $F$ by $K$. Note that we have $d(K, U^c) > 0$. Moreover, if $0 < \epsilon < d(K , U^c)$, then $D(z, \epsilon) \subset U$ for every $z \in K$. By uniform continuity of $F$ there is a $\delta > 0$ such that
\[
|\gamma_{s_1} (t) -\gamma_{s_2}(t)| < \epsilon
\] for all $s_1, s_2 \in [0, 1]$ with $|s_1 -s_2| < \delta$ and $t \in [a, b]$. This yields
\[
\sup_{t \in [a, b]} |\gamma_{s_1}(t) -\gamma_{s_2}(t)| \leq \epsilon.
\] for all $s_1, s_2 \in [0, 1]$ with $|s_1 -s_2| < \delta$.
We now fix $s_1, s_2 \in [0, 1]$ with $|s_1- s_2| < \delta$ and let $a = t_0 < t_1 < \cdots < t_n = b$ be a uniform partition of $[a, b]$, i.e., $t_{i}- t_{i-1} = (b- a)/n$ for every $1 \leq i \leq n$. Because $\gamma_{s_1}$ and $\gamma_{s_2}$ are uniformly continuous, there exist a $\eta > 0$ such that
\[
|\gamma_{s_1}(t)- \gamma_{s_1}(t’)| < \epsilon \qquad \text{and} \qquad |\gamma_{s_2}(t)- \gamma_{s_2}(t’)| < \epsilon
\] whenever $t, t’ \in [a, b]$ and $|t- t’| < \eta$. We choose $n$ to be so large that $(b- a)/n < \eta$. Let $z_i = \gamma_{s_1}(t_i)$ and $w_i = \gamma_{s_2}(t_i)$ for $0 \leq i \leq n$. Let $D_i = D(z_i, 2 \epsilon)$ for each $0 \leq i < n$. We claim that $\gamma_{s_1}([t_i, t_{i + 1}]) \cup \gamma_{s_2}([t_i, t_{i + 1}]) \subset D_i$ for each $0 \leq i < n$.