Tag Info

Hot answers tagged


This function prints out the solutions to all polynomials of degree d with coefficients of unit magnitude. printAllSolutions[d_] := Do[ With[{p = FromDigits[c~Prepend~1, x]}, Print[Expand[p] -> (x /. NSolve[p == 0, x])] ], {c, Tuples[{-1, +1}, d]} ] I made one optimization, which is that the leading coefficient is always 1. If it is ...

Only top voted, non community-wiki answers of a minimum length are eligible