I am making a symbolic computation library which supports symbolic polynomials (both univariate and multivariate) and among other things I would like to support (possibly truncated) nth root (radical) computation of a (univariate or multivariate) polynomial since this computation is needed for some other things.
So lets say we have a polynomial $p(X) = \sum_{i}{a_{i}X^{i}}$ and I need an algorithm for $\sqrt[n]{p(X)}$.
I have found this post on computing the square root of a polynomial but I dont quite get it but also I would like an algorithm for nth root.
Library can compute all primitive operations of polynomials (both univariate and multivariate) on a general ring of coeffcients (ie add/sub/mul/div/mod/pow/derivative). (For reference library is on github)
Please provide a step-by-step algorithm in your answer or a link to such algorithm so I can test it.
PS. I tried using a variant of Newton's method for computing nth root and adapted it to polynomial operations but result is completely off, not even close.
Note: If polynomial is not a perfect nth power then a truncated power series can be computed up to some limit (eg truncated Taylor series) as an approximation. For example the square root algorithm on PlanetMath computes the Taylor series if poly is not perfect power of 2.
if poly is not a perfect nth power or power series approximation cannot be computed is fine for me if algorithm throws an error.
Thank you.