In a question in Fuhrmann's "A polynomial approach to linear algebra" it is stated that $\sum_{i=1}^n \frac{p(a_i)}{q'(a_i)}=p_{a_{n-1}},$ where $p,q$ are polynomials over a field with $deg(p)=n-1$ and $deg(q)=n$. $q(x)$ is also a monic polynomial with the unique factorization $p(x)=(x-a_1)(x-a_2)...(x-a_n)$.
$q'(x)$ is the formal derivative of $q(x)$, and $p_{a_{n-1}}$ is the $n-1$:th coefficient of $p$, i.e. it's leading coefficient.
Does anyone know how to do it?
A tip is to use Langrange interpolation.