Cauchy Integral Formula and Fundamental Theorem of Algebra I am stuck with the following proof question:
$f$ is holomorphic inside a closed, piecewise-smooth, simple curve $\gamma$ and $z_1, z_2, . . . z_n$ are distinct points in $\gamma$. Let $g(z) = (z − z_1)(z − z_2) . . . (z − z_n)$. I need to prove that
$$P(z)= \frac{1}{2\pi i}\oint_\gamma \frac{f(η)}{g(η)}\frac{g(η)−g(z)}{η−z} \,dη$$
is a polynomial of degree $(n − 1)$ and $P(z_i) = f(z_i)$ for $i = 1,\dots, n$.
I am thinking of using Cauchy's Integral Formula but I am not sure how exactly can i calculate the surface integral.
 A: Actually that should say "degree $\le n-1$".  It is quite possible for the degree to be less than $n-1$ (trivially so if $f \equiv 0$).
$g(z)$ is a polynomial of degree $n$.  For any polynomial $g$ of degree $n$, and any $\eta$, $g(\eta) - g(z)$ is a polynomial of degree $n$ divisible by $\eta - z$, so $(g(\eta) - g(z))/(\eta - z)$ is a polynomial (depending on $\eta$) of degree $n-1$, that is it is of the form 
$\sum_{j=0}^{n-1} c_j(\eta) z^j$ where $c_j$ are functions of $\eta$.  Moreover, they are analytic functions of $\eta$, because they can be obtained using the Cauchy integral formula by an appropriate contour integral of
$z^{-1-j} \frac{g(\eta)-g(z)}{\eta - z}$.  $P(z)$ is obtained by integrating
the meromorphic function $f(\eta)/g(\eta)$ times that polynomial around a contour, so it is again a polynomial of degree at most $n-1$: the coefficient of $z^j$ is
$$ \dfrac{1}{2\pi i} \oint_\gamma \frac{f(\eta)}{g(\eta)} c_j(\eta) \; d\eta$$
For $z = z_j$, $g(z) = 0$ so the definition of $P(z)$ has a cancellation:
$$ P(z_j) = \frac{1}{2\pi i} \oint_\gamma \frac{f(\eta)}{g(\eta)} \frac{g(\eta)}{\eta-z_j}\; d\eta =  \frac{1}{2\pi i} \oint_\gamma \frac{f(\eta)}{\eta - z_j}\; d\eta = f(z_j)$$
