A determinant involving a polynomial is $0$ 
Let $n \geq 2$ and $f:\mathbb{R} \to \mathbb{R}, \: f(x)=(x-x_1)(x-x_2)\dots(x-x_n)$ where $x_1,\dots, x_n$ are distinct real numbers. The matrix $A=(a_{ij})_{1 \leq i,j \leq n}$ is defined as follows:
  $$a_{ij}=\begin{cases}
\dfrac{f'(x_i)-f'(x_j)}{x_i-x_j}, & \text{if } i \neq j \\[6px]
f''(x_i), & \text{if } i = j
\end{cases}$$
  Prove that $\det A = 0$

This is related to this problem, so I know that $$\frac{1}{f(x)}=\sum_{k=1}^n \frac{1}{f'(x_k)(x-x_k)}, \quad \forall x \neq x_i$$ I tried to write the terms of $A$, but getting the second derivative of $f$ in terms of those $x_i$ is pretty complicated. So I tried to simplify it by writing $$f(x)=a_nx^n+a_{n-1}x^{n-1}+\dots+a_0$$
and so $f''(x)=n(n-1)x^{n-2}+(n-1)(n-2)x^{n-3}+\dots+2\cdot 1\cdot x^0$. However, I am not sure this will lead to something helpful.
 A: I eventually found the solution!
Using the formula mentioned in the statement, we have $$\frac{f'(x)}{f(x)}=\sum_{i=1}^n \frac{f'(x)}{f'(x_i)(x-x_i)}, \quad \forall x \neq x_i$$
But we also have $$\frac{f'(x)}{f(x)}=\sum_{i=1}^n \frac{1}{(x-x_i)}$$ Subtracting these gives $$0=\sum_{i=1}^n \frac{f'(x)-f'(x_i)}{f'(x_i)(x-x_i)}$$
Fixing some $j \in \overline{1,n}$ and taking limits above with $x \to x_j$ gives $$0=\sum_{i=1, i \neq j}^n \frac{f'(x_j)-f'(x_i)}{(x_j-x_i)f'(x_i)}+\frac{f''(x_j)}{f'(x_i)}=\sum_{i=1, i \neq j}^n \frac{1}{f'(x_i)}\cdot a_{ij}+\frac{1}{f'(x_i)}\cdot a_{jj}$$
Now, we can write the determinant like this: 
$$\det A = f'(x_1)f'(x_2)\dots f'(x_n)\begin{vmatrix}
\frac{a_{11}}{f'(x_1)} & \frac{a_{12}}{f'(x_1)} & \dots & \frac{a_{1n}}{f'(x_1)} \\
\frac{a_{21}}{f'(x_2)} & \frac{a_{22}}{f'(x_2)} & \dots & \frac{a_{2n}}{f'(x_2)}\\
\vdots \\
\frac{a_{n1}}{f'(x_n)} & \frac{a_{n2}}{f'(x_n)} & \dots & \frac{a_{nn}}{f'(x_n)}
\end{vmatrix}$$
Adding all the lines to the first one gives $\det A =0$.
