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 (3) 

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 (3) 

Exact values are returned for exact input:

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

Use the resource function ComplexRootQ to confirm the output of ComplexRoots:

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

The output of ComplexRoots[1,n] is similar to the output of the resource function PrimitiveRootOfUnityList[n] with the exception that 1 is missing from the latter:

In[6]:=
ResourceFunction["ComplexRoots"][1, 5]
Out[6]=
In[7]:=
ResourceFunction["PrimitiveRootOfUnityList"][5]
Out[7]=

Version History

  • 4.0.0 – 24 January 2020
  • 3.0.0 – 06 September 2019
  • 2.0.0 – 23 August 2019
  • 1.0.0 – 10 July 2019

Related Resources

License Information