# 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

A different contour is a different problem, just like the two integrals here are not the same:

\begin{align*} \int_0^5 f(x) \text{ d}x \neq \int_1^6 f(x) \text{ d}x \end{align*}

The contour integral just is defined based on the path, because this turns out to be a natural generalization of integration along a line. What may be confusing is that when integrating nice enough functions, it turns out that the exact path doesn't matter (though the end points definitely do!), but gross changes such as pushing the contour through "poles" or other singularities will change it. As a result, you do have to specify the contour path to this level of detail.

-
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.