# To evaluating the contour integral of a function,why do we have to chose a contour?

To evaluating the contour integral of a function,why do we have to chose a contour? is the contour line give the function domain and range? but how?

-
I want to say that the integral of a holomorphic $f\colon U \to \mathbf{C}$ along a closed path $\gamma$ in $U$ depends only on the homotopy class of $\gamma$. You can probably prove this with Stokes's theorem. I'll have to think about it. –  Dylan Moreland Jul 16 '11 at 20:04

\begin{align*} \int_0^5 f(x) \text{ d}x \neq \int_1^6 f(x) \text{ d}x \end{align*}
Obviously the defintion of contour integration requires some contour to be chosen (we have a function $f:U\rightarrow\mathbb{C}$, we choose a contour $\gamma:[a,b]\rightarrow U$ and integrate the composition $(f\circ \gamma):[a,b]\rightarrow\mathbb{C}$ to produce $\int_\gamma fdz$), so I assume that what you mean is, "Why does the answer depend on what contour we chose?" One answer is that if the value of contour integrals did not depend on the contour, then every function would be entire by Morera's theroem. However, the function $\frac{1}{z}$ is an example of a non-entire function (because it has a pole at $z=0$); and indeed, we can see that integrating $\frac{1}{z}$ along the contours $\gamma(\theta)=e^{i\theta}$ and $\alpha(\theta)=2+e^{i\theta}$, we get $\int_{\gamma}\frac{1}{z}dz= 2\pi i$ and $\int_\alpha\frac{1}{z}dz=0$ respectively, because $\gamma$ encloses the pole at $z=0$, whereas $\alpha$ does not. So the contour integral does depend on the contour.