If polynomial $f(x)=a_0 x^n+a_1 x^{n-1}+\cdots+a_{n-1} x+a_n$ has $n$ different real roots $x_1,x_2,\cdots,x_n$, prove the following fomular: $$ \sum_{j=1}^n \frac{x_j^k}{f^{\prime}(x_j)}=\left\{\begin{array}{ll} 0, & 0 \leq k \leq n-2 \\ a_0^{-1}, & k=n-1 \end{array}\right. $$
My answer for the first case is :
I use the following Identity $$ \sum_{j=1}^{n}\left(x_{j}-x\right)^{k+1} l_{j}(x) \equiv 0,0 \leq k \leqslant n-2 $$ where $l_j(x)$ is Lagrangian Basis, more detail $$ l_{j}(x)=\prod_{i=1 \atop i \neq j}^{n} \frac{\left(x-x_{i}\right)}{\left(x_{j}-x_{i}\right)} $$ we know from the problem conditions that $f(x)$ can be writed as $$f(x) = a_0(x-x_1)(x-x_2)\cdots(x-x_n)$$ then we can get the following identity $$ \sum_{j=1}^{n}\left(x_{j}-x\right)^{k+1} \frac{f(x)}{\left(x-x_{j}\right) f^{\prime}\left(x_{j}\right)}\equiv 0 $$ Since $f(x) \not\equiv 0$, let $x = 0$ , then we get $$\sum_{j=1}^n \frac{x_j^k}{f^{\prime}(x_j)} = 0 $$ for the $0\le k \le n-2$
Now I am stucking in the second case and don't know how to prove it, I think it can be prooved from the following Identities $$ \begin{array}{l} \sum_{j=0}^{n} x_{j}^{k} l_{j}(x) \equiv x^{k}, \quad k=0,1, \cdots, n \\ \sum_{j=0}^{n}\left(x_{j}-x\right)^{k} l_{j}(x) \equiv 0, k=1,2, \cdots, n \end{array} $$ where $x_j$ are different points
A very close approach is to use partial fraction decomposition. For any $k\geqslant 0$ we have $$\frac{x^{k+1}}{f(x)}=p_k(x)+\sum_{j=0}^n\frac{a_{k,j}}{x-x_j},$$ where $p_k(x)$ is a polynomial of degree $k+1-n$ if $k\geqslant n-1$, and $p_k(x)\equiv 0$ otherwise. And $$a_{k,j}=\lim_{x\to x_j}(x-x_j)\frac{x^{k+1}}{f(x)}=\frac{x_j^{k+1}}{f'(x_j)},$$ giving $$\frac{x^{k+1}}{f(x)}=p_k(x)+\sum_{j=1}^n\frac{x_j^{k+1}}{f'(x_j)}\frac{1}{x-x_j}.$$
Observe that $p_{n-1}(x)$ is a constant, easily seen to be $1/a_0$ after taking $x\to\infty$.
Taking $x\to 0$, we get what we need. One has to be careful if $k=0$ and $f(0)=0$ though. The LHS is then equal to $1/f'(0)$, and the RHS is missing exactly the term for which $x_j=0$.