How to find the roots polynomial function