Any polynomial factoring programs, preferably in perl



On my math site for children algebra.com, I have a universal
simplifier/solver. It can actualy solve most middle school problems. I
would like to extend it to be able to solve more polynomial problems
like

x^6-2x^3+1 = 0

(using substitution)

or to solve the simplier variety of cubic equations perhaps.

Is there some standalone unix software that would solve such equations
and that would be free (as in under GPL).

thanks

i
.