How do the Barycentric weights work with the Lagrange interpolation? I am reading this paper on Barycentric Interpolation for polynomials, which is based on the Lagrange method, this is the best and shortest example that confuses me.
The standard Lagrange formula is easy to grasp:
$$ P(x) = \sum_{j=0}^n f(x_j)\; \ell_{j,n} = \sum_{j=0}^n f(x_j) \prod_{i=0,i\neq j}^n \frac{x-x_i}{x_j - x_i} $$
for given value points $f(x_i)$  and interpolation points $x_i$.
So far so clear.
Then appearently we can write
$$ \ell(x) := (x-x_0)(x-x_1)\cdots(x-x_n),$$
$$\ell_j(x) :=  \ell(x) \frac{w_j}{x-x_j},   \\ w_j:=\frac{1}{\prod_{k\neq j}(x_j -x_k)}  = \frac{1}{\ell'(x_j)}.$$
The rest with the benefits of Barycentric Interpolation is clear to me but this identity really makes my head hurt, can anyone explain where the barycentric weights $w_j$ exactly come from ?
 A: Note that $\ell$ by itself does not interporate your points $f(x_i)$. It is just a stepping stone in developing a later expression for the actual interpolation.
$\ell(x)$ is just the monic (i.e., leading coefficient = 1) polynomial having simple zeros at each of the interpolation points $x_i$ and no other zeros.
For fixed $j$, by removing the $(x - x_j)$ factor from $\ell$, we get another polynomial with simple zeros at all the other interpolation points, but which is non-zero for $x_j$. Call it $$L_j(x) = (x - x_0)...(x- x_{j-1})(x-x_{j+1})...(x-x_n) = \frac {\ell(x)}{x - x_j}$$
But this isn't quite useful enough. We'd like to have $\ell_j(x_j) = 1$ as well. But that is simply a matter of dividing by the right constant:
$$\ell_j(x) = \frac {L_j(x)}{L_j(x_j)}$$
You may note that $x = x_j$ is the one point where the equation $$L_j(x) = \frac {\ell(x)}{x - x_j}$$ does not hold, since the right-hand side is undefined there. However, $L_j(x_j)$ itself is defined. It is just $$L_j(x_j) = (x_j - x_0)...(x_j- x_{j-1})(x_j-x_{j+1})...(x_j-x_n)$$
To make the notation a little easier, we rename $$w_j = \frac 1{L_j(x_j)}$$, giving the expression in your post. I'll leave proving that $L_j(x_j) = \ell'(x_j)$ to you.
The point of all of this is that now we have a set of polynomials with the property that $$\ell_j(x_i) = \begin{cases} 1 & i = j\\0 & i \ne j\end{cases}$$ and are the simplest such polynomials possible. And therefore we can take $$P(x) = \sum_{i=0}^n f(x_i)\ell_i(x)$$
