Let $f(x) = (x-a_1)(x-a_2)...(x-a_n)$.
Find a decomposition into simple fractions of $\frac{f'}{f}$.
Where $f'$ is a derivative of our polynomial.
As I understand, we have to find a pretty-format of $f'$ and then task will be easy. But I have no idea how to find this.
Note that some $a_i$ can be equal to each other.
Following Martin's idea,
Let for $ x\ne a_1,a_2,...,a_n $, $$g(x)=\ln(|f(x)|)=$$ $$\sum_{k=1}^n\ln(|x-a_k|)$$
thus
$$g'(x)=\frac{f'(x)}{f(x)}$$ $$=\sum_{k=1}^n\frac{1}{x-a_k}$$