how to write a polynomial given roots