root - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


root

nth root of an algebraic expression

 

Calling Sequence

Parameters

Description

Examples Using root

Calling Sequence

root(x, n)

root[n](x)

rootnx

root(x, n, symbolic)

root[n](x, symbolic)

rootnx,symbolic

Parameters

x

-

any algebraic expression

n

-

nonzero integer

Description

• 

The function root computes an nth root of x where x can be:

  

- A real or complex floating-point constant, for example, 2.0 or 2.0+0.5*I

  

- A real or complex rational constant, for example, 8 or 2+I/2

  

- A general symbolic expression, for example, b, -8*a^4*y, or ln(1+x)

• 

If x is a real or complex floating-point constant, the root is computed in floating-point arithmetic. Otherwise, the root function tries to simplify x^(1/n). If no simplifications can be made, the power x^(1/n) is simply returned.

• 

You can enter the command root using any of the equivalent calling sequences.

• 

root(x,n) represents the "principal root", defined by the formula root(x,n) = exp(1/n * ln(x))

• 

For example, the three roots of y^3+8=0 are -2, 1+I*sqrt(3), and 1-I*sqrt(3). Thus root(-8.0,3) returns 1.000000000 + 1.732050808 I, not the real number -2.0. See surd if you want the real nth root of a real number.

• 

For fractional powers of rational constants, that is, radicals a^(n/d) and (a/b)^(n/d) where a, b, n, d are integers, Maple automatically writes them in a canonical form as fractional powers of integers by applying the following transformations

 (1) and&equals;aqd&plus;rd ==> aqard where 0<r<d

 (2) abnd ==> andbnd where b&gt;0, d&gt;0

  

For example, 3^(5/2) ==> 3^(2+1/2) ==> 3^2*3^(1/2) ==> 9*3^(1/2) and (5/3)^(1/2) ==> 5^(1/2)*3^(-1/2) ==> 5^(1/2)*3^(1/2)/3. The root function does transformation (1) and the following transformations

 (3) rootna ==> −11nrootna

 (4) rootnpna ==> prootna for prime p<150

 (5) rootnan ==> a where a&gt;0

 (6) rootknamn ==> rootkam for positive integers a, k, m, n

 (7) rootnab ==> rootnarootnbn1b; Note: If the result of this rule includes a product of the form ckmdkm for positive integers c,d,k,m, then these are combined into cdkm

  

For example, root[3](-8) ==> 2*(-1)^(1/3) and root[3](72/5) ==> root[3](72)*root[3](5^2)/5 ==> 2*root[3](9)*root[3](5^2)/5 ==> 2/5*3^(2/3)*5^(2/3) ==> 2/5*15^(2/3). Note that no attempt is made to factor the input integer x.

• 

For symbolic expressions, a number of simplifications are attempted. The main ones are:

 (8) rootna ==> 1rootna if n<0,

 (9) rootnanb ==> arootnb if signuma=1, and

 (10) rootnanb ==> arootn−1nb if signuma=−1

  

where n is a positive integer and the condition signum(a)=1 means a is provably real and positive. Similar simplifications are made for negative powers. These simplifications are only made for explicit integer powers appearing in x. No attempt to factor the input x is made. See RootFinding[Isolate] if you want the real roots (zeros) of a univariate polynomial.

• 

Note: Maple does not simplify root[n](x^n) to x. This is wrong for general x. Maple returns (x^n)^(1/n).  Sometimes, because of the context of your work, you know that this transformation is valid.  If the symbolic option is specified, and signum(x) is not known, then the command root applies transformation (9), effectively assuming that a is positive. It is also possible to force the root function to make a simplification by making the appropriate assumption, for example, assume(a>0).

Examples Using root

root(3.0,3);

1.442249570

(1)

root[3](3.0);

1.442249570

(2)

root(3,3);

313

(3)

root(8,3);

2

(4)

root[3](8);

2

(5)

root(24,3);

2313

(6)

root(24/5,3);

23135235

(7)

root(72/5,3);

215235

(8)

root(-8,3);

2−113

(9)

root(-8.0,3);

1.000000000+1.732050807I

(10)

root[3](3+4*I);

3+4I13

(11)

root[3](3.0+4.0*I);

1.628937146+0.5201745022I

(12)

root[3](x);

x13

(13)

root[3](16*x^3*y);

2213x3y13

(14)

root[4](-16*x^4*y);

2x4y14

(15)

root[3](16*x^3*y,symbolic);

2x213y13

(16)

root[4](-16*x^4*y,symbolic);

2xy14

(17)

assume(x>0);

root[3](16*x^3*y);

2x~213y13

(18)

root[4](-16*x^4*y);

2x~y14

(19)

assume(x<0);

root[3](16*x^3*y);

2x~2y13

(20)

root[4](-16*x^4*y);

2x~y14

(21)

root[4]((x-1)^4*y);

x~+1y14

(22)

f := expand( (x-1)^3 );

fx~33x~2+3x~1

(23)

root[3](f);

x~+1−113

(24)

root[3](f*y);

x~33x~2+3x~1y13

(25)
  

Note the differences among the outputs of the root, ^, and surd commands.

8^(1/3); root(8, 3); surd(8, 3);

813

2

2

(26)

(8.0)^(1/3); root(8.0, 3); surd(8.0, 3);

2.000000000

2.000000000

2.000000000

(27)

(-8)^(1/3); root(-8, 3); surd(-8, 3);

−813

2−113

−2

(28)

(-8.0)^(1/3); root(-8.0, 3); surd(-8.0, 3);

1.000000000+1.732050807I

1.000000000+1.732050807I

−2.000000000

(29)

See Also

^

assume

RootFinding[Isolate]

RootOf

Roots

roots

simplify/radical

sqrt

surd