I am going to write a method then work this out after posting the method - see if you can beat me!
The way would probably be to put this into function notation then trial and error it til you get one that works, take this factor out then trial and error the quartic, take factor out, get cubic and so on.
Ill give this a try now