Solution (source code)

= Solution

At a simple <root of a polynomial> $x_i$ of $\omega$, differentiating the product gives $\omega'(x_i)=\prod_{k\ne i}(x_i-x_k)\ne0$. Consequently the <Lagrange basis polynomials> can be written
$$
\ell_i(x)=\frac{\omega(x)}{(x-x_i)\omega'(x_i)}.
$$
Divide the <polynomial interpolation> identity from part (a) by $\omega(x)$, at points outside the nodes. This gives the <partial fraction decomposition>
$$
\boxed{\frac{p(x)}{\omega(x)}=\sum_{i=0}^n\frac{p(x_i)}{\omega'(x_i)}\frac1{x-x_i}.}
$$
Every denominator of $\omega$ is simple, and the <rational function> is proper because $\deg p<\deg\omega$, so no polynomial part is missing.