nthRoots

nthRoots(A)

nthRoots(A, root)

Try it yourself:

See also:

Find all complex nth roots

nthRoots(x, n) returns the complete set of nth roots of x. In the complex plane, a nonzero value has n roots arranged evenly around a circle.

Why all roots matter

nthRoots(1, 3) includes 1 and two complex cube roots of unity. This is useful in polynomial equations, signal analysis, and complex geometry. Use nthRoot when only the principal root is wanted, and pow to check each root.

Caveats

n should be a positive integer. Results may include complex values even when x is real, so use re, im, or abs to inspect them. Numerical comparisons should tolerate small rounding differences.

Try Nth Roots in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions