root - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Factorization and Solving Equations : Roots : root

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

-

positive 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

  

- An integer 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>0, d>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

 (4) rootnab ==> rootnabn1b

 (5) rootna ==> 11nrootna

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

 (7) rootnan ==> a where a>0

  

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

• 

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

 (8) rootnanb ==> arootnb if signuma&equals;1, and

 (9) rootnanb ==> arootn1nb if signuma&equals;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 (8), 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);

31&sol;3

(3)

root(8,3);

2

(4)

root[3](8);

2

(5)

root(24,3);

231&sol;3

(6)

root(-8,3);

211&sol;3

(7)

root(-8.0,3);

1.000000000&plus;1.732050807I

(8)

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

3&plus;4I1&sol;3

(9)

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

1.628937146&plus;0.5201745022I

(10)

root[3](x);

x1&sol;3

(11)

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

221&sol;3x3y1&sol;3

(12)

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

2x4y1&sol;4

(13)

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

2x21&sol;3y1&sol;3

(14)

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

2xy1&sol;4

(15)

assume(x>0);

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

2x~21&sol;3y1&sol;3

(16)

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

2x~y1&sol;4

(17)

assume(x<0);

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

2x~2y1&sol;3

(18)

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

2x~y1&sol;4

(19)

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

x~&plus;1y1&sol;4

(20)

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

f:=x~33x~2&plus;3x~1

(21)

root[3](f);

x~&plus;111&sol;3

(22)

root[3](f*y);

x~33x~2&plus;3x~1y1&sol;3

(23)
  

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

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

81&sol;3

2

2

(24)

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

2.000000000

2.000000000

2.000000000

(25)

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

81&sol;3

211&sol;3

2

(26)

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

1.000000000&plus;1.732050807I

1.000000000&plus;1.732050807I

2.000000000

(27)

See Also

^

assume

RootFinding[Isolate]

RootOf

Roots

roots

simplify/radical

sqrt

surd

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam