Small note on solving xnm=a

1 min read Original article ↗

September 6, 2026     Compiled on September 6, 2026

We want to solve

Where n,m are integers. n is called the power and m is called the root. We start by writing the above as

Let x1m=y. The above becomes

This is solved using De Moivre’s formula.

y =a1n
=(a×1)1n
=(a⁢e2⁢i⁢π)1n

Since 1=e2⁢π⁢i. Using Euler formula 1=cos⁡(2⁢π)+i⁢sin⁡(2⁢π). Hence

y=a1n⁢(cos⁡(2⁢π)+i⁢sin⁡(2⁢π))1n

But by De Moivre’s formula

(cos(2π)+isin(2π))1n=cos(2⁢πn+k2⁢πn)+isin(2⁢πn+k2⁢πn)k=0,1,⋯n−1

Therefore

y=a1n(cos(2⁢πn+k2⁢πn)+isin(2⁢πn+k2⁢πn))k=0,1,⋯n−1

For example, let n=3 then we have 3 solutions

y={a13⁢(cos⁡(2⁢π3)+i⁢sin⁡(2⁢π3))a13⁢(cos⁡(2⁢π3+2⁢π3)+i⁢sin⁡(2⁢π3+2⁢π3))a13⁢(cos⁡(2⁢π3+4⁢π3)+i⁢sin⁡(2⁢π3+4⁢π3))

Which simplifies to

y={a13⁢(12⁢i⁢3−12)a13⁢(−12⁢i⁢3−12)a13

Now we need to replace y back to x1m and the above becomes

x1m={a13⁢(12⁢i⁢3−12)a13⁢(−12⁢i⁢3−12)a13

Since the exponent now is a root, then

x={(a13⁢(12⁢i⁢3−12))m(a13⁢(−12⁢i⁢3−12))mam3

For example, if m=2

x={(a13⁢(12⁢i⁢3−12))2(a13⁢(−12⁢i⁢3−12))2a23

Notice that if the solution x is meant to be real, then the above reduces to

And for m=4

x ={a43⁢(12⁢i⁢3−12)4a43⁢(−12⁢i⁢3−12)4a43
={a43⁢(−12+i⁢32)a43⁢(−12−i⁢32)a43

Notice that if the solution x is meant to be real, then the above reduces to

For a≥0. And so on. For the case of power n being negative integer, for example,

Then let n=3 and move the negative sign to the denominator to become x3−2. This way we can now use De Moivre’s formula for positive n.