Wolfram Research

Function Repository Resource:

ComplexRoots

Source Notebook

Get the full list of complex nth roots of a number

Contributed by: Wolfram|AIpha Math Team

ResourceFunction["ComplexRoots"][x,n]

gives a list of the nth roots of a complex number x.

Examples

Basic Examples

Find the three third roots of unity:

In[1]:=
ResourceFunction["ComplexRoots"][1, 3]
Out[1]=

Find the sixth roots of 2:

In[2]:=
ResourceFunction["ComplexRoots"][2, 6]
Out[2]=

Find the fifth roots of -1:

In[3]:=
ResourceFunction["ComplexRoots"][-1, 5]
Out[3]=

Properties and Relations

Exact values are returned for exact input:

In[4]:=
ResourceFunction["ComplexRoots"][Sqrt[Sin[2]], 5]
Out[4]=

Use ResourceFunction["ComplexRootQ"] to confirm the output of ComplexRoots:

In[5]:=
AllTrue[ResourceFunction["ComplexRoots"][1, 3], ResourceFunction["ComplexRootQ"][1, 3]]
Out[5]=

Resource History

See Also

License Information