Show $P(z) $ is a polynomial of degree $n-1$ interpolating an Analytic function. Let $C$ be a regular curve enclosing the distinct points $ω_1,ω_2,...ω_n$ and let $p(ω) = (ω −ω_1)(ω −ω_2) \cdots (ω −ω_n)$. Suppose that $f (ω)$ is analytic in a region that includes $C$. Show that 
$$P(z) =  \frac{1}{2 \pi i} \int_C \frac{f(ω)}{p(ω)} . \frac{p(ω) -p(z)}{ω -z} dω$$
is a polynomial of degree $n-1$ and $P(ω_i) = f(ω_i)$.
 A: As $\omega - z$ divides $p(\omega) - p(z)$, this quotient is actually a polynomial:
$$\frac{p(\omega) - p(z)}{\omega - z} = R(\omega,z) = \sum_{k=0}^{n-1} R_k(\omega)z^k.$$
Then,
$$P(z) =
\frac1{2\pi i}\int_C\frac{f(\omega)}{p(\omega)}\frac{p(\omega) − p(z)}{\omega − z}d\omega = 
\frac1{2\pi i}\int_C\frac{f(\omega)}{p(\omega)}\left(\sum_{k=0}^{n-1} R_k(\omega)z^k\right)d\omega =
$$
$$
\sum_{k=0}^{n-1}\int_C\left(\frac1{2\pi i}\frac{f(\omega)}{p(\omega)} R_k(\omega)d\omega\right)z^k.
$$
($P$ is a polynomial)
On the other hand,
$$P(\omega_k) =
\frac1{2\pi i}\int_C\frac{f(\omega)}{p(\omega)}\frac{p(\omega) − p(\omega_k)}{\omega − \omega_k}d\omega = 
\frac1{2\pi i}\int_C\frac{f(\omega)}{p(\omega)}\frac{p(\omega) − 0}{\omega − \omega_k}d\omega =
$$
$$
= \frac1{2\pi i}\int_C\frac{f(\omega)}{\omega − \omega_k}d\omega = f(\omega_k)
$$
by the Cauchy integral formula.
A: This directly follows from the residue theorem:
$$ P(z)=\sum_i \frac{f(\omega_i)}{\prod_{j\ne i}(\omega_i-\omega_j)}\frac{-p(z)}{\omega_i-z}
$$
which can be written as
$$ P(z)=\sum_i \frac{f(\omega_i)}{\prod_{j\ne i}(\omega_i-\omega_j)}\prod_{j\ne i} (z-\omega_j)
$$
The last product $\prod_{j\ne i} (z-\omega_j)$  is a polynomial of degree $n-1$ which cancels at $z=\omega_k$ for $k\ne i$. $P(z)$ is thus a polynomial of degree $n-1$ with $P(\omega_i)=f(\omega_i)$.
A: Re-writing $P$ give the following form
$$P(z) =  f(z)- \frac{1}{2i\pi}\int_{C}\prod_{j=0}^{n}\left(\frac{z-\omega_j}{\omega-\omega_j}\right)\frac{f(\omega)d\omega}{\omega-z}$$
Howver, we have, 
$$\prod_{j=0}^{n}\left(\frac{1}{\omega-\omega_j}\right)  = \sum_{i=0}^{n} \frac{A_i}{\omega-\omega_i}~~~\text{with}~~~A_i =\prod_{\stackrel{i\neq j }{j=0}}^{n}\left(\frac{1}{\omega-\omega_j}\right)$$ 
Hence, 
$$\prod_{j=0}^{n}\left(\frac{z-\omega_j}{\omega-\omega_j}\right)  =  \sum_{i=0}^{n} \prod_{\stackrel{i\neq j }{j=0}}^{n}\left(\frac{z-\omega_j}{\omega-\omega_j}\right)\frac{z-\omega_i}{\omega-\omega_i}=\sum_{i=0}^{n} \ell_i(z)\frac{z-\omega_i}{\omega-\omega_i}~~ ~$$ 
With
 $$\color{blue}{\ell_i(z) =\prod_{\stackrel{i\neq j }{j=0}}^{n}\left(\frac{z-\omega_j}{\omega-\omega_j}\right)\in\Bbb C_{n-1}[X].
}  $$
Therefore, $$P(z) =  f(z)- \frac{1}{2i\pi}\int_{C}\prod_{j=0}^{n}\left(\frac{z-\omega_j}{\omega-\omega_j}\right)\frac{f(\omega)d\omega}{\omega-z} \\=  f(z)- \frac{1}{2i\pi}\int_{C}\sum_{i=0}^{n} \ell_i(z)\frac{z-\omega_i}{\omega-\omega_i}~\frac{f(\omega)d\omega}{\omega-z}\\=f(z)- \sum_{i=0}^{n} \ell_i(z)\frac{1}{2i\pi}\int_{C}\frac{z-\omega_i}{\omega-\omega_i}~\frac{f(\omega)d\omega}{\omega-z}  $$
On the other hand, by **Cauchy formula we have, ** $$\frac{1}{2i\pi}\int_{C}\frac{z-\omega_i}{\omega-\omega_i}~\frac{f(\omega)d\omega}{\omega-z} =\frac{1}{2i\pi}\int_{C}~\frac{f(\omega)d\omega}{\omega-z}- \frac{1}{2i\pi}\int_{C}\frac{f(\omega)d\omega}{\omega-\omega_i}\\= f(z) -f(\omega_i)$$
Finally we have, 
$$P(z) =  f(z)- \sum_{i=0}^{n} \ell_i(z)\frac{1}{2i\pi}\int_{C}\frac{z-\omega_i}{\omega-\omega_i}~\frac{f(\omega)d\omega}{\omega-z} \\=f(z)- \sum_{i=0}^{n} \ell_i(z)(f(z) -f(\omega_i)) =\sum_{i=0}^{n} \ell_i(z)f(\omega_i) \in \Bbb C_n[X] $$
Since, By Lagrange interpolation  we can see that $$\sum_{i=0}^{n} \ell_i(z) =1$$
Thus, 

$$P(z)  =\sum_{i=0}^{n} \ell_i(z)f(\omega_i) \in \Bbb C_{n-1}[X] $$
  By Lagrange interpolation again $P(z)$ is the only polynomial of degree $n$ interpolating $f$ at $\omega_i,~~i= 0,\cdots,n$

A: Let's mark: $p\left(z\right)=\sum_{k=0}^{n}a_{k}z^{k}$
Thus,
$g\left(\omega\right)-g\left(z\right)$ $=\sum_{k=0}^{n}a_{k}\omega^{k}-\sum_{k=0}^{n}a_{k}z^{k}\\=\sum_{k=0}^{n}a_{k}\left(\omega^{k}-z^{k}\right)\\=a_{0}\left(\omega^{0}-z^{0}\right)+\sum_{k=1}^{n}a_{k}\left(\omega^{k}-z^{k}\right)\\=\sum_{k=1}^{n}a_{k}\left(\omega^{k}-z^{k}\right)$
Therefore,
$\frac{g\left(\omega\right)-g\left(z\right)}{\omega-z}=\frac{\sum_{k=1}^{n}a_{k}\left(\omega^{k}-z^{k}\right)}{\omega-z}=\sum_{k=1}^{n}a_{k}\left(\omega^{k-1}+\omega^{n-2}z+\dots+\omega z^{n-2}+z^{n-1}\right)\underbrace{=}_{\text{marking+(*)}}\sum_{k=1}^{n-1}P_{k}\left(\omega\right)z^{n}$
(*) - We can see that the quotient is polynomial of degree $n-1$
$P\left(z\right) =\frac{1}{2\pi i}\int_{\gamma}\frac{f\left(\omega\right)}{g\left(\omega\right)}\frac{g\left(\omega\right)-g\left(z_{i}\right)}{\omega-z_{i}}d\omega
 =\frac{1}{2\pi i}\int_{\gamma}\frac{f\left(\omega\right)}{g\left(\omega\right)}\left(\sum_{k=1}^{n-1}P_{k}\left(\omega\right)z^{k}\right)d\omega
 =\sum_{k=1}^{n-1}\left(\frac{1}{2\pi i}\int_{\gamma}\frac{f\left(\omega\right)}{g\left(\omega\right)}P_{k}\left(\omega\right)d\omega\right)z^{k}$
That's why we can conclude that $P(z)$ is polynomial of degree n−1
In addition,
$P\left(z_{i}\right) =\frac{1}{2\pi i}\int_{\gamma}\frac{f\left(\omega\right)}{g\left(\omega\right)}\frac{g\left(\omega\right)-g\left(z_{i}\right)}{\omega-z_{i}}d\omega
 =\frac{1}{2\pi i}\int_{\gamma}\frac{f\left(\omega\right)}{g\left(\omega\right)}\frac{g\left(\omega\right)}{\omega-z_{i}}d\omega
 =\frac{1}{2\pi i}\int_{\gamma}\frac{f\left(\omega\right)}{\omega-z_{i}}d\omega
 \underbrace{=}_{\text{Cauchy integral formula}}f\left(z_{i}\right)$
