root
nth root of an algebraic expression
Calling Sequence
Parameters
Description
Examples Using root
root(x, n)
root[n](x)
rootn⁡x
root(x, n, symbolic)
root[n](x, symbolic)
rootn⁡x,symbolic
x
-
any algebraic expression
n
nonzero integer
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=aq⁢d+rd ==> aq⁢ard where 0<r<d
(2) abnd ==> and⁢b−nd 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
(3) rootn⁡−a ==> −11n⁢rootn⁡a
(4) rootn⁡pn⁢a ==> p⁢rootn⁡a for prime p<150
(5) rootn⁡an ==> a where a>0
(6) rootk⁢n⁡am⁢n ==> rootk⁡am for positive integers a, k, m, n
(7) rootn⁡ab ==> rootn⁡a⁢rootn⁡bn−1b; Note: If the result of this rule includes a product of the form ckm⁢dkm for positive integers c,d,k,m, then these are combined into c⁢dkm
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) root−n⁡a ==> 1rootn⁡a if n<0,
(9) rootn⁡an⁢b ==> a⁢rootn⁡b if signum⁡a=1, and
(10) rootn⁡an⁢b ==> −a⁢rootn⁡−1n⁢b if signum⁡a=−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).
root(3.0,3);
1.442249570
root[3](3.0);
root(3,3);
313
root(8,3);
2
root[3](8);
root(24,3);
2⁢313
root(24/5,3);
2⁢313⁢5235
root(72/5,3);
2⁢15235
root(-8,3);
2⁢−113
root(-8.0,3);
1.000000000+1.732050807⁢I
root[3](3+4*I);
3+4⁢I13
root[3](3.0+4.0*I);
1.628937146+0.5201745022⁢I
root[3](x);
x13
root[3](16*x^3*y);
2⁢213⁢x3⁢y13
root[4](-16*x^4*y);
2⁢−x4⁢y14
root[3](16*x^3*y,symbolic);
2⁢x⁢213⁢y13
root[4](-16*x^4*y,symbolic);
2⁢x⁢−y14
assume(x>0);
2⁢x~⁢213⁢y13
2⁢x~⁢−y14
assume(x<0);
−2⁢x~⁢−2⁢y13
−2⁢x~⁢−y14
root[4]((x-1)^4*y);
−x~+1⁢y14
f := expand( (x-1)^3 );
f≔x~3−3⁢x~2+3⁢x~−1
root[3](f);
−x~+1⁢−113
root[3](f*y);
x~3−3⁢x~2+3⁢x~−1⁢y13
Note the differences among the outputs of the root, ^, and surd commands.
8^(1/3); root(8, 3); surd(8, 3);
813
(8.0)^(1/3); root(8.0, 3); surd(8.0, 3);
2.000000000
(-8)^(1/3); root(-8, 3); surd(-8, 3);
−813
−2
(-8.0)^(1/3); root(-8.0, 3); surd(-8.0, 3);
−2.000000000
See Also
^
assume
RootFinding[Isolate]
RootOf
Roots
roots
simplify/radical
sqrt
surd
Download Help Document